SquidMan enables developing websites locally on your Mac, and testing from your phone/tablet possible — even for sites that require the exact domain in their configuration to route properly.
In most cases a wildcard DNS service like xip.io or Vagrant Share is the simplest way to route external requests into your local environment. This is great if your site will function with a random subdomain or IP address.
But if your site requires a specific domain in its configuration (like Magento) then wildcard services won’t work.
SquidMan solves this when:
- Your computer and device are connected to the same WiFi network.
- Your device can be configured to use an HTTP proxy.
The proxy lets devices on your network access servers running on your Mac using the same domain you access locally.
SquidMan doesn’t enable devices outside your network to access your local sites. You still need a demo server for that.
Download, install, and run SquidMan.
Give admin access.
squid the ability to accept incoming network connections.
HTTP Port: 8080
Find the IP address of devices that you want to give access.
In iOS, go to
Settings > Wi-Fi. Press the
i icon for info about the connected network.
Get the IPV4 address. Ex: 192.168.1.70
Add this IP to SquidMan preferences.
Find this line:
# protect web apps running on the proxy host from external users http_access deny to_localhost
And comment out the config:
# protect web apps running on the proxy host from external users #http_access deny to_localhost
Note: I didn’t need to do the next step.
Add this config:
# hosts file hosts_file /etc/hosts
Check the IP address of your device is loaded in SquidMan’s preferences.
Open SquidMan and start Squid.
Find your Mac’s IP address
Apple > System Preferences > Network
Get the IP adddress.
Configure device to use proxy
Settings > Wi-Fi and inspect the connected network’s info.
Under “HTTP Proxy”, select “Manual”.
Type your Mac’s IP address and the port you specified in SquidMan’s preferences (8080).
You can now access local environments running on your Mac like
http://magento.dev/ from your devices.
Turning off Squid
From your Mac
- Stop the Squid process.
- Quit the SquidMan application.
From your device
iOS — Switch the “HTTP Proxy” to “Off”.