Local Proxy For Mac



Local Computers (Hosts) If you are not given a local DNS name by your DHCP server (your WiFi router, for example), your Mac will default to a.local domain. So, if you have to go to another computer on your own local network, it will bypass the proxy (if one is configured) and just connect directly. Mitmproxy is your swiss-army knife for debugging, testing, privacy measurements, and penetration testing. It can be used to intercept, inspect, modify and replay web traffic such as HTTP/1, HTTP/2, WebSockets, or any other SSL/TLS-protected protocols. In some cases, your Mac firewall will conflict with the firewalls in third-party hardware you may use, requiring you to disable the Mac firewall completely or to modify its settings. Continue reading to learn how to turn off or disable the firewall built into your Mac. In our earlier article, we have explained how to setup proxy and different ways to bypass local sites in Windows 10. Similar to Windows, macOS also offers function to bypass the proxy settings. In this article, we will explain the steps to bypass local and internet websites from proxy servers in Mac. Why You Need to Bypass Proxy?

If you have a locally-hosted version of a web site for testing or development, you’ll almost certainly want to test it on a mobile device.

Let’s say the local site is hosted on Mac OS X, and you access it with a URL containing a hostname defined locally in the Mac’s “hosts” file, such as http://exampledev.com.

Mac

How can you test the site using the same URL on a mobile device (that is, a real mobile device, not an emulator)—without jailbreaking the device, using a DNS server, or paying for additional software? In this post I’ll describe a way to do exactly that.

Some background

Mac Proxy Setting

But first a bit of background.

The quickest way to view a locally-hosted site on a mobile device is to simply use the local IP address of your computer in the “host” portion of the URL, for example http://192.168.1.11.

However some web sites don’t like being accessed with a mixture of different IP addresses and hostnames on different devices—perhaps because they use absolute links or some kind of host header validation. In that case, you’d need to configure the site to use that IP address on all devices, even the computer. Depending on your situation, this may not be ideal—and besides, it doesn’t look great.

What if you want to use a local hostname on all devices?

If you have access to a DNS server—perhaps there’s one in your router—then great, all devices can use that instead of a local hosts entry. But in a typical home network-type environment, running your own DNS server may not be straightforward.

Another option is to modify the local hosts file on the mobile device itself. But many mobile devices don’t allow this, or else are locked down by the carrier to prevent it. For example, iOS requires you to jailbreak the device before you can view or edit its local hosts file.

What if you don’t want to jailbreak the mobile device, and you can’t edit its local hosts file? The solution I’m going to describe gives you an easy way to view a local Mac OS X website on a mobile device:

Local Proxy For Mac
  • using the same locally-defined hostname on both the Mac and the mobile device e.g. http://exampledev.com
  • using only free software
  • without setting up or using a DNS server
  • without jailbreaking the mobile device or updating its local hosts file.

The solution

The standard solution is to run an HTTP proxy server on the computer where the site is running, and then configure the mobile device to use the proxy.

The mobile device is then able to resolve the hostname on the computer, even though it’s defined in the computer’s local hosts file, because it uses the proxy for DNS resolution.

There are already good instructions on how to do this—on Mac OS X you can use the Charles web debugging proxy, and on Windows you can use a free HTTP proxy called Fiddler.

But the Charles Mac web proxy is not free: at the time of writing a single-user license costs $50. This might might be worth it if you want to use Charles’ advanced debugging features to intercept the HTTP traffic between client and server.

But what if all you want to do is view the site on a mobile device to see how it looks and behaves? Are there any free and simple HTTP proxies available for the Mac that will do the job?

As it turns out, there are a several of options. One is to use the built-in Apache web server that comes with Mac OS X, which is normally used for “Web Sharing” (System Preferences → Sharing → Web Sharing). By modifying its configuration to enable mod_proxy, you can make it act as a proxy.

While this is a perfectly reasonable solution, it’s a little fiddly to set up, so I won’t describe it here.

Instead the solution I’ll describe uses a free and simple standalone proxy called SquidMan, which is a friendly Mac front-end to the popular Unix caching proxy Squid. SquidMan also has a really cool-looking icon depicting a bright pink octopus.

However, the overall principle can be applied using any HTTP proxy—just replace Steps 2 and 3 with the proxy of your choice.

So, here’s how you do it.

Step 1. Create a local hostname

If you haven’t already, make sure you have a local hostname for the site, for example “exampledev.com”, mapped to 127.0.0.1 (localhost) in your Mac’s local hosts file.

1. Open a Terminal (Applications → Utilities → Terminal.app), and edit the local hosts file (/etc/hosts) using a text editor such as vim:

Proxy program for mac

2. Enter your password when prompted, and add the new domain name at end:

Note that several commenters reported below that using .local as your top-level domain may not work for this purpose.

Once that’s in place, make sure you can access your site with the local hostname in a URL such as http://exampledev.com on the Mac. Make sure everything in the web site works with this URL.

Step 2. Install the proxy

