Giter Club home page Giter Club logo

wssocks's Introduction

wssocks

build Go Report Card Docker Image Size (latest by date) Docker Image Version (latest semver) Docker Pulls

socks5 over websocket.

wssocks can proxy TCP and UDP(not implemented currently) connections via socks5. But the socks5 data is wrapped in websockets and then sent to server.

Features

  • Transfer data through firewalls
    In some network environment, due to the restricts of firewalls, only http(s)/websocket is allowed. wssocks is mainly useful for passing through firewalls. We can access the inner netwrok (such as ssh) behind the firewalls via socks protocol wrapped in websockets.
  • High performance
    wssocks only create one TCP connection (websocket) per client to handle multiple socks5 connections, which achieves much higher performance.
  • Easy to use
    No configures, no dependences, just a single executable including client and server.

Build and install

cd status-web; yarn install; yarn build; cd ../
go get -u github.com/rakyll/statik
cd cmd/server; statik --src=../../status-web/build/; cd ../../
go build
go install

You can also download it from release page.

Quick start

server side

wssocks server --addr :1088

client side

wssocks client --addr :1080 --remote ws://example.com:1088
# using ssh to connect to example.com which may be behind firewalls.
ssh -o ProxyCommand='nc -x 127.0.0.1:1080 %h %p' [email protected] 

