genshen / wssocks

socks5 over websocket
MIT License
147 stars 27 forks source link

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

Closed mokhtarabadi closed 3 years ago

mokhtarabadi commented 3 years ago

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"

mokhtarabadi commented 3 years ago

Hi @genshen, thanks for your works and attention, please also update the help section in the project mean how I can set path in server-side

genshen commented 3 years ago

sorry for the late reply. You can use the latest code and just set --ws_base_path flag (default is "/") in server side.
e.g:

./wssocks server --ws_base_path abc
./wssocks client --remote ws://localhost:1088/abc

For more information, you can see wssocks server --help and wssocks client --help.