v2ray-core icon indicating copy to clipboard operation
v2ray-core copied to clipboard

http认证无法使用

Open sunshineplan opened this issue 9 years ago • 7 comments

传入设置为: "inbound": { "port": 1080, "listen": "127.0.0.1", "protocol": "http", "settings": { "timeout": 0, "accounts": [ { "user": "user", "pass": "pass" } ], "allowTransparent": false } }

Windows10系统IE代理设置填入IP和端口后,打开网站没有跳出认证框,报401错误 Windows10系统下Chrome和Firefox浏览器,使用SwitchyOmega插件设置HTTP代理,输入不输入认证信息,都报401错误 报401错误的时候日志无任何输出(debug级别) v2ray的http代理关闭认证能正常使用

sunshineplan avatar Nov 18 '17 03:11 sunshineplan

同样 SwitchyOmega 中 http/https 无法验证,但是其他原生支持 https/https 账户密码验证的程序(QQ、Proxifier)可以正常通过验证并使用,所以觉得 V2Ray 提供的验证功能没问题,应该是的 SwitchyOmega 的问题。

BTW 一般需要设置 socks5/http(s) 账户密码验证的场景肯定DS不是本地计算机,多是 LAN Server 或者暴露的 Public Server。

我因为使用 Chrome+SwitchyOmega 的原因,解决办法是本地PC上开 V2Ray 配置 socks5 传入无验证(供程序)、传出 socks5 带账户密码验证信息(供 socks5 服务器验证)。

(Programs)-->socks5-->(V2Ray)-->socks5(user:pass)-->(socks5 server)...

ghost avatar Nov 18 '17 11:11 ghost

我也遇到了同样的问题。 不光是 switchy,其他HTTP 代理同样无法认证。 v2ray 的http 认证存在问题,错误代码401。

cnperi avatar Nov 18 '17 11:11 cnperi

新版本2.51,http认证还是无法使用,症状和原来的相同,唯一区别是从原来的报错401变为新修改的407

根据@BenhoNNNN 所说的,我试了qq登录使用代理的确可用,但是Dropbox,Windows系统自带,SwitchyOmega还是不行。

最后查了下,估计Windows系统自带代理设置和SwitchyOmega使用的是Digest access authentication(HTTP摘要认证)并不是Basic access authentication。所以还想问一下以后会有加入Digest access authentication的打算么?

sunshineplan avatar Nov 24 '17 02:11 sunshineplan

哦,文档里说了只支持Basic,其它的还没有计划支持。如果有兴趣可以PR

DarienRaymond avatar Nov 24 '17 08:11 DarienRaymond

@DarienRaymond 目前PR是不太可能,毕竟水平不行,看代码就很吃力了。

不过我还是仔细研究了下Basic access authentication的协议,我发现可能只是服务器端少返回一个信息的缘故。 https://en.wikipedia.org/wiki/Basic_access_authentication#Server_side 除了应该返回原本的401以外,还需要返回一个WWW-Authenticate域,格式为WWW-Authenticate: Basic realm="User Visible Realm"

sunshineplan avatar Nov 25 '17 12:11 sunshineplan

期待支持http认证

catchfishday avatar Apr 28 '19 03:04 catchfishday

https://www.69xinshu.com/网站报401 Unauthorized;使用Clash for Windows v0.20.30可以正常进入网站

caipeiqq avatar Feb 17 '24 01:02 caipeiqq