# Hotspot Tethering on TCP blocking Carriers (i.e. Straight Talk Wireless)

in #engrave4 years ago (edited)

This hack sets up an ssh socks5h proxy to a remote shell, and serves the auto-configuration pac via apache.

Carrier allows DNS lookups, but no TCP on tethered hotspot, so we socks-ify it.

Works with iOS iPhone -> Android and from laptops etc via browser plugins, proxychains4, or redsocks, which is beyond the scope of this document, BTSOTD.

e.g. auto-config url http://192.168.43.169:8080/proxy.pac

The Proxy

ssh -v -D 0.0.0.0:8888 [email protected]

The Webserver (in TermUX)

pkg install apache2

ln -s /data/data/com.termux/files/home/etc ~/etc

/data/data/files/usr/share/apache2/default-site/htdocs/proxy.pac

proxy.pac (put on your phone/apache2)

function FindProxyForURL(url, host) { url = url.toLowerCase(); host = host.toLowerCase(); if (isInNet(host, "10.0.0.0", "255.0.0.0") || isInNet(host, "172.16.0.0", "255.240.0.0") || isInNet(host, "192.168.0.0", "255.255.0.0") || isInNet(host, "127.0.0.0", "255.255.255.0")) return "SOCKS 192.168.43.169:8888"; return "SOCKS 192.168.43.169:8888"; }

debugging

termux allows multiple sessions by swiping from the left

tail apache web log

$ pwd
/data/data/com.termux/files/usr/var/log/apache2
$ tail -f access_log

see proxy traffic

netstat -an | grep 8888

arp

ip neighbor

--
aquaqlabs


Originally posted on Genuine Apple Flavour. Hive blog powered by ENGRAVE.