This is the code from my series on how to build a TCP proxy:
- How to build a TCP proxy #1: Intro.
- How to build a TCP proxy #2: Fake DNS Server.
- How to build a TCP proxy #3: Proxy Server.
- How to build a TCP proxy #3: Fake Certificate Authority.
- Clone this repo
- In the repo directory, make a new virtualenv using
virtualenv vendor
- Activate it using
source vendor/bin/activate
- Install requirements to the virtualenv using
pip install -r requirements.txt
- Whenever you want to run the code, activate the virtualenv by running
source vendor/bin/activate
again
Set your phone's DNS server to be the local IP of your laptop. Then run:
sudo python fake_dns_server.py
For lots more detail, see How to build a TCP proxy #2: Fake DNS Server.
Set the DNS Spoofer running, then:
sudo python tcp_proxy.py
For lots more detail, see How to build a TCP proxy #3: Proxy Server.
Set the DNS Spoofer running, then:
sudo python tls_tcp_proxy.py
For lots more detail, see How to build a TCP proxy #4: Proxy Server.