Python 3.5+
-
Clone the repository
git clone https://github.com/gaohuazuo/wspm.git cd wspm
-
(Optional) Create a virtualenv and activate
virtualenv pyenv --python=python3 . pyenv/bin/activate
-
Install with
pip
pip install -e .
On server side, suppose you want to expose the ssh port (22) to clients,
python3 -m wspm.server :80 localhost:22
On client side,
python3 -m wspm.client localhost:2222 ws://example.com:80
Now the port mapping has been set up. Test it with
ssh -p 2222 username@localhost -v
Although wss
protocol is not supported natively, you can enable wss
with a CDN like Cloudflare.
This is a minimal prototype. Do not use it unless you understand what it is doing.
Feel free to submit an issue or pull request!