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 unnecessary since 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.
If there is still any concern, put the server behind the SSL/TLS endpoint.
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 (for easy HTTP session handling)
- fastapi-slim (for easy HTTP server implementation)
- uvicorn (for easy HTTP server implementation)
- websocket-client, wsproto (for easy 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
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
Hashes for http_tunnel-0.5.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edb2a50939adabda2bbd101dcfe1b31da14fb49320df31cb71f18344029fe9fe |
|
MD5 | 95f063e3050d350a1ae607c33db7e5ed |
|
BLAKE2b-256 | 29a97e4bff50ce75298e3c92f8616daaa367329af12e10629cd0d3fccde9b241 |