And set your socks5 server address as :1080 in your socks5 client (such as proxifier or proxy setting in mac's network preferences) if you need to use socks5 proxy in more situations, not only ssh in terminal.

Advanced usage

enable http and https proxy

You can also enable http and https proxy by --http option(in client side) if http(s) proxy in server side is enabled:

# client siede
wssocks client --addr :1080 --remote ws://example.com:1088 --http

The http proxy listen address is specified by --http-addr in client side (default value is :1086), and https proxy listen address is the same as socks5 proxy listen address(specified by --addr option).

Then you can set server address of http and https proxy as :1080 in your http(s) proxy client (e.g. mac's network preferences).

note: http(s) proxy is enabled by default in server side, you can disable it in server side by wssocks server --addr :1088 --http=false .

Connection key

In some cases, you don't want anyone to connect to your wssocks server. You can use connection key to prevent the clients who don't have correct connection authentication.
At server side, just enable flag --auth, e.g.:

wssocks server --addr :1088 --auth

Then it will generate a random connection key. You can also specific a customized connection key via flag --auth_key.
At client side, connect to wssocks server via the connection key:

wssocks client --remote ws://example.com:1088 --key YOUR_CONNECTION_KEY

TSL/SSL support

Method 1: In version 0.5.0, transfering data between wssocks client and wssocks server under TSL/SSL protocol is supported.

At server side, use --tsl flag to enable TSL/SSL support, and specific path of certificate via --tls-cert-file and --tls-key-file. e.g.

wssocks server --addr :1088 --tsl --tls-cert-file /path/of/certificate-file --tls-key-file /path/of/certificate-key-file

At client side, we can then use wss://example.com:1088 as remote address, for instance.

Method 2: Use nginx reverse proxy, enable ssl and specific certificate file and certificate key file in nginx config. For more information, see issue #11).

Server status

In version 0.5.0, we can enable statue page of server by passing --status flag at server side (status page is disabled by default).
Then, you can get server status in your browser of client side, by visiting http://example.com:1088/status (where example.com:1088 is the address of wssocks server).

Help

wssocks --help
wssocks client --help
wssocks server --help

wssocks's People

Contributors

genshen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

wssocks's Issues

server crashed when client is killed

another log from the server when connection closed

panic: send on closed channel

goroutine 296 [running]:
github.com/genshen/wssocks/wss.(*DefaultProxyEst).establish(0xc00000ed60, 0xc000052840, 0x9dc36388572ebc0b, 0xc9b79db3fea01343, 0xc00f6c1604, 0x0, 0xc00001eb80, 0x18, 0x0, 0x0, ...)
        /home/mohammad/Works/wssocks/wss/proxy_server.go:167 +0x1b1
github.com/genshen/wssocks/wss.establishProxy(0xc000052840, 0x9dc36388572ebc0b, 0xc9b79db3fea01343, 0xf6c1604, 0x0, 0xc00001eb80, 0x18, 0x0, 0x0, 0x0)
        /home/mohammad/Works/wssocks/wss/proxy_server.go:119 +0xd9
created by github.com/genshen/wssocks/wss.(*Hub).Run
        /home/mohammad/Works/wssocks/wss/hub.go:61 +0x215

Originally posted by @mokhtarabadi in #19 (comment)

version

0.5.0-beta

Steps to reproduce

  1. add time.Sleep(time.Second*10) before proxy_server.go:167, and then run go build.
  2. start client and server
  3. setup proxy connection at client side:
export ALL_PROXY=socks5://127.0.0.1:1080
curl https://github.com
  1. Then kill client process in 10 seconds after running curl command.
    logs of client:
INFO[0000] listening on local address for incoming proxy requests.  socks5 listen address=":1080"
ERRO[0123] write error:read tcp 127.0.0.1:1080->127.0.0.1:49924: use of closed network connection
fish: './wssocks client --remote ws://…' terminated by signal SIGTERM (Polite quit request)

logs of server:

panic: send on closed channel

goroutine 276 [running]:
github.com/genshen/wssocks/wss.(*DefaultProxyEst).establish(0xc0002042c0, 0xc000218300, 0xe0bba4aaac9dcf0b, 0x8589f794af70326e, 0xc05907997a, 0x0, 0xc000018320, 0x15, 0x0, 0x0, ...)
        /go/src/github.com/genshen/wssocks/wss/proxy_server.go:167 +0x1b1
github.com/genshen/wssocks/wss.establishProxy(0xc000218300, 0xe0bba4aaac9dcf0b, 0x8589f794af70326e, 0x5907997a, 0x0, 0xc000018320, 0x15, 0x0, 0x0, 0x0)
        /go/src/github.com/genshen/wssocks/wss/proxy_server.go:119 +0xd9
created by github.com/genshen/wssocks/wss.(*Hub).Run
        /go/src/github.com/genshen/wssocks/wss/hub.go:64 +0x225

lots of use of closed connections in logs

ERRO[0460] copy error,read tcp 192.168.139.216:58185->142.250.74.98:443: use of closed network connection
ERRO[0460] copy error,read tcp 192.168.139.216:58173->172.217.21.162:443: use of closed network connection
ERRO[0460] copy error,read tcp 192.168.139.216:58234->213.19.162.61:443: use of closed network connection
ERRO[0490] copy error,read tcp 192.168.139.216:58166->15.188.95.229:443: use of closed network connection
ERRO[0423] write error: read tcp 127.0.0.1:1080->127.0.0.1:58240: use of closed network connection
ERRO[0424] write error: read tcp 127.0.0.1:1080->127.0.0.1:58249: use of closed network connection
ERRO[0424] write error: read tcp 127.0.0.1:1080->127.0.0.1:58250: use of closed network connection
ERRO[0425] write error: read tcp 127.0.0.1:1080->127.0.0.1:58258: use of closed network connection
ERRO[0434] write error: read tcp 127.0.0.1:1080->127.0.0.1:58260: use of closed network connection

related #9 ?

[BUG]I cannot use HTTP proxy

LOG:

ERRO[0512] http body copy error: failed to write JSON message: failed to get writer: WebSocket closed: sent close frame: status = StatusNormalClosure and reason = "the sky is falling"
ERRO[0678] error reading webSocket message:failed to get reader: received close frame: status = StatusNormalClosure and reason = ""
ERRO[0807] error reading webSocket message:failed to get reader: failed to read frame header: EOF
github.com/genshen/wssocks/wss.(*BufferedWR).Close(0x0, 0x0, 0x0)
        /root/m/wss/buffered_reader_writer.go:19 +0x42
github.com/genshen/wssocks/wss.(*HttpProxyEst).Close(0xc00000e150, 0xc00020be00, 0xc00003d5c8, 0x0)
        /root/m/wss/proxy_server.go:209 +0x2e
github.com/genshen/wssocks/wss.(*Hub).Close(0xc000200d00)
        /root/m/wss/hub.go:37 +0x104
panic(0x74bb40, 0xa706d0)
        /usr/local/go/src/runtime/panic.go:969 +0x1b9
github.com/genshen/wssocks/wss.(*BufferedWR).Close(0x0, 0x0, 0x0)
        /root/m/wss/buffered_reader_writer.go:19 +0x42
github.com/genshen/wssocks/wss.(*HttpProxyEst).onData(0xc00000e150, 0x3, 0xaae950, 0x0, 0x0, 0x0, 0x0)
        /root/m/wss/proxy_server.go:200 +0xa5
github.com/genshen/wssocks/wss.dispatchDataMessage(0xc000200d00, 0xc000016600, 0x50, 0x600, 0xc000010101, 0x7ffde506e353, 0x9, 0x0, 0x0, 0x0)
        /root/m/wss/proxy_server.go:99 +0x6fe
github.com/genshen/wssocks/wss.dispatchMessage(...)
        /root/m/wss/proxy_server.go:42
github.com/genshen/wssocks/wss.(*ServerWS).ServeHTTP(0xc000054de0, 0x8a9bc0, 0xc0000ae2a0, 0xc0000c6700)
        /root/m/wss/wssocks_server.go:64 +0x47d
net/http.(*ServeMux).ServeHTTP(0xa7dc60, 0x8a9bc0, 0xc0000ae2a0, 0xc0000c6700)
        /usr/local/go/src/net/http/server.go:2417 +0x1ad
net/http.serverHandler.ServeHTTP(0xc0000ae000, 0x8a9bc0, 0xc0000ae2a0, 0xc0000c6700)
        /usr/local/go/src/net/http/server.go:2843 +0xa3
net/http.(*conn).serve(0xc000071040, 0x8aa440, 0xc000200b00)
        /usr/local/go/src/net/http/server.go:1925 +0x8ad
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:2969 +0x36c

authentication mechanism

I think it will be wonderful if clients can be authenticated, you can check out my fork, I used HTTP header to validate the key. ;)

systemd service files

can you provide systemd service file for server and client and also add restart section so if the server crashed, systemd will restart it

something like this

[Unit]
Description=WssocksService
Documentation=https://github.com/genshen/wssocks
After=network.target nss-lookup.target

[Service]
# If the version of systemd is 240 or above, then uncommenting Type=exec and commenting out Type=simple
#Type=exec
Type=simple
# This service runs as root. You may consider to run it as another user for security concerns.
# By uncommenting User=nobody and commenting out User=root, the service will run as user nobody.
# More discussion at https://github.com/v2ray/v2ray-core/issues/1011
User=root
#User=nobody
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ExecStart=/usr/bin/wssocks server -addr 127.0.0.1:1080
Restart=on-failure

[Install]
WantedBy=multi-user.target

Client-side force closes

I download the latest version from releases now and set up server-side with status page and HTTP proxy also use haproxy as TLS injector and also run client-side with HTTP proxy support, everything is okay until open connections reach about 50-60 concurrent connections, after that the client-side closes but the server-side still running
for example, I connect Telegram Desktop to proxy and use proxy in firefox and just open one page
I used these commands
for server
./wssocks-linux-amd64 server -addr :80 -auth -auth_key password -status -http
and for client
./wssocks-linux-amd64 client -addr :1080 -http -http-addr :8080 -key password -remote wss://wssocks.**.org:443

separate client and server

I see the server and client is same, mean client have unused resources or maybe codes (!! I don't know and just think) if you can, please separate the client from the server and remove status page resources (html, css, js) and other things from that
I just want to build the project and see the below error in yarn
error An unexpected error occurred: "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.24.0.tgz: Request failed \"404 Not Found\"".
if you can make status page optional so can easily ignore that, I want to build this project for android but the size after build is about 9 Megabytes and after strip size changes to ~=6 Megabytes, I think if the can remove unused things in client side, can make it smaller than 6 Megabytes

thanks so much

UDP support

Did you have any plan to implement a way to transfer UDP packets through the TCP connection?

For example v2ray can do it

Connection error on Windows

Edit: Disregard -- the firewall was preventing outgoing connections from the client.

It works great on both Linux and Windows (and will soon be testing on Mac client as well). Thanks.

(Feel free to delete this issue)

请问这个代理是单线程的吗?

我在使用这个代理的时候发现如果有一个连接在接收数据的时候,其他的连接会全部挂起,所以这个软件同时只能建立一条连接吗?

Client closes unexpectedly with no error messages

Im using wssocks both client and server. everything seems to work fine but after some time the connection from client to server (wssocks client) just Unexpectedly crashes out with no error messages. I see there's already an open issue about Client/Server Limitation (#21). My Issue though resides with the client crash. I will provide logs soon.

client close due to message too big

code version: 3ef1c35 (2020/07/08)

server side log:

./wssocks server --auth --auth_key=122
INFO[0000] connection authentication key: 122
INFO[0000] listening for incoming messages.              listen address=":1088"
ERRO[0018] copy error,failed to write JSON message: failed to marshal JSON: failed to write: failed to write data frame: failed to write frame: WebSocket closed: received close frame: status = StatusMessageTooBig and reason = "read limited at 32769 bytes"
ERRO[0018] error reading webSocket message:failed to get reader: received close frame: status = StatusMessageTooBig and reason = "read limited at 32769 bytes"
panic: send on closed channel

goroutine 34 [running]:
github.com/genshen/wssocks/wss.establishProxy(0xc00008e320, 0xc834246b3935920b, 0x9914bc9d5e10f2c0, 0x9b24587f, 0x0, 0xc0000c2360, 0x11, 0x0, 0x0, 0x0)
        GOPATH/src/github.com/genshen/wssocks/wss/proxy_server.go:122 +0x215
created by github.com/genshen/wssocks/wss.(*Hub).Run
        GOPATH/src/github.com/genshen/wssocks/wss/hub.go:75 +0x226

client side log:

./wssocks client --remote ws://localhost:1088 --key 122
INFO[0000] http(s) proxy is disabled.
INFO[0000] connecting to wssocks server.                 remote="ws://localhost:1088"
INFO[0000] connected to wssocks server.                  remote="ws://localhost:1088"
INFO[0000] server version                                compatible version code=3 version code=3 version number=0.4.1
INFO[0000] listening on local address for incoming proxy requests.  socks5 listen address=":1080"
ERRO[0010] error websocket read:failed to read: read limited at 32769 bytes
ERRO[0010] accept tcp [::]:1080: use of closed network connection
TARGETs               CONNECTIONs
203.208.50.65:443     1
TOTAL                 1

When downloading a file, the package received from server may be large, then client can close the websocket connection due to message too big.
While in server side, due to the disconnection of websocket, server will perform post steps of this ws connection ( e.g. close channels) , which can cause fail to read from a close channel error when writing tellClose via the closed channel in post steps of proxy connection.

客户端命令遇错

hi.

yudeMacBook-Air:~ brite$ ./wssocks-darwin-amd64 client -addr 127.0.0.1:1082 --remote wss://mydomain.com --key 316C5EBF1C04CC21B5019CC0
INFO[0000] http(s) proxy is disabled.
INFO[0000] connecting to wssocks server. remote="wss://mydomain.com"

FATA[0002] establishing connection error:failed to WebSocket dial: expected handshake response status code 101 but got 400
yudeMacBook-Air:~ brite$

怎么解决?

multi-threading

hi,
This is a awesome tool, however I found that it is single-threaded.
For example, I couldn't open a web page when downloading a file...

thanks,
Tobias.

`write: broken pipe` error in wssocsk client after making an interruption in sftp file uploading.

version

wssocks version: 0.5.0-beta.3 (both client and server)
OS: mac 10.15.7 (19H15)

How to

Setup sftp connection via sftp client. Then put a file. While file uploading, press CTR+C to make an interruption, then
it can close wssocks client unexpectedly.

./wssocks client --addr 127.0.0.1:1082 --remote wss://xxxxxx.me/

sftp -o ProxyCommand='nc -x 127.0.0.1:1082 %h %p' docker
>  put scd.mov
Uploading scd.mov to /home/docker/scd.mov
scd.mov                                        56% 3488KB   1.6MB/s   00:01 ETA^Interrupt  
client_loop: send disconnect: Broken pipe

logs

INFO[0002] listening on local address for incoming proxy requests.  socks5 listen address=":1080"
ERRO[0022] write tcp 127.0.0.1:1080->127.0.0.1:58788: write: broken pipe 
ERRO[0022] error websocket read:failed to get reader: WebSocket closed: failed to acquire lock: context canceled 
ERRO[0022] write error:failed to write JSON message: failed to get writer: failed to acquire lock: context canceled 
ERRO[0022] accept tcp [::]:1080: use of closed network connection 
TARGETs     CONNECTIONs     
TOTAL       0 

Docker image not updated

Please can you continue uploading images to dockerhub? I'm using server purelly in docker and I have to make my own images when I want new version

Log Report

time="2020-03-24T21:21:47+08:00" level=info msg="http(s) proxy is disabled."
time="2020-03-24T21:21:47+08:00" level=info msg="connecting to wssocks server." remote="wss://xxxxx/proxy"
time="2020-03-24T21:21:50+08:00" level=info msg="connected to wssocks server." remote="wss://xxxxx/proxy"
time="2020-03-24T21:21:50+08:00" level=info msg="server version" compatible version code=3 version code=3 version number=0.4.1
time="2020-03-24T21:21:50+08:00" level=info msg="listening on local address for incoming proxy requests." socks5 listen address="localhost:8000"
time="2020-03-24T21:22:42+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64782: use of closed network connection"
time="2020-03-24T21:22:42+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64783: use of closed network connection"
time="2020-03-24T21:23:21+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64808: use of closed network connection"
time="2020-03-24T21:23:21+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64807: use of closed network connection"
time="2020-03-24T21:23:21+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64809: use of closed network connection"
time="2020-03-24T21:23:21+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64804: use of closed network connection"
time="2020-03-24T21:23:21+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64806: use of closed network connection"                             10
time="2020-03-24T21:23:22+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64805: use of closed network connection"g:443                        1
time="2020-03-24T21:23:22+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64815: use of closed network connection"services.mozilla.com:443     1
time="2020-03-24T21:23:22+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64818: use of closed network connection"                             4
time="2020-03-24T21:23:22+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64820: use of closed network connection"g:443                        1
time="2020-03-24T21:23:22+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64825: use of closed network connection"                             2
time="2020-03-24T21:23:22+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64817: use of closed network connection"com:443                      1
time="2020-03-24T21:23:22+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64812: use of closed network connection"illa.com:443                 1
time="2020-03-24T21:23:22+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64816: use of closed network connection"com:443                      1
time="2020-03-24T21:23:22+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64819: use of closed network connection"g:443                        1
time="2020-03-24T21:23:22+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64814: use of closed network connection"com:443                      1
time="2020-03-24T21:23:22+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64813: use of closed network connection"g:443                        1
time="2020-03-24T21:23:22+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64824: use of closed network connection"                             6
time="2020-03-24T21:23:22+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64826: use of closed network connection"                             4
time="2020-03-24T21:23:22+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64823: use of closed network connection"illa.com:443                 1
time="2020-03-24T21:23:22+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64822: use of closed network connection"com:443                      1
time="2020-03-24T21:23:22+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64827: use of closed network connection"                             6
time="2020-03-24T21:23:22+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64821: use of closed network connection"g:443                        1
time="2020-03-24T21:27:42+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:65168: use of closed network connection"      3
time="2020-03-24T21:27:42+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64771: use of closed network connection"      3
time="2020-03-24T21:27:42+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64770: use of closed network connection"3     1
time="2020-03-24T21:27:42+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64772: use of closed network connection"3     1
time="2020-03-24T21:27:42+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64776: use of closed network connection"3     1
time="2020-03-24T21:27:42+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:64911: use of closed network connection"3     1               21
time="2020-03-24T21:27:49+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:65198: use of closed network connection"illa.com:443     2
time="2020-03-24T21:30:24+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:65304: use of closed network connection"3                1
time="2020-03-24T21:30:24+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:65307: use of closed network connection"illa.com:443     1
time="2020-03-24T21:30:24+08:00" level=error msg="write error:read tcp 127.0.0.1:8000->127.0.0.1:65308: use of closed network connection"illa.com:443     1

I think the performance compared to the older version is dropped.

how many clients can connect to one server?

can I use this project in production?
I see sometimes server closed as client closed, is this correct?
can you change this to always alive server even some clients disconnected or new clients connected

Backend ssl/tls support

I trying to import generated SSL into server-side and I can't so I decided to put Nginx as a proxy server and put SSL into it, but when I use wss://server:443 I see bad handshake error in client-side, what is the problem and how I can put an SSL proxy middle of the connection?

ability to change websocket path of server, and set request headers in client

it's great if we can set a path for websocket connection or even add new headers in the client, for example, I want to use the client as
wssocks -remote wss://remote.domain:443/path
and add some headers to client like this
wssocks -header "X-Custom-Header=somevalue" -header "X-Second-Header=anothervalue"

Feature Request: Permit reverse proxy

So this is a great program. But what I would love is a reverse socks tunnel feature. So that you could have a client connect to a server and bind a local port on the server to listen and tunnel into the client's network. This is great if you have a client that doesnt have a public IP but you need to be able to reach into it's network. This is equivalent to ssh's -R option:

ssh -R 9050 [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.