Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

增加 SOCKS5 的用户认证 #135

Open
Liki4 opened this issue Oct 11, 2021 · 0 comments
Open

增加 SOCKS5 的用户认证 #135

Liki4 opened this issue Oct 11, 2021 · 0 comments

Comments

@Liki4
Copy link

Liki4 commented Oct 11, 2021

在很多场景下 SOCKS5 代理服务器都应该有认证服务,而并非直接暴露

在配置文件及 config 模块里新增 socks5username, password 字段
在 internal/util/client.go#L26 处
将第三处的 nil 改为 Auth 结构体

dialer, err := proxy.SOCKS5("tcp", config.Socks5, config.Socks5Auth, proxy.Direct)

参考 https://pkg.go.dev/golang.org/x/net/proxy#SOCKS5
https://pkg.go.dev/golang.org/x/net/proxy#Auth

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

No branches or pull requests

1 participant