🔗 通过 Squid 控制 Skype 访问
重要更新 (2017/03/06),以防止本文误导您认为您已到达正确的位置。
请注意,下一篇文章中提到的方法已不再是最新的 (2017/03/06),并且仅适用于特定设置。使用 ssl-bump 的设置需要比文章中提到的更复杂的概念,才能使 Skype 客户端在有 Squid 的情况下流畅运行。除此之外,Skype 在很多情况下需要直接访问互联网,并且在网络限制非常严格、仅允许通过代理访问的情况下将无法工作。我相信 NTOP 在如何使 Skype 工作或在某些情况下被阻止方面有一些更详细的信息。我推荐查看他们的网站:https://github.com/ntop/nDPI/search?utf8=✓&q=skype
🔗 Squid 配置文件
要包含的配置文件。
由于 FTP 使用数字 IP,因此 Skype ACL 必须精确,包括端口。
🔗 阻止
# Skype
acl numeric_IPs dstdom_regex ^(([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)|(\[([0-9a-f]+)?:([0-9a-f:]+)?:([0-9a-f]+|0-9\.]+)?\])):443
acl Skype_UA browser ^skype
http_access deny numeric_IPS
http_access deny Skype_UA
最近发布的 Skype 版本通过不发送其 User-Agent 标头并使用域名来规避上述限制。以下配置可用于捕获这些安装,但请注意,它也可能捕获其他代理。
acl validUserAgent browser \S+
http_access deny !validUserAgent
🔗 允许
这需要在任何限制性的 CONNECT http_access 控制之前完成。
acl numeric_IPs dstdom_regex ^(([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)|(\[([0-9a-f]+)?:([0-9a-f:]+)?:([0-9a-f]+|0-9\.]+)?\])):443
acl Skype_UA browser ^skype
http_access allow CONNECT localnet numeric_IPS Skype_UA
请注意,Skype 偏好使用 **端口 443**,该端口默认情况下在 Squid 中已启用,因此仅当您通过代理阻止 HTTPS 访问时才需要此配置。
如果您仅将 HTTPS 访问限制为已知网站,那么允许 Skype 将会破坏该策略。
🔗 Metro Skype Windows 10
如果 Skype 感知 Squid SSL-Bump,则需要此配置才能使 Skype 工作。
将这些域名添加到 splice ACL,然后重新配置 Squid。
## Trusted SKYPE addresses
# api.aps|skypegraph|edge Metro Skype requires
(a\.config|pipe|api\.aps|skypegraph|edge)\.skype\.com
# Metro Skype requires
ocsp\.omniroot\.com
trouter\.io
msedge\.net
# messenger.live.com requires for Metro Skype
mobile\.pipe\.aria\.microsoft\.com
messenger\.live\.com
squid.conf 部分应如下所示:
acl NoSSLIntercept ssl::server_name_regex "/usr/local/squid/etc/acl.url.nobump"
ssl_bump splice NoSSLIntercept
⚠️ Disclaimer: Any example presented here is provided "as-is" with no support
or guarantee of suitability. If you have any further questions about
these examples please email the squid-users mailing list.
类别: ConfigExample
导航: 站点搜索, 站点页面, 分类, 🔼 向上