Skip to content

gaohuazuo/wspm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Websocket Port Mapping

Requirements

Python 3.5+

Install

  1. Clone the repository

    git clone https://github.com/gaohuazuo/wspm.git
    cd wspm
  2. (Optional) Create a virtualenv and activate

    virtualenv pyenv --python=python3
    . pyenv/bin/activate
  3. Install with pip

    pip install -e .

Example

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

WSS

Although wss protocol is not supported natively, you can enable wss with a CDN like Cloudflare.

Note

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!

About

Port mapping using websocket

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages