Skip to main content

http-tunnel

Tunneling all sockets by using regular HTTP requests.

Why

If you always suffered from the limitations of proxy or firewall that cannot be avoided, then this tool MIGHT be useful for you.

How it works

It is a pair of HTTP client/server programs. The client also acts as a server, capturing all incoming sockets and sending them to the server. The server then sends the received socket data to the target server.

All data between the client and server is encrypted and wrapped in HTTP requests.

HTTPS is supported, but your proxy may block self-signed server certificates. Even with a formal certificate, the proxy may still decrypt the SSL/TLS layer by using fake certificates, and the data is encrypted (again, by this tool) anyway.

HTTPS may be only necessary for WebSocket since it will connect by using the CONNECT method via proxy, which is probably not allowed other than HTTPS.

If there is still any concern, put the server behind a firewall or any reverse proxy that can handle SSL/TLS connections.

Problems

The connection WILL be slow, and may not be stable too.

Although the WebSocket method can do way better performance than others, it may not be suitable for all situations.

Since HTTP is stateless, it's better to use this tool with other "real" tunnel protocols, such as SSH, that maintain consistent connections, otherwise, it may consume a lot of sessions, which is not efficient and might be suspected.

Requirements

Installation

pip install http-tunnel

Usage

  • To start server:

    http-tunnel -s
    
  • To start client:

    http-tunnel -c
    

    Note: To use proxy, set the HTTP_PROXY or HTTPS_PROXY environment variable.

  • For more information:

    http-tunnel --help
    

Still working on😪

  1. Support other request methods.
    • POST
    • PUT
    • DELETE
    • PATCH
    • WebSocket
  2. Support UDP.

As always

Use at your own risk and responsibility.

Metadata

Release files for http-tunnel 0.6.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for http-tunnel 0.6.11
File Size Uploaded
http_tunnel-0.6.11.tar.gz 19.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for http-tunnel 0.6.11
File Interpreter ABI Platform
http_tunnel-0.6.11-py3-none-any.whl Python 3 none any Details

Total release size: 38.8 kB

Release files / http_tunnel-0.6.11.tar.gz

Download URL http_tunnel-0.6.11.tar.gz
Size 19.0 kB
Tags Source
SHA-256 checksum
How to use checksums
113891ba1cbe2c9c86fbce5c7c8298bda73e99916863577524c20771cb8f8091
BLAKE2b-256 checksum
How to use checksums
6fbad51de37752d3438296e32805a374d8e4b34acb5b3a06bd73a6db6c3c3a91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.1

Release files / http_tunnel-0.6.11-py3-none-any.whl

Download URL http_tunnel-0.6.11-py3-none-any.whl
Size 19.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10e9f17d5d1eaed95c4bc90ae3843b4082c402fbd7ba4e3989f8e42b68367556
BLAKE2b-256 checksum
How to use checksums
54a5d360e0453dc612c086db92a64d3c67603ee8f4f49ce09ea84651b6ee3409
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.13.1

Release history Release notifications | RSS feed

This release

0.6.11 This release

2 release files

0.6.9

2 release files

0.5.3

2 release files

0.4.4

2 release files

0.3.2

2 release files

0.2.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page