【发布时间】:2016-12-28 19:52:41
【问题描述】:
我的路由器上有一个 TinyProxy 代理,它将流量发送到不在 LAN 上的外部父 Squid 代理进行处理。我向 Squid 添加了授权,因此它不会完全向世界开放(如果用户将浏览器指向 squid 代理,则必须提供用户名和密码,这样才能正常工作)。
查看 TinyProxy 手册页,我可以看到可以通过 tinyproxy 向 Squid 父级发送基本授权标头信息,但是当我尝试这样做时,它没有正确验证(没有浏览器配置。这是一个透明代理),我在 Squid 端遇到访问错误。以下是 TinyProxy.conf 手册页的摘录:
AddHeader "X-My-Header" "Powered by Tinyproxy"
如果允许在 Squid 上使用的用户具有用户名:test 和密码:test1234,密码哈希:123456789,这是我在 TinyProxy.conf 文件中包含的内容:
AddHeader "Proxy-Authorization" "Basic test:123456789"
当我尝试访问 HTTP 站点时,它没有正确验证。格式不对吗?
也供参考,这里是我的squid.conf
auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/passwords
auth_param basic realm proxy
acl authenticated proxy_auth REQUIRED
http_access allow authenticated
#http_access allow all
http_port 3128
【问题讨论】:
标签: proxy squid basic-authentication