Squid4 不写入 access.log

Squid4 不写入 access.log

我正在遵循这个指南安装

配置运行sudo /usr/sbin/squid -YC --foreground -f /opt/conf/squid/squid.conf

acl localnet src 10.0.0.0/8
acl localnet src 172.16.0.0/12
acl localnet src 192.168.0.0/16
acl localnet src fc00::/7
acl localnet src fe80::/10
acl SSL_ports port 443 
acl Safe_ports port 80          
acl Safe_ports port 21          
acl Safe_ports port 443         
acl Safe_ports port 70          
acl Safe_ports port 210         
acl Safe_ports port 1025-65535  
acl Safe_ports port 280         
acl Safe_ports port 488         
acl Safe_ports port 591         
acl Safe_ports port 777         
acl CONNECT method CONNECT
acl step1 at_step SslBump1
acl step2 at_step SslBump2
acl step3 at_step SslBump3
acl ssl_skip_bump req_header X-SSL-Bump -i skip
acl ssl_force_bump req_header X-SSL-Bump -i force
acl cache_exclude_contenttype rep_mime_type "/opt/conf/squid/cache/exclude/contenttype.conf"
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localnet
http_access allow localhost
http_access deny all
http_port 3128 \
  ssl-bump \
  generate-host-certificates=on \
  dynamic_cert_mem_cache_size=4MB \
  cert=/opt/conf/certs/CyberSaiyan-mitm.pem
ssl_bump splice localhost
ssl_bump splice ssl_skip_bump
ssl_bump peek step1 all
ssl_bump bump ssl_force_bump
ssl_bump bump all
sslcrtd_program /usr/lib/squid/security_file_certgen -s /var/spool/squid_ssldb -M 4MB
refresh_pattern ^ftp:       1440    20% 10080
refresh_pattern ^gopher:    1440    0%  1440
refresh_pattern -i (/cgi-bin/|\?) 0 0%  0
refresh_pattern -i \.(gif|png|jpg|jpeg|ico)$ 3600 90% 43200
refresh_pattern .       0   20% 4320
shutdown_lifetime 3 seconds
access_log stdio:/var/log/squid/access.log combined
visible_hostname proxy.local
dns_v4_first on
forwarded_for on
memory_replacement_policy heap GDSF
cache_mem 1024 MB
maximum_object_size_in_memory 4 MB

如果在运行前删除,则创建成功,但内容access.log为空。这可能是什么原因造成的?cache.logaccess.log

注意:有时它有效,有时则无效。

127.0.0.1 - - [11/Apr/2020:19:21:07 +0700] "CONNECT content.x.com:443 HTTP/1.1" 200 39 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) hakuneko-desktop/1.0.0 Chrome/76.0.3809.146 Electron/6.1.7 Safari/537.36" TCP_TUNNEL:HIER_DIRECT
127.0.0.1 - - [11/Apr/2020:19:21:08 +0700] "CONNECT content.x.com:443 HTTP/1.1" 200 39 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) hakuneko-desktop/1.0.0 Chrome/76.0.3809.146 Electron/6.1.7 Safari/537.36" TCP_TUNNEL:HIER_DIRECT

相关内容