Update README.md

Former-commit-id: f4942e2e18128654793c013fbf5a8fcfbfe15be4
Former-commit-id: 554a9d6681e8332d3d6edab0dc8e9ec53bd95612 [formerly a2305d634a2b81950ffe46eb928a80cd6be3f218] [formerly aaba11d5ef4b3d60ec98e0365c12a4d72b0172b7 [formerly 21cf606d124a8faa9bcb94f066dc553a363cd5ed [formerly 21cf606d124a8faa9bcb94f066dc553a363cd5ed [formerly 21cf606d124a8faa9bcb94f066dc553a363cd5ed [formerly bd1b10b3f16098310fe53594f7cb68077a3befe0]]]]]
Former-commit-id: c8e7d496fb085113616cb65221f8b16750feda8d [formerly 371339d86f8dfa8a2bb1548f29933d99f2f260e1]
Former-commit-id: 9e0749ecc6f7b4f1c9bc57538b7d74235691666e
Former-commit-id: 73c7d61ee71bad9119279e368e0ffa789fe5ebd9
Former-commit-id: b059f3612f7bd983172b93136e62fbef88930bff
Former-commit-id: 39a2f0fb39ae2458705927e7724f40db3e04352f [formerly 5020adac9a1ed97963370887a8917cdce2f32408]
Former-commit-id: fc42feccc2c115628daad2ee6bf2dd158a0e2da8
This commit is contained in:
Erèbe - Romain Gerard 2020-11-07 14:16:58 +01:00 committed by GitHub
parent 5769e6178d
commit b75cf19eac

View file

@ -72,17 +72,24 @@ Common options:
## Examples ## Examples
### Simplest one ### Simplest one
On your remote host, start the wstunnel's server by typing this command in your terminal On your remote host, start the wstunnel's server by typing this command in your terminal
``` ```bash
wstunnel --server ws://0.0.0.0:8080 wstunnel --server ws://0.0.0.0:8080
``` ```
This will create a websocket server listening on any interface on port 8080. This will create a websocket server listening on any interface on port 8080.
On the client side use this command to forward traffic through the websocket tunnel On the client side use this command to forward traffic through the websocket tunnel
``` ```bash
wstunnel -D 8888 ws://myRemoteHost:8080 wstunnel -D 8888 ws://myRemoteHost:8080
``` ```
This command will create a sock5 server listening on port 8888 of a loopback interface and will forward traffic. This command will create a sock5 server listening on port 8888 of a loopback interface and will forward traffic.
Ex: With firefox you can setup a proxy using this tunnel, by setting in networking preferences 127.0.0.1:8888 and selecting socks5 proxy With firefox you can setup a proxy using this tunnel, by setting in networking preferences 127.0.0.1:8888 and selecting socks5 proxy
or with curl
```bash
curl -x socks5h://127.0.0.1:8888 http://google.com/
#Please note h after the 5, it is to avoid curl resolving DNS name locally
```
### As proxy command for SSH ### As proxy command for SSH
You can specify `stdio` as source port on the client side if you wish to use wstunnel as part of a proxy command for ssh You can specify `stdio` as source port on the client side if you wish to use wstunnel as part of a proxy command for ssh