Total Pageviews

Sunday, 10 May 2020

How to make a TCP proxy

The code for my blog post series on building a TCP proxy 
This is the code from my series on how to build a TCP proxy:

Installation

  1. Clone this repo
  2. In the repo directory, make a new virtualenv using virtualenv vendor
  3. Activate it using source vendor/bin/activate
  4. Install requirements to the virtualenv using pip install -r requirements.txt
  5. Whenever you want to run the code, activate the virtualenv by running source vendor/bin/activate again

Usage

Fake DNS Server

Set your phone's DNS server to be the local IP of your laptop. Then run:
sudo python fake_dns_server.py

Non-TLS TCP proxy

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.

TLS TCP proxy

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.

No comments:

Post a Comment