proxy代理   soft软件   IT 业界特快   norton 诺顿病毒库   代理列表   search FTP搜索   whois IP地理位置   blog 追求完美  
money理财   life生活   RSS聚合门户   firefox WEB浏览器   免费域名   typeset 假古文   AntiVirus 反病毒   ipcn 站点导航  

« 启动多个MSN的补丁 - MSN Messenger Multi Instance Patch | Main | RSA SecurID Authentication linux sshd PAM deploy »

February 13, 2006

[攻略] 用 squidnt 打造超强 windows 代理服务器

版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
https://windtear.net/archives/2006/02/13/000917.html
http://windtear.net/archives/2006/02/13/000917.html

[攻略] 用 squidnt 打造超强 windows 代理服务器

关于 squid 这里就不多写了 直接进入主题

--1-- 下载
http://www.acmeconsulting.it/pagine/opensource/download/squid.htm
http://www.acmeconsulting.it/pagine/opensource/download/squid-2.5.STABLE12-NT-bin.zip

--2-- 解压在c:根目录
c:\squid

--3-- 配置
c:\squid\etc\mime.conf (默认有 mime.conf.default 拷贝一份或者改名都行)
c:\squid\etc\squid.conf(下面给个简单代理服务器样例 如果要公开 想配多灵活都可以)

squid.conf 样例:
可能你需要修改的地方:
代理端口3128 内存大小64 cache目录 允许网段 国外代理(如果没有可以把那4+5行删掉)
offline_mode off
http_port 3128
icp_port 0
snmp_port 0
htcp_port 0

acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

cache_mem 64 MB
maximum_object_size 8192 KB
maximum_object_size_in_memory 8192 KB
cache_replacement_policy heap LFUDA
memory_replacement_policy heap LFUDA

cache_dir ufs c:/squid/var/cache 100 4 4
cache_access_log none
#cache_access_log c:/squid/var/logs/access.log
cache_log c:/squid/var/logs/cache.log
cache_store_log none

emulate_httpd_log on
dns_nameservers 202.106.0.20

refresh_pattern .		0	5%	604800
half_closed_clients off

acl myhome src 192.168.0.0/16
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl all src 0/0

acl PURGE method PURGE
http_access allow PURGE localhost
http_access deny PURGE
 
http_access allow manager localhost
http_access deny manager

http_access allow localhost
http_access allow myhome

http_access deny all

acl cantdirect dstdomain .sourceforge.net
acl cantdirect dstdomain .freebsd.org
acl cantdirect dstdomain .wikipedia.org
acl cantdirect dstdomain .wikimedia.org

cache_peer 国外代理 parent 端口 0 no-query no-digest no-netdb-exchange
cache_peer_access 国外代理 allow cantdirect
cache_peer_access 国外代理 deny all
always_direct deny cantdirect
always_direct allow !cantdirect

icp_access deny all
shutdown_lifetime 5 seconds 
ignore_unknown_nameservers on

cache_mgr 你的email
visible_hostname squidnt.ipcn.org

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_single_host off
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
logfile_rotate 0

forwarded_for off
log_icp_queries off

client_persistent_connections on
server_persistent_connections on
client_db off

# reload_into_ims off
negative_ttl 300 seconds

--4-- 启动
新建 c:\squid\var\cache 目录 (根据配置指向建)
开始 - 运行 - "c:\squid\sbin\squid -z" 初始化 cache 目录结构
开始 - 运行 - "c:\squid\sbin\squid -i" 安装squidnt服务

ok 可以用了 家里其他机器或者本机浏览器设置代理即可
以后系统启动会自动 (如果不重起可以 开始 - 运行 - "net start squidnt" 启动)

其他需求可以慢慢看帮助 或者到水木新软版发文讨论 可以增积分
本blog WWW

Posted by windtear at February 13, 2006 11:02 PM

本站使用中的任何问题,请与 windtear @ windtear.net 联系
Copyright© 1999-2014 Windtear. All rights reserved.