Skip to content
Ricky Zhang edited this page Jun 19, 2022 · 18 revisions

It depends on how you create a wifi network. There are two different use cases. Use case 2 is my preferable way when I travel. However, it requires an additional portable wifi router.

Use case 1

Create an Ad-hoc wifi network from your laptop.

Connect your iPhone to this wifi network. Please do NOT set up DNS or router on your iPhone wifi setting. Otherwise, tethering will doom to fail.

In this use case, you can only share your iPhone tethering with only one device.

For Mac users, I have confirmed in Mavericks that the system-wide default proxy configuration didn't work. It is due to the DNS configuration in the Ad-hoc wifi network.

Although the system-wide proxy fails, you can use Firefox and Chrome for web browsing by setting up socks proxy individually. For configuration details, please refer to Outstanding issues & Fix.

For other network applications using BSD POSIX socket API, you can use tsocks to socksify the application. I have added my additional patch to tsocks in [my GitHub tsocks project] (https://github.com/rickyzhang82/tsocks_dnsdirect).

Here is another step-by-step instruction written by Rand_o.

Use case 2

Create a wifi network from your portable router.

Connect your devices and iPhone to this wifi network. You will use your iPhone as a proxy and DNS server. You can share your iPhone LTE connections to many devices.

Here is a concrete example:

  1. Your portable wifi router
    • IP is 192.168.2.1.
  2. Your iPhone connects to the router as an access point
    • wifi router IP 192.168.2.1 as a gateway
    • IP is 192.168.2.2.
    • Network mask is 255.255.255.0.
    • Note that do NOT setup DNS on your iPhone.
  3. Your device connects to the router as an access point
    • wifi router IP 192.168.2.1 as a gateway.
    • IP is 192.168.2.3.
    • Network mask is 255.255.255.0.
    • DNS points to your iPhone IP 192.168.2.2.
    • If you can use an automatic HTTP proxy, copy the text value of automatic proxy rows from UI, eg http://your-iphone-name.local:8080/socks.pac or for Windows 10 http://your-iphone-name.local:8080/socks5.pac.
    • If you can set socks5 proxy manually, socks5 protocol IP points to socks address from App UI (eg, iPhone IP 192.168.2.2), and socks5 protocol port points to socks port from App UI.

For Mac users, it works perfectly with DNS and automatic or manual proxy configuration provided above. You can fall back to my customized tscoks if Mac OS X global proxy configuration doesn't socksify your application, eg, ssh and etc.

For iPad users, you have to use an automatic HTTP proxy. In iPad's wifi setting -> HTTP Proxy -> Configure Proxy -> URL, enter the text value of automatic proxy rows from UI, eg http://your-iphone-name.local:8080/socks.pac. It makes the iPad retrieve the socks setting file hosted in the iPhone HTTP server.

I have confirmed this use case with my portable wifi router (HooToo® TripMate HT-TM01 Wireless N150 Portable Travel Router). Mac OS X system-wide socks proxy connection can make the following apps -- Safari, Mail, and Evernote connect through iPhone socks5 proxy.

Clone this wiki locally