我正在运行 OpenSUSE 13.2 并通过 yast 安装了 squid。我想缓存本地主机上的所有内容、网页、ISO、分发包。
问题是我的 /var/cache/squid 目录保持 20MB,当我下载 ISO 时,它仍然从服务器而不是代理下载。
这是我的配置文件:
http_port 3128
refresh_pattern ^ftp: 1440 20 10080
refresh_pattern ^gopher: 1440 0 1440
refresh_pattern . 1440 20 4320
#refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
# RFC 1918 possible internal network
# RFC 1918 possible internal network
# RFC 1918 possible internal network
# RFC 4193 local private network range
# RFC 4291 link-local (directly plugged) machines
# https
# http
# ftp
# https
# gopher
# wais
# unregistered ports
# http-mgmt
# gss-http
# filemaker
# multiling http
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
access_log /var/log/squid/access.log
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
cache_dir ufs /var/cache/squid 99999 16 256
cache_log /var/log/squid/cache.log
cache_mem 99999 MB
cache_mgr webmaster
cache_replacement_policy lru
cache_store_log /var/log/squid/store.log
cache_swap_high 95
cache_swap_low 90
client_lifetime 1 days
connect_timeout 2 minutes
emulate_httpd_log off
error_directory /usr/share/squid/errors/en
ftp_passive on
maximum_object_size 99999 KB
memory_replacement_policy lru
minimum_object_size 0 KB
谢谢!