• Stars
    star
    259
  • Rank 157,669 (Top 4 %)
  • Language
    Python
  • Created about 5 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

iOS HTTP/SOCKS proxy server for fake-tethering

What

A simple SOCKS proxy designed to run on Pythonista on iOS, letting you fake-tether your devices to a phone.

Installation

  • Install Pythonista from the App Store. It's a paid app, but it's worth every penny if you are a power user.
  • Download the code from GitHub.
  • Open the Files app, navigate to Downloads, and tap on the zip file to uncompress it.
  • Move the resulting iOS-SOCKS-Server folder to the Pythonista iCloud directory
  • Open Pythonista, navigate to iCloud, iOS-SOCKS-Server and open the socks5.py script.
  • Optionally, you can tap on the wrench and select Shortcuts... to add the script to your home screen.

Running

  • Connect your devices to the same WiFi network as your phone. If there's no suitable network, you can create a computer-to-computer (ad-hoc) network using your laptop and connect to it with your phone.
  • Open the home screen shortcut (if you made one), or open the socks5.py script in Pythonista and hit Run.
  • Point your devices at the PAC URL (also called script URL, script address, etc.), or configure them to use the SOCKS proxy listed.
    • For iOS devices: open Settings, tap on Wi-Fi, tap on the (i) icon next to the network, scroll down to HTTP Proxy, tap on Configure Proxy, select Automatic, and enter the PAC URL as displayed in Pythonista in the URL field (the URL will look like http://123.123.123.123:8080/wpad.dat).
    • For macOS: open System Preferences -> Network, click on Wi-Fi, hit Advanced..., and under Proxies check SOCKS Proxy and set the host:port to the SOCKS Address as displayed in Pythonista (this will be of the form 123.123.123.123:9876).
      • If you are using an ad-hoc Wi-Fi network (i.e. Wi-Fi menu -> Create Network), you will need to do some extra setup here. Under the TCP/IP tab, copy the existing 169.254.y.z IPv4 address, then switch Configure IPv4 to Manually, enter the 169.254.y.z IP address in both IPv4 Address and Router, and enter 255.255.0.0 as Subnet Mask. Under the DNS tab, add 169.254.y.z to the DNS Servers list.
      • Make sure you set proxy settings in any other application that is not using the system proxy settings.
    • For Windows or Linux, please follow the appropriate instructions for configuring a proxy on your system. It is recommended that you use the PAC URL if possible (also called a setup script or automatic configuration script).

Why

Recently, while travelling, I found out that Google Fi doesn't support tethering on iOS (I guess it's a feature they want to keep Android-exclusive or something?). Since my phone has a nice, fast, unblocked connection, I wanted to let my computer access it too.

I previously wrote Socks5-iOS for doing exactly this, but it turned out to be quite cumbersome to deploy and modify. Plus, the app expires frequently (if you don't have an iOS developer account), which makes it annoying if you need it in a pinch. Enter Pythonista - an App Store app which puts a complete Python interpreter on iOS.

This script can be used to implement a functional alternative to tethering, which I refer to fake-tethering. Fake-tethering has some substantial advantages over standard iOS tethering. It works even when carriers ban tethering, and it bypasses limits set on tethering speed since all connections originate from the phone.

While it's easiest to use this with websites, it's actually possible to tunnel any TCP connection over a SOCKS proxy. For example, here's how you would proxy an SSH connection:

ssh -o ProxyCommand='nc -X 5 -x <IP>:9876 %h %p' user@host

Troubleshooting

Doesn't work with an ad-hoc network on macOS

macOS appears to incorrectly assess the Internet as unreachable with an ad-hoc network, even if a proxy is configured. A workaround for this, tested on macOS 10.14, is described under issue #1.

More Repositories

1

2048-ai

AI for the 2048 game
Python
1,069
star
2

sha1collider

Build two PDFs that have different content but identical SHA1 sums.
Python
410
star
3

universal-doom

A single .exe binary which runs DOOM on DOS 6, Windows 95 and Windows 10 (and probably everything in between).
Python
277
star
4

eqgrp-free-file

Free sampling of files from the purported Equation Group hack.
Python
177
star
5

pwn-stuff

Miscellaneous utilities and such that I use for pwning. Open sourced since people might find these useful. Be warned: nothing is stable.
Python
129
star
6

ffsend

Python client for Firefox Send
Python
120
star
7

ntfsrecover

NTFS data-recovery program written in Python
Python
116
star
8

Il2CppVersions

Build scripts & historical header files for every available minor version of Unity's Il2Cpp project
C
108
star
9

ghidra-rickroll

Get rickrolled, right in your favourite NSA reverse engineering tool
C
77
star
10

socks5-ios

SOCKS server for iOS. Handy for defeating tethering speed limits, among other uses.
Objective-C
75
star
11

threes-ai

AI for the game Threes!
Python
57
star
12

iOS-Torrent-Client

A torrent client for iOS which runs on play.js - without sideloading or jailbreaking!
JavaScript
32
star
13

direct-handtracking

DIRECT - Depth IR Enhanced Contact Tracking
C++
30
star
14

fixedint

Fixed-width integers for Python
Python
28
star
15

doublethink

Doublethink challenge from DEF CON 2018
Python
23
star
16

ofxWin8Touch

Windows 8 touch driver for OpenFrameworks using WM_POINTER events
C++
21
star
17

openFrameworks-AndroidStudio

OpenFrameworks modifications to work with Android Studio
19
star
18

sstic-2021

Files for my solution to the SSTIC 2021 challenge
C
15
star
19

firefox-charset-extension

Override Character Encoding extension for Firefox
JavaScript
12
star
20

sublime-replace-with-python

"Replace with Python" for Sublime Text 2
Python
9
star
21

Insta360-X3-Firmware-Tools

Tools for unpacking and repacking firmware images for the Insta360 X3
Python
6
star
22

bgrep

Binary grep with support for sophisticated regexes and grep(1)-like usage
Python
6
star
23

steam-phishing-analysis

Analysis and dissection of a Steam login phishing site.
HTML
6
star
24

sstv-encoder

SSTV encoder for Terebeep challenge at PlaidCTF 2017
Python
5
star
25

net-nrbf

Utilities to dump and process .NET binary-serialized data streams.
Python
4
star
26

pogo-iv-reader

Screenshot-reading IV calculator for Pokemon GO
Python
4
star
27

android_remote_control

Control an Android phone's touchscreen via ADB.
Python
3
star
28

hexacon-2022

Files for my solution to the Hexacon 2022 challenge
Python
3
star
29

pandt

HCI P&T projects
C
3
star
30

libm3

Library for reading and writing Blizzard .m3 model files.
C++
3
star
31

sstic-2023

My writeup for the SSTIC 2023 challenge (https://www.sstic.org/2023/challenge/)
Python
3
star
32

ghidra-skeleton-language

Skeleton language module for Ghidra
Java
2
star
33

sarah2-attack

Cryptanalysis of the Sarah2 pen-and-paper cipher
Python
2
star
34

weka-android

Weka for Android.
Java
1
star
35

ofxGestureCam

OpenFrameworks addon for the Creative Gesture Cam
C
1
star