You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dingjun 734613015e | 4 years ago | |
---|---|---|
.gitignore | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
conf.go | 4 years ago | |
config.example.yaml | 4 years ago | |
go.mod | 4 years ago | |
go.sum | 4 years ago | |
main.go | 4 years ago | |
server.go | 4 years ago | |
server_test.go | 4 years ago | |
tcp_server.go | 4 years ago | |
ws_server.go | 4 years ago |
README.md
wstunnel
two features:
-
receive data through tcp and forward it through websocket connection
-
receive data through websocket and forward it to upstream tcp port
usage example
proxy ssh connection
on server side, listen for websocket connection and forward it to ssh port, example config
proxy_config:
- listen: ws://127.0.0.1:2222/p1
remote: tcp://127.0.0.1:22
start server side proxy by wstunnel -c server.yaml
on client side, forward the connection through websocket, example config
proxy_config:
- listen: tcp://127.0.0.1:9001
remote: ws://127.0.0.1:2222/p1
start client side proxy by wstunnel -c client.yaml
now, you can connect to ssh server by ssh -p 9001 127.0.0.1
, your ssh connection hide in websocket
the websocket can be proxied by nginx also
Support me
If you find my work useful, you consider support me for further develop.
Paypal: Support me on paypal.com
BTC: 3DSr6qNrrH4dQ3aTBhtkyYt94batcehmRf