The next step is to install the HTTP proxy on the machine where the local site is running, which in this case will be SquidMan.

  • Download and install SquidMan from the following URL: https://squidman.net/squidman/index.html.
  • Run SquidMan.app.

The first time you run SquidMan, it may prompt for admin credentials so that it can install some system stuff.

OS X may also ask you Do you want the application “squid” to accept incoming network connections? In this case you need to allow incoming connections, because the incoming connections to Squid will be from other devices on your network.

» noteSquidMan is a UI for controlling Squid. Squid is the actual HTTP proxy. Squid can run in the backround regardless of whether SquidMan is still running. You only use SquidMan to configure, monitor, start and stop Squid.

Step 3. Configure the proxy

The next step is to configure Squid using the SquidMan UI.

Go to SquidMan → Preferences, and set the following.

General tab

On the General tab, set the HTTP Port squid will listen on.

Proxy Program For Mac

The default is 8080, which works fine.

Clients tab

On the Clients tab, enter the IP address (or IP address range) of the clients you want to be allowed to use the proxy, in this case your mobile devices.

If your mobile device is running iOS, you can find its own local IP address by going to Settings → Wi-Fi, then find your network, and tap its blue “>” icon.

Then look under IP Address.

In this example the phone’s local IP address is 192.168.1.10.

Alternatively, you can specify a range of IP addresses, which is especially useful if you have multiple devices. Your router probably assigns IP addresses from a fixed range according to its DHCP settings. The SquidMan UI displays some useful examples—for example you can put “192.168.1.0/24” to allow the whole 192.168.1 subnet to use the proxy.

Template tab

Local

Squid uses a configuration file called squid.conf.

However, you don’t need to touch this file directly. Instead, SquidMan automatically generates this file when you start Squid, based on what you put in the Template tab in the UI. (If you edit the actual squid.conf file directly then it will just get overwritten.)

The first change you need to make in the Template tab is find the following section:

… and comment out the second line with a #.

If you leave this line uncommented, Squid will block clients from accessing web content hosted on the same machine that Squid is running on, which results in an “Access Denied” message when you attempt to access the local web site. Clients will be able to use the proxy, but only to access external web sites.

The reason for this piece of configuration being enabled by default is that the normal usage pattern for an HTTP proxy is to use it to access content hosted elsewhere, not on the same machine as the proxy. Hence, if you want Squid to serve files hosted on the same machine as itself you need to remove the constraint by commenting out this directive.

Next, you need to tell Squid where your hosts file is, by adding the directive shown below. Thanks to Tomek Augustyn for pointing this out (for some reason it wasn’t necessary on my machine).

Mac Global Proxy

I do not think the use of “/private/etc/hosts” vs. “/etc/hosts” is significant here—they actually reference the same file, since /etc is a symlink to /private/etc in OS X.

Finally click the Start Squid button to run the proxy.

Step 4. Configure the mobile device to use the proxy

The next step is to configure the mobile device to use the the proxy.

On the client device such as a phone or tablet, you’ll need to configure the device to use an HTTP proxy by specifying the proxy’s IP Address and Port.

You can determine the proxy’s IP Address and Port as follows.

  • The IP Address of the proxy is simply be the local IP address of the Mac on which you installed SquidMan, which you can find in System Preferences → Network → IP Address.

In this example the Mac’s local IP address is 192.168.1.11.

  • The Port of the proxy is the port that you configured Squid to listen on, e.g. 8080.

The specific steps required to configure your mobile device to use this proxy depend on the mobile OS—the instructions below are for iOS, but other mobile OS’s should be similar.

Configuring a mobile device running iOS to use the proxy

A mobile device running iOS can be configured to use the proxy as follows.

  • Go to Settings → Wi-Fi, find your Wi-Fi network, and tap the blue “>” icon for your network.
  • Scroll to the HTTP Proxy section at the bottom, tap Manual, and enter the proxy’s IP Address in the Server field and Port in the Port field.

To stop using the proxy, tap on Off under HTTP Proxy. For a while, it remembers your settings so that all you have to do is tap Manual to turn it on again.

Mac

The end result

