Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Chain Shadowsocks #904

Open
PowerPress opened this issue Jul 21, 2022 · 4 comments
Open

Feature Request: Chain Shadowsocks #904

PowerPress opened this issue Jul 21, 2022 · 4 comments

Comments

@PowerPress
Copy link

Is your feature request related to a problem? Please describe.
I would like to create a chain of shadowsocks servers like proxychains
client - ss server - ss server - ss server - ss server -target

Describe the solution you'd like
Have a chain option in shadowsocks

@zonyitoo
Copy link
Collaborator

You can do this with a tunnel:

sslocal(real) -> [sslocal(tunnel) -> ssserver] -> [sslocal(tunnel) -> ssserver] -> ssserver(real)

@PowerPress
Copy link
Author

Could you give me an example of commands to do this?

@zonyitoo
Copy link
Collaborator

Let's say if you have a server running on 100.100.100.200:1234, and there is a server in the middle listening on 100.100.100.101:2345, then:

Local server:

sslocal -b '127.0.0.1:1080' -s '100.100.100.101:2345' -m 'aes-128-gcm' -k 'TARGET_SERVER_PWD'

Middle server:

# Start a sslocal with tunnel protocol, forwarding all data to 100.100.100.200:1234
sslocal -b '100.100.100.101:2345' --protocol tunnel -s '127.0.0.1:8888' -m 'plain' -k '' --forward-addr '100.100.100.200:1234'

# Start a ssserver locally
ssserver -b '127.0.0.1:8888' -m 'plain' -k ''

Target server:

ssserver -s '100.100.100.200:1234' -m 'aes-128-gcm' -k 'TARGET_SERVER_PWD'

BUT. This is slow, because all the middle servers must run both sslocal and ssserver. Actually you can simply make a dummy TCP, UDP tunnel proxy server with any languages you want:

sslocal -> [Tunnel Proxy server 1] -> [Tunnel Proxy server 2] -> ssserver

Some possible choices:

  1. v2ray-plugin, running in standalone mode
  2. https://github.com/Qv2ray/mmp-go

@peterwillcn
Copy link
Contributor

Implement port hopping

Users in China sometimes report that their ISPs block or throttle persistent UDP connections. However, these restrictions often only apply to the specific port being used. Port hopping can be used as a workaround for this situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants