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、下载客户端脚本、创建内网穿透服务
Metadata
Release files for pngrok-jawide 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pngrok-jawide-0.0.3.tar.gz | 5.3 kB | Without provenance | Details for pngrok-jawide-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pngrok_jawide-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for pngrok_jawide-0.0.3-py3-none-any.whl |
Total release size: 18.1 kB
Release files / pngrok-jawide-0.0.3.tar.gz
| Download URL | pngrok-jawide-0.0.3.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98fbd9adf193c8ffcc2f25ea987074f5a82f38cbe0735dc05c4e52b450973a54
|
|
BLAKE2b-256 checksum How to use checksums |
e9ca588a4fd00df6115526150315ff03737d94d667ecafc3cce8e7e2815bbc47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / pngrok_jawide-0.0.3-py3-none-any.whl
| Download URL | pngrok_jawide-0.0.3-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d87c60ed9055748baeb2ab44194ef507216b77a8ec5bba5beb46cb5f0b1aadb
|
|
BLAKE2b-256 checksum How to use checksums |
8814a07c226304071282744b68b0033cc2abb76f5befa14260ab00889aa7a9f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for pngrok-jawide 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.