HTTP tunneling tool.
Project description
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
- Python 3.8+
- requests, pysocks (for easy client handling)
- fastapi-slim, uvicorn (for easy server implementation)
- websockets (for WebSocket implementation)
- cryptography
- OS: Linux, Windows, MacOS(not tested)
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
orHTTPS_PROXY
environment variable. -
For more information:
http-tunnel --help
Still working on
Support other request methods.-
POST -
PUT -
DELETE -
PATCH -
WebSocket
-
- Support UDP.
As always
Use at your own risk and responsibility.
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
Built Distribution
File details
Details for the file http_tunnel-0.6.9.tar.gz
.
File metadata
- Download URL: http_tunnel-0.6.9.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11e359c6f1ceebe452b680c23aeb1512e101bd817ed40be4ec6046268e310664 |
|
MD5 | d9d7c81d89caaca2c474ee76b04d085a |
|
BLAKE2b-256 | fe8170a0408c0e3f6b0574c0d5d3744807eed5352dc79a98c2fcb707bfc4eb72 |
File details
Details for the file http_tunnel-0.6.9-py3-none-any.whl
.
File metadata
- Download URL: http_tunnel-0.6.9-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2609d034baa8e3350b1c44bd1af6828200dbd5e572bf102530d2b46f3da9d925 |
|
MD5 | 37d5da19b4191ba952fc2dd156144604 |
|
BLAKE2b-256 | 16beb398e131b4a949c2009e57ef7c8037464bfeb57645cc9833242b3aeac510 |