WSTerm
使用Websocket协议实现的远程终端,可以用于远程调试(支持自动同步本地工作区文件到远程机器)
支持环境
操作系统:
- Linux
- Windows
- MacOS
Python 3.5以上版本
功能特性
- 远程终端
- 自动监听、同步工作区文件
为什么要使用WSTerm?
相比于SSH,Websocket协议具有更好的可访问性,很多场景下SSH服务不会被暴露出来,但是一般会暴露出Websocket服务。
SSH服务通常只支持Linux和MacOS,Windows需要安装独立的应用;而WSTerm可以直接运行在以上三种系统,使用更加方便。
自动同步本地工作区文件,可以实现本地修改代码,直接远程执行的特性,大大降低远程编写、执行代码的复杂性。
使用方式
安装方法
$ python3 -m pip install wsterm
服务端
$ wsterm --url ws://0.0.0.0:8080/terminal/ --server
此时,服务端会监听在本地的0.0.0.0:8080地址;如果只想监听在回环地址,可以将0.0.0.0替换成127.0.0.1。
服务端还支持以下可选参数:
--token: 指定鉴权使用的Token
--log-level: 日志级别,默认为info
--log-file: 日志保存文件路径
-d/--daemon: 是否以daemon方式启动,默认为False
客户端
$ wsterm --url ws://1.2.3.4:8080/terminal/
客户端支持的可选参数:
--workspace: 需要同步的工作区目录
--token、--log-level、--log-file等参数与服务端相同
服务端与客户端需要指定相同的
Token才能正常连接
Metadata
Release files for wsterm 0.7.1
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 |
|---|---|---|---|---|
| wsterm-0.7.1.tar.gz | 4.4 MB | Without provenance | Details for wsterm-0.7.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wsterm-0.7.1-py3-none-any.whl | Python 3 | none | any | Details for wsterm-0.7.1-py3-none-any.whl |
Total release size: 8.8 MB
Release files / wsterm-0.7.1.tar.gz
| Download URL | wsterm-0.7.1.tar.gz |
|---|---|
| Size | 4.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0df3f2f8d6d76531f70e86637ed84272c9d73acbf9ccc002486aed0b795a583e
|
|
BLAKE2b-256 checksum How to use checksums |
4e12125d72df70e8813e72f69a568bf445fe66f940e16a3a6d8359e40e8b65fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Release files / wsterm-0.7.1-py3-none-any.whl
| Download URL | wsterm-0.7.1-py3-none-any.whl |
|---|---|
| Size | 4.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84d9c4ee78275c9b420e5d480a7e038044d89332dbab07ce4fef0c8a74c16713
|
|
BLAKE2b-256 checksum How to use checksums |
cb9c1f45125d2b11a1128fe8842bfbf7ee339bd51d2ab89b7b0e804db08cfa65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Security for wsterm 0.7.1
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.