qdm12 / ss-server

Shadowsocks server to use with Docker and to integrate in other Go programs
MIT License
18 stars 1 forks source link

Make it possible to supply a custom dialer #49

Open talentlessguy opened 4 months ago

talentlessguy commented 4 months ago

Hello, I would like to be able add a custom net.Dialer and currently there's no way to do it.

I see here though that you are using net.Dial:

https://github.com/qdm12/ss-server/blob/b45f1c2d922e2f6fa08aa730677fd9556466132b/pkg/tcp/server.go#L101

So this should be straightforward to add

qdm12 commented 4 months ago

For sure! What's the use case if I may ask? 🤔

qdm12 commented 4 months ago

The code is ready in https://github.com/qdm12/ss-server/pull/51, but I just want to see the use case, since perhaps it can be simpler/stricter (i.e. just choose the dialer timeout etc.)

talentlessguy commented 1 month ago

the use case is redirecting traffic from shadow socks to another proxy, thus making a conditional proxy chain

I implemented it already in my project so no worries, this feature doesn't have to be pushed