How do I browse a local network if my IP is an IPv6 - apache

Previously I could browse my localhost machine on a mobile device connected over wifi using my ip which was IPv4.
In developing a webapp or website this is very handy. I don't have to deploy changes to a live website/host.
previously this worked like this http://11.22.33.44/ entering this on the mobile then loaded the development workspace in the device.
Of course the ip was the one given by my ISP now the IP is a IPv6 one and this technique no longer works. I have tried various things like square brackets around the number http://[1111:2222:3333:4444]/this doesn't seem to work ?

Related

localhost and 192.168.x.x over HTTPS for a-frame webVR development and local testing

I'm trying to develop a A-frame-based VR experience.
I can test it on my mac via http://localhost but can't do the same using mobile phone or VR headset via http://192.168.1.123.
The problem is that those browsers demand that the page is served over HTTPS rather than HTTP, otherwise it denies access to the device motion sensor, making testing impossible.
Using the following instructions, I managed to successfully have my VR web page served over with a valid certificate.
https://www.freecodecamp.org/news/how-to-get-https-working-on-your-local-development-environment-in-5-minutes-7af615770eec/
https://github.com/mattdesl/budo/blob/master/docs/command-line-usage.md#ssl-and-https
But, that is not enough, mobile device and headset access the page over a local-wifi IP like 192.168.1.123 rather than localhost and the ssl certificate doesn't seem to work for those, even if i replace localhost by the correct IP when generating the domain key & certificates.
i guess each device browser would need to have its trusted store updated or something...
Would be curious to know how people solved their problem in their a-frame local development and testing flow.
Partial answer -- for Oculus Quest or Go browser development at least.
You can use the Chrome remote device debugging tools:
https://developer.oculus.com/documentation/oculus-browser/browser-remote-debugging/
Then setup port forwarding for the remote device:
https://developers.google.com/web/tools/chrome-devtools/remote-debugging/local-server
This method allows you to sidestep the whole certificate thing since you can still use localhost:port to which the browser grants appropriate device permissions.
Since you can't use IP numbers, you want to include your local domain name into the certificate, like this:
https://stackoverflow.com/a/10176685/573216
Worked for me in a similar context.

Wamp local ip add a local domain name

Ok, I have Wamp on my laptop up and running. I also configured it to be visible on all the devices in my local network, so that I could connect to it on my Phone and other laptops.
I have created a virtual host via wamp tools (Add a Virtual Host) named myexample.etc and it works from the laptop where I am running wamp (the server, let's say). But it doesn't work from other devices connected to the same network. It only works by typing the IP, not by typing the dns created.
Is it possible to do something to access this dns (virtual host) created from other devices in the same network?
Thank you in advance!
I assume you do not actually have a DNS Server running.
So when you say DNS, you mean you change the HOSTS file on the PC running WAMPServer.
This works by seeding the DNSCache on that PC at boot time, it does not and cannot have any effect on any other device in your local network. So there are basically 2 ways to access your website running on WAMPServer.
You amend all the other PC's HOSTS file and add something like this, assuming the WAMPServer PC is on IP Address 192.168.1.10
192.168.1.10 myexample.etc
If you cannot access the HOSTS file on all the other devices such as phones and tablets that have not been jailbroken
Access the site by the IP Address of the PC running WAMPServer, I wrote up a way of doing that on another question, so here is the link

testing - not able to create IPv6 network on Mac

For testing purposes I tried to create IPv6 network from my Mac. I followed this tutorial: https://developer.apple.com/library/archive/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html
Except one thing. Instead of Thunderbolt Ethernet I used only Ethernet. WiFi was successfully created and I am able to use it.
However it seems, that the created WiFi is still not IPv6.
I ran this test: http://ipv6-test.com and in results it says Not supported under IPv6 connectivity
What is the problem? Why is my network still IPv4? How can I create proper IPv6 network?
The NAT64 test network that Apple advises you to create does not provide global IPv6 connectivity. It provides only local IPv6 connectivity between your iOS device connected to the WiFi access point and your Mac. The Mac then uses NAT64/DNS64 to send any Internet traffic via IPv4 (which is similar to what some mobile carriers do). This is why an IPv6 testing website shows you that IPv6 is not supported.
The purpose of this setup is to test IPv6 compatibility of your iOS applications on a physical device. You may download an iOS app which will show whether your device is correctly obtaining an IPv6 address from your Mac (because iOS doesn't natively show this info).

Access localhost site on mobile devices within the same local network

Right now, I'm running my site on my Mac OS X locally via Apache.
I'm trying to reproduce a bug that only happen on iPhone Safari. I'm trying to avoid keep pushing the code to the staging server, pull, and then, test on my phone.
Is there a way to access my local site via my phone? via some kind of IP address?
make phone connect to the same WIFI as MAC OSX
run the server on the non-localhost address (LAN DHCP allocated), noted as SRV_IP
access the SRV_IP from your phone

Mobile Web App URL does not match Worklight Development Server host name (IP)

Using Worklight Studio 6.1.0.1 and Eclipse Kepler on Windows 7, I am seeing an inconsistency with the Worklight Development Server host IP. I have changed the host name from localhost to the IP address I want to use. That IP address is being used when I open the Worklight Console. However, my application includes a Mobile Web application and when I click its "Get App URL" link in the Worklight Console it displays a link using a different IP address. I have several network adapters that have IP addresses - my wired LAN adapter (which has the IP I want to use), my VPN adapter and an adapter configured by VirtualBox. If I am connected to the VPN, the app URL uses the IP address for the VPN adapter. If I am not connected to the VPN, the app URL uses the IP address for the VirtualBox adapter (which is a 169.254.x.x address). In neither case does it use the IP address for my wired adapter. I have modified the Windows Network Connections Advanced Settings so that the wired adapter takes precedence over the VPN adapter which takes precedence over the VirtualBox adapter.
Is there anything I can do to fix this? This makes the app URL difficult to use since my device cannot access either of those IP addresses. The best I can do is scan the QR code then manually change the IP address on my device.
To control the URL used for the Mobile Web envrionment's "Get App URL" in preview:
Open your-project\server\conf\worklight.properties
Uncomment the publicWorkLightHostname property
Provide a host or IP address
Re-deploy the application
Load Worklight Console and click on "Get App URL"
The URL should now point to the address from step 3 above.