Squid 作为 https 代理不起作用

Squid 作为 https 代理不起作用

我正在尝试运行 squid 代理

我已尝试按照这里所说的去做:

https://www.tecmint.com/install-squid-in-ubuntu/

但它不起作用。

这是我的squid.conf:(所有其他行都是#)

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12  # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
#acl localnet src fc00::/7       # RFC 4193 local private network range
#acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines
acl localnet src 10.0.0.188 # David Computer
acl SSL_ports port 443
acl Safe_ports port 80      # http
acl Safe_ports port 21      # ftp
acl Safe_ports port 443     # https
acl Safe_ports port 70      # gopher
acl Safe_ports port 210     # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280     # http-mgmt
acl Safe_ports port 488     # gss-http
acl Safe_ports port 591     # filemaker
acl Safe_ports port 777     # multiling http
acl CONNECT method CONNECT

acl bad_urls dstdomain "/etc/squid/blacklisted_sites.acl"
acl good_url dstdomain "/etc/squid/good_sites.acl"
#http_access deny bad_url


# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# Only allow cachemgr access from localhost
http_access allow localhost manager

http_access deny manager


#http_access allow localnet
http_access allow localhost

# And finally deny all other access to this proxy

#http_access deny all
http_access allow all

# Squid normally listens to port 3128
http_port 3128 transparent

acl bloclsite1 dstdomain yahoo.com
acl blocksite2 dstdomain www.rediff.com
#http_access deny www.yahoo.com
#http_access deny blocksite1

acl blockkeyword1 url_regex gmail
http_access deny bad_urls
http_access allow good_url
http_access deny blockkeyword1

所有站点均出现 ERR_TIMED_OUT

有人可以解释一下原因吗?或者可以发送一个简单的工作配置文件的链接?

答案1

当您使用 squid 作为 http(s) 代理时,您正在执行 MTM。具有 HSTS 的站点将不接受代理和浏览器之间的流量通过 http 运行。如果您想使用 https 代理,则需要创建自己的证书并将其导入浏览器。您可以尝试以下操作:https://elatov.github.io/2019/01/using-squid-to-proxy-ssl-sites/

相关内容