我能够使用 Dante socks 代理配置 socks4、socks5 和 socks5 的身份验证,但我不知道如何配置 socks4 的身份验证。我知道 socks_v4 代理仅支持 userId(不是密码)。
我的 danted.conf 文件如下所示:
logoutput: syslog
internal: eth0 port =1081
external: eth0
user.privileged: root
user.unprivileged: nobody
socksmethod: username
clientmethod: none
client pass {
from: 0.0.0.0/0
to: 0.0.0.0/0
log: error
}
socks pass {
from: 0.0.0.0/0
to: 0.0.0.0/0
command: bind connect udpassociate
protocol: tcp udp
proxyprotocol: socks_v4
log: error
socksmethod:username
}
我得到了错误
#username and password
curl -x socks4://user1:user1@x.2xx.1xx.x:1081 http://google.com
curl: (7) Can't complete SOCKS4 connection to 142.250.73.206:80. (91), request rejected or failed.
#just username
curl -x socks4://user1@x.2xx.1xx.x:1081 http://google.com
curl: (7) Can't complete SOCKS4 connection to 142.250.73.206:80. (91), request rejected or failed.
#no auth
curl -x socks4://x.2xx.1xx.x:1081 http://google.com
curl: (7) Can't complete SOCKS4 connection to 142.250.73.206:80. (91), request rejected or failed.