这是一个使用python实现的内网穿透服务,完全使用标准库实现
Project description
pngrok
这是一个使用python实现的内网穿透服务,完全使用标准库实现
服务端部署方式
python server.py 0.0.0.0:40000 0.0.0.0:4000
对外开放40000端口,以供用户访问;开放4000端口,以供客户端访问
客户端部署方式
python client.py 127.0.0.1:4000 127.0.0.1:80
连接到部署在127.0.0.1上的服务端的4000端口,将部署在127.0.0.1上的本地服务上的流量转发到服务端
日志
默认不显示日志,使用--log_level选项指定日志级别
python server.py 0.0.0.0:40000 0.0.0.0:4000 --log_level INFO
buffer size
默认为2048,使用--buffer_size选项修改
但是目前因为对报文结尾的判断全靠报文大小小于buffer_size的办法判断
所以要求server端和client端的buffer_size大小一致
将来应该使用自定义报文,或者去解析http报文获取http报文的长度,为了以后考虑应该使用自定义报文
python server.py 0.0.0.0:40000 0.0.0.0:4000 --buffer_size 64
开发计划
修改报文结尾的判断方法
一个服务端可以接入多个客户端,并能对每一个客户端的身份进行认证
为服务端建立web服务,让用户可以注册、登录、获取appid, appsecret、下载客户端脚本、创建内网穿透服务
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pngrok-jawide-0.0.3.tar.gz.
File metadata
- Download URL: pngrok-jawide-0.0.3.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.61.2 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98fbd9adf193c8ffcc2f25ea987074f5a82f38cbe0735dc05c4e52b450973a54
|
|
| MD5 |
6dc5bb422d8bbdf1865fb138f47f77eb
|
|
| BLAKE2b-256 |
e9ca588a4fd00df6115526150315ff03737d94d667ecafc3cce8e7e2815bbc47
|
File details
Details for the file pngrok_jawide-0.0.3-py3-none-any.whl.
File metadata
- Download URL: pngrok_jawide-0.0.3-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.61.2 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d87c60ed9055748baeb2ab44194ef507216b77a8ec5bba5beb46cb5f0b1aadb
|
|
| MD5 |
b40bf57b6c327687b78caa268052ef6c
|
|
| BLAKE2b-256 |
8814a07c226304071282744b68b0033cc2abb76f5befa14260ab00889aa7a9f7
|