After this is done, you should be able to sync all your local site’s bookmarks between your Mac and mobile device(s), and the site should be fully operational using the same locally-defined URLs on all devices.

  • Advertisement

  • Anti-Spam SMTP Proxy Server v.2.1.1.12090The Anti-Spam SMTP Proxy (ASSP) Server project aims to create an open source platform-independent SMTP Proxyserver which implements auto-whitelists, Bayesian, Greylisting and multiple filter methods. Click 'Browse all files' to download the ...
  • NetShade v.4.4NetShade makes your presence on the web anonymous by routing your connection through a proxyserver. It keeps you from leaving your digital 'calling card' at every site you visit. Every time you visit a website, your computer's browser makes a ...
  • Java NTLM Proxy v.0.2Forwards non-NTLM HTTP client requests to an NTLM proxyserver (ie. Microsoft IAS). Can also forward a local port to a remote ...
  • Apache Traffic Server v.2.1.0Apache Traffic Server 2.1.0 offers you a fast, scalable and extensible HTTP/1.1 compliant caching proxyserver. Formerly a commercial product, Yahoo! donated it to the Apache Foundation, and is now an Apache TLP.Major Features:CachingImprove your ...
  • Proxy Offline Browser v.2008.1The Offline Browser is a personal proxyserver sitting behind your regular browser (Firefox, IE, Safari, Opera - whatever!), silently and speedily handling all the network traffic. Unlike most offline browsers with this concept, you dont have to ...
  • Proxy Tester and WPAD Generator v.rcProxy Tester is a proxy list tester and then it generates a wpad.dat file you can use for your browser based on working servers. wpad.dat file selects a random proxyserver from the list of provided working proxy servers with each connection ...
  • Srelay - the SOCKS proxy and Relay v.0.4.8b5A Free SOCKS proxyserver for Linux, FreeBSD, Solaris and ...
  • Audio Video Streaming Proxy v.1.0Audio Video Streaming Proxy is a multiplexing proxyserver that handles multiple requests for identical stream by diverting a properly formatted version of an already established live stream to each individual requester.
  • 3proxy v.0.5.3gUniversal lightweight multiplatform proxyserver with HTTP, HTTPS, SOCKS v4, SOCKS v4a, SOCKS v5, FTP, POP3, UDP and TCP portmapping, access control, bandwith control, traffic limitation and accounting based on username, client IP, target IP, ...
  • Proxifier for Mac v.1.2.3Proxifier is a program that allows network applications that do not support working through proxy servers to operate through a HTTP or SOCKS proxyserver or a chain of proxy servers. There are many network applications that do not support working ...
  • Authoxy v.3.5.2Authoxy 3.5.2 brings you a useful tool in case your Internet connection requires you to use a proxy which needs a username and password. Authoxy will certainly be the solution to a seamless Internet experience.Authoxy runs locally as a proxyserver ...
  • MM3-WebAssistant Pro v.2009MM3-WebAssistant Pro 2009 is a smart and useful proxyserver sitting behind your regular browser (Firefox, IE, Safari, Opera - whatever!) which can silently and speedily handle all the network traffic.Unlike most offline browsers with this concept, ...
  • Locamatic for Mac OS v.2.1Have you ever wished that your Mac would update its location automatically on the basis of the network that you’re currently connected to? Perhaps you use your Mac at work accessing the internet though a proxyserver, and also at home where ...
  • BrownSauce RDF Browser v.14.0.1.2A project to aggregate and present arbitrary RDF data in as pleasing a manner as possible, that is a 'semantic web browser'.Brownsauce is a local http server; however it should be trivial to add other ...
  • JSpamAssassin v.1.0.1JSpamAssassin is a Java based POP3 ProxyServer that allows scan and mark messages as spam using Apache ...
  • Pop3hot v.rc.0.2This project is to develop a pop3 proxyserver which will interact with Hotmail and retrieve all the mails and store it temporarily for processing a pop3 request. Everything will be totally in Java!
  • Brekeke SIP Server for Mac v.2.4.8.6Brekeke SIP Server provides a SIP-based communication platform for a wide variety of service providers and enterprises. This product offers SIP over TCP/UDP support, original NAT traversal functionality, as well as a number of flexible call control ...
  • MM3-WebAssistant - Proxy Offline Browser v.2017Archives visited web pages with your browser to be used online and offline. Offline each page is available with its original URL. You can even use your bookmarks offline. There is no difference between surfing the internet and surfing the archive.
  • MM3-WebAssistant - Proxy Offline Browser - Pro v.2017Archives visited web pages with your browser to be used online and offline. Offline each page is available with its original URL. You can even use your bookmarks offline. There is no difference between surfing the internet and surfing the archive.
  • Nitro v.6.0.30Nitro Internet Proxy Accelerator compresses data before it is delivered to you. By connecting to one of our many proxy servers in Asia and the US, not only can you get faster internet access but you will start reducing excess data fees immediately.
Local Proxy Server software by TitlePopularityFreewareLinuxMac
Today's Top Ten Downloads for Local Proxy Server
  • Nitro Nitro Internet Proxy Accelerator compresses data before it
  • VShell Server for UNIX VShell SSH2 server is a secure alternative to Telnet and
  • Web Proxy CG Web Proxy allows you to Secure and Optimize the Web
  • MM3-WebAssistant - Proxy Offline Browser - Archives visited web pages with your browser to be used
  • HTTPS tunnel client HTTPS tunnel - better and easier than VPN. The Barracuda
  • Navicat for SQL Server for Mac OS An ideal solution for administration and development which
  • MM3-WebAssistant - Proxy Offline Browser Archives visited web pages with your browser to be used
  • AweSync.Mail AweSync.Mail is designed to synchronize emails and contacts
  • XStream MP3 Server for Mac OS ShoutCast mp3 streaming server .- Stream MP3’s over the
  • 4Media iPod Max Platinum for Mac 4Media iPod Max Platinum for Mac is designed for Mac users
Visit HotFiles@Winsite for more of the top downloads here at WinSite!