使用squid作为代理服务器,设置用户及IP验证。能正常使用,用户头像无法显示。查看squid log 报以下错误:
1642491709.632 0 10.9.18.24 TCP_DENIED/407 4472 GET http://wx.qlogo.cn/mmhead/ver_1/L9oZ33khydCiai- HIER_NONE/- text/html
1642491709.654 1 10.9.18.24 TCP_DENIED/407 4464 GET http://wx.qlogo.cn/mmhead/ver_1/KFrDrCcQhaeXI2jsX5xWHl8a146DUrop8ujdmbyH091d04/132 - HIER_NONE/- text/html
1642491709.654 1 10.9.18.24 TCP_DENIED/407 4472 GET http://wx.qlogo.cn/mmhead/ver_1/WAiapRzpGVMPTMFAxUYIibRzsIbfOh7syibh5WekGX5DFhBL1Ribic5Lg/132 - HIER_NONE/- text/html
1642491709.655 1 10.9.18.24 TCP_DENIED/407 4480 GET http://wx.qlogo.cn/mmhead/ver_1/Ypc9iaJczibO9oEbrAgbtFCV2Evib4dEBpOibyCzGB541CfYZxyW2cM2QmxMicvY/132 - HIER_NONE/- text/html
1642491967.954 85 10.9.18.24 TCP_TUNNEL/200 2222 CONNECT 183.3.224.144:80 wx HIER_DIRECT/183.3.224.144 -
1642491967.973 110 10.9.18.24 TCP_TUNNEL/200 427 CONNECT 183.3.224.144:80 wx HIER_DIRECT/183.3.224.144 -
可以看出来 只有 头像没有调用用户验证,其他都是正常的。
我测试的结果是使用用户验证的就会出现头像不正常情况, 使用IP验证就所有功能都正常。
squid配置如下:
acl localnet src 10.9.18.24
acl localnet src 10.9.20.76 #
acl localnet src 10.9.20.96 #
acl localnet src 10.9.10.19 #
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwords
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 1 hours
auth_param basic casesensitive off
acl authenticated proxy_auth REQUIRED
http_access allow localnet authenticated
http_access deny all
dns_v4_first on
forwarded_for delete
header_access Via deny all
header_access X-Forwarded-For deny all
加到结尾试试