Bypassing Tethering Limits on iOS with iOS-SOCKS-Server and Interface Filtering
Many mobile carriers differentiate between on-device data and tethering (hotspot) data. Even with an "unlimited" plan, carriers often impose strict caps on tethered data, making it difficult to use your phone as a reliable gateway for other devices.
While Android users can easily bypass these restrictions by turning their phones into SOCKS servers, iOS is notoriously restrictive. Fortunately, @nneonneo created the iOS-SOCKS-Server - a clever solution that runs a SOCKS5 server on non-jailbroken iOS devices using the Pythonista environment (a paid app).
The Problem: Incorrect Network Interface Selection The original version of iOS-SOCKS-Server identifies the SOCKS5 proxy connection port by picking the first available cellular interface candidate.
However, iOS often maintains multiple virtual network interfaces that cannot actually function as endpoints for a proxy connection. Without a proper filtering logic, the script frequently selects a "dead-end" interface, causing the SOCKS5 server to fail even though the service appears to be running.
The Solution: Improved Interface Filtering (My PR) To fix this, I submitted a Pull Request that adds specific filtering logic to the interface selection process.
In my testing, this allows the script to bypass inactive virtual interfaces and correctly identify the functional endpoint. For instance, on my device, the script now correctly selects the ipsec2 interface with its reserved IP (192.0.0.6), ensuring a stable and working proxy connection for tethered devices.
If you running into same issue, then you can download my forked version of iOS-SOCKS-Server