A way to prevent squid login popup

Squid Proxy Authentication

简单的说,其就是客户端访问Squid时,当squid.conf里的配置里有proxy_auth时, 其需要做验证,当客户单头里没有带proxy_auth时,Squid会返回407,告诉客户端(浏览器)需要带用户名和密码进行验证,浏览器就会弹出popup,这个popup是浏览器内部集成的(build-in)。

官方给出的How do I prevent Login Popups?

http_access deny mustLogin all,但是并没用,依旧弹出

分析

弹出popup,是需要验证,但是客户端没有头里没有带,或者带的用户名和密码验证不过。

如果对于没有满足验证通过的,我直接不处理,扔掉请求

miss_access Determines whether network access is permitted when satisfying a request.

当acl满足时,miss_access allow acl_name ,当满足acl_name时,处理,否则不处理

acl radius-auth proxy_auth REQUIRED

miss_access allow radius-auth

http_access allow localhost

http_access deny all

效果

当不满足通过请求时,直接不处理请求,客户端的效果是ERR_CONNECTION_TIMED_OUT



发现,当用户过期后,auth_param basic credentialsttl 5 minute,miss_access不生效,而http_access会生效。

你可能感兴趣的:(A way to prevent squid login popup)