http_port 55313
visible_hostname pr21.fbikey.com
cache_mem 64 MB
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl normal src 0.0.0.0/0
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 1863
acl Safe_ports port 777
acl CONNECT method CONNECT
http_access allow localhost manager
http_access allow normal
icp_access allow all
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_reply_access allow all
icp_access allow all
http_access deny all
acl ip1 myip 204.16.192.24
acl ip2 myip 204.16.192.25
acl ip3 myip 204.16.193.108
acl ip4 myip 204.16.193.141
acl ip5 myip 204.16.193.146
acl ip6 myip 204.16.193.156
acl ip7 myip 204.16.193.165
acl ip8 myip 204.16.193.175
acl ip9 myip 204.16.193.178
acl ip10 myip 204.16.193.180
acl ip11 myip 204.16.193.193
acl ip12 myip 204.16.193.214
acl ip13 myip 204.16.193.244
acl ip14 myip 204.16.193.76
acl ip15 myip 204.16.193.99
acl ip16 myip 204.16.194.99
acl ip17 myip 204.16.194.2
acl ip18 myip 204.16.194.41
acl ip19 myip 204.16.194.53
acl ip20 myip 204.16.194.54
acl ip21 myip 204.16.194.56
acl ip22 myip 204.16.194.57
acl ip23 myip 204.16.195.178
acl ip24 myip 204.16.195.179
acl ip25 myip 204.16.195.180
acl ip26 myip 204.16.195.181
acl ip27 myip 204.16.195.182
acl ip28 myip 204.16.195.190
acl ip29 myip 204.16.195.192
acl ip30 myip 204.16.195.193
acl ip31 myip 204.16.195.194
acl ip32 myip 204.16.196.52
acl ip33 myip 204.16.196.53
acl ip34 myip 204.16.195.54
acl ip35 myip 204.16.196.56
acl ip36 myip 204.16.196.57
acl ip37 myip 204.16.197.139
acl ip38 myip 204.16.197.140
acl ip39 myip 204.16.197.141
acl ip40 myip 204.16.197.142
acl ip41 myip 204.16.197.144
acl ip42 myip 204.16.197.145
acl ip43 myip 204.16.197.146
acl ip44 myip 204.16.197.147
acl ip45 myip 204.16.197.148
acl ip46 myip 204.16.197.68
acl ip47 myip 204.16.197.69
acl ip48 myip 204.16.197.70
acl ip49 myip 204.16.199.240
acl ip50 myip 204.16.199.246
acl ip51 myip 204.16.199.253
acl ip52 myip 205.209.187.156
acl ip53 myip 205.209.187.158
acl ip54 myip 205.209.187.160
acl ip55 myip 205.209.187.161
acl ip56 myip 205.209.187.162
acl ip57 myip 205.209.187.163
acl ip58 myip 205.209.187.164
acl ip59 myip 205.209.187.165
acl ip60 myip 205.209.187.166
acl ip61 myip 205.209.187.168
acl ip62 myip 205.209.187.169
acl ip63 myip 205.209.187.170
acl ip64 myip 205.209.187.171
acl ip65 myip 205.209.187.172
acl ip66 myip 205.209.187.173
acl ip67 myip 205.209.187.174
acl ip68 myip 205.209.187.176
acl ip69 myip 205.209.187.177
acl ip70 myip 205.209.187.178
acl ip71 myip 205.209.187.179
acl ip72 myip 205.209.187.181
acl ip73 myip 205.209.187.182
acl ip74 myip 205.209.187.184
acl ip75 myip 205.209.187.185
acl ip76 myip 205.209.187.186
acl ip77 myip 205.209.187.187
acl ip78 myip 205.209.187.188
acl ip79 myip 205.209.187.189
acl ip80 myip 205.209.187.192
acl ip81 myip 205.209.187.193
acl ip82 myip 205.209.187.194
acl ip83 myip 205.209.187.195
acl ip84 myip 205.209.187.196
acl ip85 myip 205.209.187.197
acl ip86 myip 205.209.187.198
acl ip87 myip 205.209.187.200
acl ip88 myip 205.209.187.201
acl ip89 myip 205.209.187.202
acl ip90 myip 205.209.187.203
acl ip91 myip 205.209.187.204
acl ip92 myip 205.209.187.205
acl ip93 myip 205.209.187.206
acl ip94 myip 205.209.187.208
acl ip95 myip 205.209.187.209
acl ip96 myip 205.209.187.210
acl ip97 myip 205.209.187.211
acl ip98 myip 205.209.187.212
acl ip99 myip 205.209.187.213
acl ip100 myip 205.209.187.214
acl ip101 myip 205.209.187.216
acl ip102 myip 205.209.187.217
acl ip103 myip 205.209.187.218
acl ip104 myip 205.209.187.219
acl ip105 myip 205.209.187.220
acl ip106 myip 205.209.187.221
acl ip107 myip 205.209.187.222
acl ip108 myip 205.209.187.224
acl ip109 myip 205.209.187.225
acl ip110 myip 205.209.187.226
acl ip111 myip 205.209.187.227
acl ip112 myip 205.209.187.228
acl ip113 myip 205.209.187.229
acl ip114 myip 205.209.187.230
acl ip115 myip 205.209.187.232
acl ip116 myip 205.209.187.233
acl ip117 myip 205.209.187.234
acl ip118 myip 205.209.187.235
acl ip119 myip 205.209.187.236
acl ip120 myip 205.209.187.237
acl ip121 myip 205.209.187.238
acl ip122 myip 205.209.187.240
acl ip123 myip 205.209.187.241
acl ip124 myip 205.209.187.242
acl ip125 myip 205.209.187.243
acl ip126 myip 205.209.187.244
acl ip127 myip 205.209.187.245
acl ip128 myip 205.209.187.246
acl ip129 myip 205.209.187.248
acl ip130 myip 205.209.187.250
acl ip131 myip 205.209.187.251
acl ip132 myip 205.209.187.252
acl ip133 myip 205.209.187.253
acl ip134 myip 205.209.187.254
acl ip135 myip 208.77.46.113
acl ip136 myip 208.77.46.139
acl ip137 myip 208.77.46.180
acl ip138 myip 208.77.46.213
acl ip139 myip 208.77.46.89
acl ip140 myip 208.77.46.213
acl ip141 myip 208.77.46.89
acl ip142 myip 208.77.47.213
acl ip143 myip 208.77.47.27
acl ip144 myip 208.77.47.59
acl ip145 myip 208.77.47.71
acl ip146 myip 208.77.47.84
acl ip147 myip 208.77.47.97
acl ip148 myip 66.79.173.222
acl ip149 myip 66.79.173.224
acl ip150 myip 66.79.173.227
acl ip151 myip 66.79.173.230
acl ip152 myip 66.79.173.232
acl ip153 myip 66.79.174.22
acl ip154 myip 66.79.174.227
acl ip155 myip 66.79.174.228
acl ip156 myip 66.79.174.229
acl ip157 myip 66.79.174.230
acl ip158 myip 66.79.174.24
acl ip159 myip 66.79.174.25
tcp_outgoing_address 204.16.192.24 ip1
tcp_outgoing_address 204.16.192.25 ip2
tcp_outgoing_address 204.16.193.108 ip3
tcp_outgoing_address 204.16.193.141 ip4
tcp_outgoing_address 204.16.193.146 ip5
tcp_outgoing_address 204.16.193.156 ip6
tcp_outgoing_address 204.16.193.165 ip7
tcp_outgoing_address 204.16.193.175 ip8
tcp_outgoing_address 204.16.193.178 ip9
tcp_outgoing_address 204.16.193.180 ip10
tcp_outgoing_address 204.16.193.193 ip11
tcp_outgoing_address 204.16.193.214 ip12
tcp_outgoing_address 204.16.193.244 ip13
tcp_outgoing_address 204.16.193.76 ip14
tcp_outgoing_address 204.16.193.99 ip15
tcp_outgoing_address 204.16.194.99 ip16
tcp_outgoing_address 204.16.194.2 ip17
tcp_outgoing_address 204.16.194.41 ip18
tcp_outgoing_address 204.16.194.53 ip19
tcp_outgoing_address 204.16.194.54 ip20
tcp_outgoing_address 204.16.194.56 ip21
tcp_outgoing_address 204.16.194.57 ip22
tcp_outgoing_address 204.16.195.178 ip23
tcp_outgoing_address 204.16.195.179 ip24
tcp_outgoing_address 204.16.195.180 ip25
tcp_outgoing_address 204.16.195.181 ip26
tcp_outgoing_address 204.16.195.182 ip27
tcp_outgoing_address 204.16.195.190 ip28
tcp_outgoing_address 204.16.195.192 ip29
tcp_outgoing_address 204.16.195.193 ip30
tcp_outgoing_address 204.16.195.194 ip31
tcp_outgoing_address 204.16.196.52 ip32
tcp_outgoing_address 204.16.196.53 ip33
tcp_outgoing_address 204.16.195.54 ip34
tcp_outgoing_address 204.16.196.56 ip35
tcp_outgoing_address 204.16.196.57 ip36
tcp_outgoing_address 204.16.197.139 ip37
tcp_outgoing_address 204.16.197.140 ip38
tcp_outgoing_address 204.16.197.141 ip39
tcp_outgoing_address 204.16.197.142 ip40
tcp_outgoing_address 204.16.197.144 ip41
tcp_outgoing_address 204.16.197.145 ip42
tcp_outgoing_address 204.16.197.146 ip43
tcp_outgoing_address 204.16.197.147 ip44
tcp_outgoing_address 204.16.197.148 ip45
tcp_outgoing_address 204.16.197.68 ip46
tcp_outgoing_address 204.16.197.69 ip47
tcp_outgoing_address 204.16.197.70 ip48
tcp_outgoing_address 204.16.199.240 ip49
tcp_outgoing_address 204.16.199.246 ip50
tcp_outgoing_address 204.16.199.253 ip51
tcp_outgoing_address 205.209.187.156 ip52
tcp_outgoing_address 205.209.187.158 ip53
tcp_outgoing_address 205.209.187.160 ip54
tcp_outgoing_address 205.209.187.161 ip55
tcp_outgoing_address 205.209.187.162 ip56
tcp_outgoing_address 205.209.187.163 ip57
tcp_outgoing_address 205.209.187.164 ip58
tcp_outgoing_address 205.209.187.165 ip59
tcp_outgoing_address 205.209.187.166 ip60
tcp_outgoing_address 205.209.187.168 ip61
tcp_outgoing_address 205.209.187.169 ip62
tcp_outgoing_address 205.209.187.170 ip63
tcp_outgoing_address 205.209.187.171 ip64
tcp_outgoing_address 205.209.187.172 ip65
tcp_outgoing_address 205.209.187.173 ip66
tcp_outgoing_address 205.209.187.174 ip67
tcp_outgoing_address 205.209.187.176 ip68
tcp_outgoing_address 205.209.187.177 ip69
tcp_outgoing_address 205.209.187.178 ip70
tcp_outgoing_address 205.209.187.179 ip71
tcp_outgoing_address 205.209.187.181 ip72
tcp_outgoing_address 205.209.187.182 ip73
tcp_outgoing_address 205.209.187.184 ip74
tcp_outgoing_address 205.209.187.185 ip75
tcp_outgoing_address 205.209.187.186 ip76
tcp_outgoing_address 205.209.187.187 ip77
tcp_outgoing_address 205.209.187.188 ip78
tcp_outgoing_address 205.209.187.189 ip79
tcp_outgoing_address 205.209.187.192 ip80
tcp_outgoing_address 205.209.187.193 ip81
tcp_outgoing_address 205.209.187.194 ip82
tcp_outgoing_address 205.209.187.195 ip83
tcp_outgoing_address 205.209.187.196 ip84
tcp_outgoing_address 205.209.187.197 ip85
tcp_outgoing_address 205.209.187.198 ip86
tcp_outgoing_address 205.209.187.200 ip87
tcp_outgoing_address 205.209.187.201 ip88
tcp_outgoing_address 205.209.187.202 ip89
tcp_outgoing_address 205.209.187.203 ip90
tcp_outgoing_address 205.209.187.204 ip91
tcp_outgoing_address 205.209.187.205 ip92
tcp_outgoing_address 205.209.187.206 ip93
tcp_outgoing_address 205.209.187.208 ip94
tcp_outgoing_address 205.209.187.209 ip95
tcp_outgoing_address 205.209.187.210 ip96
tcp_outgoing_address 205.209.187.211 ip97
tcp_outgoing_address 205.209.187.212 ip98
tcp_outgoing_address 205.209.187.213 ip99
tcp_outgoing_address 205.209.187.214 ip100
tcp_outgoing_address 205.209.187.216 ip101
tcp_outgoing_address 205.209.187.217 ip102
tcp_outgoing_address 205.209.187.218 ip103
tcp_outgoing_address 205.209.187.219 ip104
tcp_outgoing_address 205.209.187.220 ip105
tcp_outgoing_address 205.209.187.221 ip106
tcp_outgoing_address 205.209.187.222 ip107
tcp_outgoing_address 205.209.187.224 ip108
tcp_outgoing_address 205.209.187.225 ip109
tcp_outgoing_address 205.209.187.226 ip110
tcp_outgoing_address 205.209.187.227 ip111
tcp_outgoing_address 205.209.187.228 ip112
tcp_outgoing_address 205.209.187.229 ip113
tcp_outgoing_address 205.209.187.230 ip114
tcp_outgoing_address 205.209.187.232 ip115
tcp_outgoing_address 205.209.187.233 ip116
tcp_outgoing_address 205.209.187.234 ip117
tcp_outgoing_address 205.209.187.235 ip118
tcp_outgoing_address 205.209.187.236 ip119
tcp_outgoing_address 205.209.187.237 ip120
tcp_outgoing_address 205.209.187.238 ip121
tcp_outgoing_address 205.209.187.240 ip122
tcp_outgoing_address 205.209.187.241 ip123
tcp_outgoing_address 205.209.187.242 ip124
tcp_outgoing_address 205.209.187.243 ip125
tcp_outgoing_address 205.209.187.244 ip126
tcp_outgoing_address 205.209.187.245 ip127
tcp_outgoing_address 205.209.187.246 ip128
tcp_outgoing_address 205.209.187.248 ip129
tcp_outgoing_address 205.209.187.250 ip130
tcp_outgoing_address 205.209.187.251 ip131
tcp_outgoing_address 205.209.187.252 ip132
tcp_outgoing_address 205.209.187.253 ip133
tcp_outgoing_address 205.209.187.254 ip134
tcp_outgoing_address 208.77.46.113 ip135
tcp_outgoing_address 208.77.46.139 ip136
tcp_outgoing_address 208.77.46.180 ip137
tcp_outgoing_address 208.77.46.213 ip138
tcp_outgoing_address 208.77.46.89 ip139
tcp_outgoing_address 208.77.46.213 ip140
tcp_outgoing_address 208.77.46.89 ip141
tcp_outgoing_address 208.77.47.213 ip142
tcp_outgoing_address 208.77.47.27 ip143
tcp_outgoing_address 208.77.47.59 ip144
tcp_outgoing_address 208.77.47.71 ip145
tcp_outgoing_address 208.77.47.84 ip146
tcp_outgoing_address 208.77.47.97 ip147
tcp_outgoing_address 66.79.173.222 ip148
tcp_outgoing_address 66.79.173.224 ip149
tcp_outgoing_address 66.79.173.227 ip150
tcp_outgoing_address 66.79.173.230 ip151
tcp_outgoing_address 66.79.173.232 ip152
tcp_outgoing_address 66.79.174.22 ip153
tcp_outgoing_address 66.79.174.227 ip154
tcp_outgoing_address 66.79.174.228 ip155
tcp_outgoing_address 66.79.174.229 ip156
tcp_outgoing_address 66.79.174.230 ip157
tcp_outgoing_address 66.79.174.24 ip158
tcp_outgoing_address 66.79.174.25 ip159
windows下squid安装与配置 缓存服务器
2009年11月14日 星期六 15:47
Squid For Windows 安装指南!Squid for Windows 简介 Squid for
Windows的安装,需求:你要拥有一台可联网的、运行着Windows NT/2000/XP/Server 2003的计算机,还要有Squid
for windows的软件包。从网上 下载的Squid for
windows的二进制文件是压缩到zip文件里的,首先来解压缩这个文件,加压后会生成一个 Squid的文件夹,将此文件夹拷贝到C:\,至此Squid
for Windows算是被“安装”到你的Windows计算机了。(备注:Squid for
windows的默认 安装是在C:\squid下,当然,可以把Squid放到其他的路径,但是需要大量的配置squid配置文件中的路径信息,那样会比较麻烦) Unix
Like的操作 系统下的大部分软件都是基于命令行的,使用文本文件进行配置,这样虽说对一些用惯了Windows下软件的朋友们会有些 复杂的感觉,但是这样的软件还是有好处的,毕竟其没有Gui会有更高的 性能,配置文件的编写更具灵活性,下面我们来看一下具体怎么配置 squid
for windows。首先,单击[开始],选择“运行”,输入 cmd 打开Windows的“命令提示符”
窗口,在命令提示符窗口内输入以下命令: C:\>cd c:\squid\etc C:\squid\etc>copy
squid.conf.default squid.conf
**将Squid的默认配置文件复制一份并起名为squid.conf C:\squid\etc>copy mime.conf.default
mime.conf
**将mime.conf.default复制一份并起名为mime.conf 下面,我们可以使用任意文本编辑器对squid.conf(配置文件)进行编辑,修改squid的配置语句,文件中的#后的文本表示注释。 首先,我们找到TAG:
acl段,这里是定义访问Squid的IP地址及其对应的名称 我们在此段acl Safe_ports port 777 #multiling
http后增加一个新行,写 “acl 名称 src IP地址” 示例:acl name1 src 192.168.100.0
#定义所有来自192.168.100.*的 机器对应的名称为name1 然后我们找到TAG:
http_access段,这里是定义允许访问squid的列表 我们在此段http_access deny CONNECT
!SSL_ports后增加一个新行,写“http_access allow/deny
名称”,allow表示允许访问,deny表示拒 绝访问。 示例:http_access allow name1
#定义所有标识为name1(192.168.100.*)的机器允许访问squid代理 服务器并且在后面再增加一行
http_access deny all。 任何一个 网络应用都会对应一个或N个端口,squid的默认端口是3128,如果要更改,找到
#http_port 3128 这里,删掉前面的#号,并且修改 后面的端口号。 示例:http_port 7777
#将squid的服务端口改为7777 由于Squid是基于Cache(缓存)的代理服务器,所以 设置缓存的大小对优化服务器的性能是有必要的,下面来看一下如何 设置cache的大小。 找到#cache_mem
8 MB这句 删掉前面的#号
将默认的8修改到需要的大小,这里的数值应视具体的机器可用内存而定,应在内存允许的情况下尽 量地设置的大一些以提高代理服务器性能,但不能让代理服务器的缓存大小影响本机器的性能。 示例:cache_mem
200 MB
#设置squid使用200MB的内存当做代理服务器缓存 最后我们还要有一个步骤,否则在启动squid服务的时候会报错,那就是配置TAG:
visible_hostname段,找到此段,再后面添加 visible_hostname 机器名(随便起)
这么一行,就搞定了。 示例:visible_hostname supersrv
#将hostname设置为supersrv 至此,可以保存squid.conf并且退出文本编辑器了,简单的Squid for
Windows的配置已经完成。 下面我们回到命令行,输入以下命令: c:\>cd
c:\squid\sbin C:\squid\sbin>squid -i
(注册Squid为Windows的服务,默认的服务名为SquidNT,可以使用“管理工具”中的“服务”来启动/停用服务) C:\squid\sbin>squid
-z (生成高速缓存的目录) C:\squid\sbin>squid
(启动squid服务,另一种比较好的方法是在“管理工具”,“服务”中选择SquidNT,然后选择启动服务) 以上简明说明了squid for
Windows的安装,配置,启动,此文应用在Unix/ Linux下的对Squid的简单配置也是可行的 转自:http://hi.baidu.com/yangbu/blog/item/29fd9bcb08a697f852664fcd.html
一.下载squid for windows
下载地址:
二.安装与配置
1.解压squid-2.6.STABLE6-NT-bin.zip到C:squid
2.单击[开始],选择“运行”,输入 cmd ,在命令提示符窗口内输入以下命令:
C:>cd c:squidetc
C:squidetc>copy squid.conf.default squid.conf
**将Squid的默认配置文件复制一份并起名为squid.conf
C:squidetc>copy mime.conf.default mime.conf
**将mime.conf.default复制一份并起名为mime.conf
3.编辑squid.conf,根据需要添加和修改以下内容
http_port 3128 ;定义squid监听端口
visible_hostname tianwei-itrus:定义机器名
cache_mem 64 MB ;定义代理服务器缓存
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255 :定义本地网络为localhost
acl outnetwork 192.168.10.0/255.255.255.0
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 1863 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allowlocalhost manager
http_access allowoutnetwork
icp_access allow all
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_reply_access allow all
icp_access allow all
http_access deny all
三.启动
c:>cd c:squidsbin
C:squidsbin>squid -i (注册Squid为Windows的服务)
C:squidsbin>squid -z (生成高速缓存的目录)
C:squidsbin>squid |