Squid所在目录“/etc/squid” 。root用户直接squid start即可。当然默认连接是deny的。
核心配置文件是/etc/squid/squid.conf, 然该文件3K行,所以多用查找找到自己想修改的配置。
本次主要是DNS总是出错,解决方法 关于代理的DNS配置,注释如下:
Default:
# dns_defnames off# TAG: dns_nameservers
# Use this if you want to specify a list of DNS name servers
# (IP addresses) to use instead of those given in your
# /etc/resolv.conf file.
# On Windows platforms, if no value is specified here or in
# the /etc/resolv.conf file, the list of DNS name servers are
# taken from the Windows registry, both static and dynamic DHCP
# configurations are supported.
#
# Example: dns_nameservers 10.0.0.1 192.172.0.4
#
#Default:
# none
配成如下dns_nameservers 202.96.209.6 202.106.148.1 202.106.0.20 202.97.16.195,即代替了系统DNS配置。本质都一样。
如果想省事,直接配上http_access allow all
服务器启动,直接 squid start.
指定端口squid -a 8080,
关闭squid -k shutdown.
重新配置 squid -k reconfigure