Proxy Autoconfig on an underpowered router for hotspot abuse Someday, a proper router setup will come. Written 2023/07/28 Constantly Updated - 2023/08/25 phone (Android 10+) set to hotspot use Every Proxy (both free as of this documentation - but technically supports only IPv4; I got IPv6 working with it) for VPN, use the bridge app and bridge the connection using Every Proxy enable HTTP/HTTPS proxy enable SOCKS proxy if needed * when using Every Proxy, note the IP addresses in the HTTP/S Proxy * * Also, the first IP address is the mobile client itself; that one is a dynamic address * * 192.0.0.x and 192.0.0.y work better and seem to be masks of the mobile hotspot's IP address * For PDANet, you do not get the luxury of having Internet access using Direct Hotspot Access due to the way it is set up, even depending on the phone plan. It, however supports IPv4 and IPv6. Also, attempting to run SeaMonkey through Windows (!) crashes the app. Example wpad.dat - This works for Every Proxy: * please change x and y to the two proxy's fourth octet listed at Every Proxy * function FindProxyForURL(url, host) { // Plain host names are assumed local, so these are direct: if (isPlainHostName(host)) return "DIRECT"; // These local devices will not work on the hotspot's proxy: if (isInNet(host, "192.168.1.1", "255.255.255.255") || isInNet(host, "192.168.1.2", "255.255.255.255") || isInNet(host, "192.168.1.10", "255.255.255.255")) return "DIRECT"; // These websites will not work on the hotspot's proxy: if ((host == "cwcyrix.nsupdate.info") || (host == "cwcyrix.ddnsfree.com")) return "DIRECT"; else // The rest of the clients get to use the hotspot's proxy: return "SOCKS mobile-ip-address:1080; SOCKS 192.0.0.x:1080; SOCKS 192.0.0.y:1080; PROXY mobile-ip-address:8080; PROXY 192.0.0.x:8080; PROXY 192.0.0.y:8080"; } Note: mobile-ip-address is only needed if the other two IP addresses do not work. router flash router with openwrt connect the router to the hotspot Network -> Wireless under radio0 (or radio1, etc.) click Scan click your hotspot SSID * CHECK the Replace wireless configuration, otherwise there will be two Wi-Fi entries * from there, fill out the necessary info * leave wireless mode as Client * * if BSSID is not set, router is suspect to SSID hijacking * click Save, then Save & Apply configure opkg with proxy if needed * from there, it is easier to use SSH and the terminal * install your favorite editor... unless it is vi/vim - whici is already provided (nano is mine - nano-full) nothing else to do, yet; create a proxy web server, either dedicated or within the router proxy web server - within the router create wpad.dat in the path: /www - example wpad.dat is above save proxy web server - dedicated unit image raspios install apache2 create wpad.dat in the path: /var/www/html - example wpad.dat is above create .htaccess in the same path with the line: AddType application/x-ns-proxy-autoconfig .dat OR modify mime.types and add that same line: AddType application/x-ns-proxy-autoconfig .dat save restart the server: systemctl restart apache2 raspi-config -> Advanced Options -> Network Config; choose dhcpcd; reboot edit dhcpcd.conf: /etc/dhcpcd.conf under Example static IP configuration... interface eth0 static ip_address=ip address static_routers=your router static domain_name_servers=your router save, restart dhcpcd: systemctl restart dhcpcd router - again edit /etc/config/dhcp under config dnsmasq... list dhcp_option '252,"http://hostname/wpad.dat"' under config dhcp lan... option local-pac-server code 252 = text; option local-pac-server "http://hostname:80/wpad.dat"; create a section called config domain... option name 'wpad' (or dedicated unit's hostname) option ip 'webserver IP address' save and restart dnsmasq (or reboot the router) -- browser config Firefox 68+ - also for other Firefox-based browsers - possibly older versions (!) Tools -> Settings -> General -> Network Settings click Settings select Auto-detect proxy settings for this network click OK * logically, you would select Use system proxy settings, but some OSes use DHCP for WPAD, and this does not work for Firefox-based browsers... also IPv6 does not work through proxy via WPAD anyway * * Internet Explorer and Chrome-based browsers use system settings by default - look to operating system config * operating system config Windows XP+ (yes, this also works on Windows 10, though you need the Control Panel on the Desktop) new-school: Start Menu -> Control Panel -> Network and Internet -> Internet Options old-school: Start Menu -> Control Panel -> Internet Options in Internet Options... click Connections tab click LAN settings button check Automatically detect settings click OK click OK * this seems to be on by default on a lot of Windows systems * Windows 10+ Start Menu -> Settings click Network and Internet click Proxy tab enable Automatically detect settings * this seems to be on by default on a lot of Windows systems *