Skip to content

DanHouseman/proxyISH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

iSH Python Proxy Server for iPhone

A lightweight Python-based HTTP/HTTPS proxy server designed to run inside iSH on an iPhone or iPad.

Mainly an experiment set up to see if this was a viable solution to using mobile data on untethered devices without using hotspot data. It works. This allows another device on the same local network (such as a MacBook, Windows laptop, or tablet) to route browser traffic through the iPhone by connecting to a proxy hosted inside iSH.


What It Does

This project runs a local proxy server inside iSH using Python.

It supports:

  • HTTP proxying
  • HTTPS tunneling via CONNECT
  • Multiple simultaneous clients using threaded handling
  • Running entirely on an iPhone/iPad through iSH
  • Use from another device over Wi-Fi

Example architecture:

Laptop Browser
     ↓
Proxy Settings → iPhone IP:8888
     ↓
Python Proxy in iSH
     ↓
iPhone Internet Connection
     ↓
Website

Use Cases

  • Learn how HTTP proxies work
  • Route browser traffic through an iPhone-hosted proxy
  • Network experimentation using only an iPhone
  • Lightweight local proxy lab
  • Educational socket programming project

Requirements

iPhone / iPad

  • iOS device
  • iSH installed
  • Same Wi-Fi network as client device

Software

Install Python inside iSH:

apk add python3  

Installation

Copy the proxy script to iSH as:

text proxyISH.py

Run:

sh python3 proxyISH.py 

Expected output:

Proxy listening on 0.0.0.0:8888 

How To Use From Another Device

Step 1: Find iPhone IP Address

On iPhone:

text Settings → Wi-Fi → tap connected network

Example:

192.168.1.80 

Step 2: Configure Proxy On Client Device

Use:

Server: 192.168.1.80 
Port:   8888 

macOS

text System Settings → Wi-Fi → Details → Proxies

Enable:

  • Web Proxy (HTTP)
  • Secure Web Proxy (HTTPS)

Firefox

text Settings → Network Settings → Manual Proxy Configuration

Set:

HTTP Proxy: 192.168.1.80
Port: 8888 

Check:

Use this proxy server for all protocols

Testing

HTTP Test

sh curl -x http://192.168.1.80:8888 http://example.com 

HTTPS Test

sh curl -x http://192.168.1.80:8888 https://example.com 

Features

HTTP Support

Handles normal browser traffic such as:

GET http://example.com/

HTTPS Support

Supports browser TLS tunneling using:

CONNECT google.com:443 

Logs

Client requests appear in terminal:

('192.168.1.150', 50216) "CONNECT one.one.one.one:443 HTTP/1.1" 200 -

Notes

iSH Limitations

This runs inside a user-space Linux environment on iOS.

Because of iOS restrictions:

  • Performance is lower than native proxy servers
  • Background execution may pause
  • Large sustained traffic may be unstable
  • Best for experimentation / light use

This Is Not A Full Router

This project is a proxy server only.

It does not:

  • Perform NAT routing
  • Replace hotspot mode
  • Transparently route all apps automatically
  • Handle all UDP traffic
  • Bypass hotspot data limitation

Security Warning

This proxy has:

  • No authentication
  • No encryption between client and proxy
  • No access controls

Use only on trusted local networks.

Troubleshooting

Proxy Refusing Connections

Ensure:

python3 proxyISH.py 

is running.

DNS Errors

Inside iSH:

sh echo "nameserver 1.1.1.1" > /etc/resolv.conf echo "nameserver 8.8.8.8" >> /etc/resolv.conf 

Cannot Reach iPhone

Verify both devices are on same Wi-Fi network.

Example Workflow

1. Launch iSH 
2. Run python3 proxyISH.py
3. Connect MacBook to same Wi-Fi
4. Set proxy to iPhoneIP:8888
5. Browse normally

License

MIT License


Disclaimer

For educational and personal experimentation purposes only.

Use responsibly and only on networks/devices you own or control.

About

A lightweight Python-based HTTP/HTTPS proxy server designed to run inside [iSH] on an iPhone or iPad.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages