Skip to main content

A TCP tunnel server/client by Python.

Project description


A TCP tunnel server/client by Python.


 pip install pytunnel


If you want local computer port 8080 can be access through server(IP: port 1090

Setp1. Run the following command at server computer:

python -m pytunnel --bind

It will start a tunnel server at port 1990.

Setp2. Run the following command at local computer:

python -m pytunnel --port 1090 --target --server

It will make a tunnel with and

Now, you can open to access the local computer port 8080.


You can use -e to set the password:

# server
python -m pytunnel --bind -e "abcdef"
# client
python -m pytunnel --port 1090 --target --server -e "abcdef"

Client can use -c to excute a command at the server computer:

# show server status
python -m pytunnel --server -c "status"

# let server exit
python -m pytunnel --server -c "exit"

# kill some client, the client-key can found with "status" command
python -m pytunnel --server -c "kill client-key"

Click to view more information!



  • First version


  • Optimize data package


  • Fix bugs
  • Use multiprocessing to improve throughput capacity


  • Add watch dog to check status

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytunnel-2.4.2.tar.gz (48.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page