Squid for window

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lzx_2011/article/details/74347922

Squid 是一款非常通用的、开源的(GNUGPL)Web 缓存代理软件。支持 HTTP、HTTPS 和 FTP 协议。
下载地址:下载地址: http://www.acmeconsulting.it/SquidNT.html

最好解压到 c:/squid 目录下,因为配置文件中很多默认目录都在该目录下

C:\squid\etc目录下,复制默认文件 squid.conf.defaultmime.conf.default 生成两个新文件 squid.confmime.conf

修改配置文件

修改 C:\squid\etc\squid.conf

找到 TAG: acl 段,定义访问 Squid 的 IP 地址及其对应的名称

acl name1 src 192.168.100.0         // “acl 名称 src IP地址”    

名称是给允许访问的ip段起的名字

找到 TAG: http_access 段,这里是定义允许访问 squid 的列表,在此段 http_access deny CONNECT !SSL_ports 后增加一个新行

http_access allow name1
http_access deny all

修改端口号

http_port 8080

hosts位置

hosts_file c:/Windows/System32/drivers/etc/hosts

cache_dir等设置

cache_mem 8 MB
visible_hostname supersrv  #将hostname设置为supersrv

启动

c:\>cd c:\squid\sbin
C:\squid\sbin>squid -i    (注册Squid为Windows的服务,默认的服务名为SquidNT,可以使用“管理工具”中的“服务”来启动/停用服务)
C:\squid\sbin>squid -z    (生成高速缓存的目录)
C:\squid\sbin>net start squid       (启动squid服务,另一种比较好的方法是在“管理工具”,“服务”中选择SquidNT,然后选择启动服务)

window的几个命令

c: 
dir    //相当于linux的ls

参考资料

squid for windows 配置代理服务器
Squid配置之限制IP访问

猜你喜欢

转载自blog.csdn.net/lzx_2011/article/details/74347922
今日推荐