SquidMan

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.

Install

Download, install, and run SquidMan.

Give admin access.

Give squid the ability to accept incoming network connections.

Preferences

General

HTTP Port: 8080

Clients

Add the IP address of devices being used.

Template

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

Usage

Find iOS device’s IP address

Add the IP address of devices being used to SquidMan preferences.

  1. In iOS, go to Settings > Wi-Fi > {network}.
  2. Press the i icon for network info.
  3. Get the IPV4 address. Example: 192.168.1.70
  4. Add this IP to SquidMan under Preferences > Clients.

Start Squid

  1. Open the SquidMan app on your Mac.
  2. Start the Squid service.

Find your Mac’s IP address

  1. Apple > System Preferences > Network
  2. Get the IP adddress.

Configure iOS to use proxy

  1. Go to Settings > Wi-Fi > {network}.
  2. Tap i icon for network info.
  3. Set HTTP Proxy = Manual.
  4. Set IP Address to your Mac’s IP address.
  5. Set Port = 8080 (the port you specified in SquidMan’s preferences).

Success

You can now access local environments running on your Mac like http://magento.test/ from your devices.

Stopping Squid

From your Mac

  1. Stop the Squid service.
  2. Quit the SquidMan application.

From your iOS device

  1. Go to Settings > Wi-Fi > {network}.
  2. Tap i icon for network info.
  3. Set HTTP Proxy = Off.

Resources