xjasonlyu / tun2socks

tun2socks - powered by gVisor TCP/IP stack
https://github.com/xjasonlyu/tun2socks/wiki
GNU General Public License v3.0
2.84k stars 403 forks source link

[Feature] Add username/password support in `-proxy` parameter #359

Closed Niek closed 1 month ago

Niek commented 1 month ago

Description

Right now -proxy allows to pass in a proxy in the [protocol://]host[:port] format. It would be great if this would be [protocol://][username:password@]host[:port]

Is this feature related to a specific bug?

No

Do you have a specific solution in mind?

Add support for proving username and password in the proxy string, as described above.

xjasonlyu commented 1 month ago

Hi there, it's already supported.

Niek commented 1 month ago

Oh wow, I checked the documentation and it seemed not implemented. But I see now that it is: https://github.com/xjasonlyu/tun2socks/blob/0d819e1aec78165ebe55fffd438121496def1c61/engine/parse.go#L115-L124

Thanks, closing now!