免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3836 | 回复: 4
打印 上一主题 下一主题

[proxy] 请帮忙写一个squid.conf [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-11-19 20:16 |只看该作者 |倒序浏览
10可用积分
已解决

[ 本帖最后由 韧体 于 2008-11-23 01:26 编辑 ]

最佳答案

查看完整内容

squid conf_file for Squid V2.7xhttp_port 192.168.0.200:3128 //squid监听的IP地址和端口 dns_nameservers 61.128.114.133 //你的DNS服务器cache_dir ufs /var/squid/cache 2048 16 256error_directory /usr/local/squid/share/errors/Simplify_Chinesecache_access_log /var/squid/access.logcache_log /var/squid/cache.logcache_store_log /var/squid/store.log acl localhost src 192.168.1.0/24 ...

论坛徽章:
4
IT运维版块每日发帖之星
日期:2015-09-01 06:20:00IT运维版块每日发帖之星
日期:2015-10-09 06:20:00操作系统版块每日发帖之星
日期:2015-10-20 06:20:00IT运维版块每日发帖之星
日期:2015-11-03 06:20:00
2 [报告]
发表于 2008-11-19 20:16 |只看该作者
squid conf_file for Squid V2.7x

http_port 192.168.0.200:3128           //squid监听的IP地址和端口              


dns_nameservers 61.128.114.133    //你的DNS服务器
cache_dir ufs /var/squid/cache 2048 16 256
error_directory /usr/local/squid/share/errors/Simplify_Chinese

cache_access_log /var/squid/access.log
cache_log /var/squid/cache.log
cache_store_log /var/squid/store.log
acl localhost src 192.168.1.0/24              //你允许使用代理的客户机网络地址
acl safe port 80 21 443 563 3128           //你允许使用的端口
acl all src 0.0.0.0/0.0.0.0                         //定义全局地址
http_access allow localhost
http_access allow safe
http_access deny all            
cache_effective_user squid
cache_mgr li.v.s@qq.com



要使用这些配置文件,首先说明你是个新手。你如果多看看默认的squid.conf文件,这个帖根本不需要发出来,就算,你将这个配置文件复制到你的squid.conf里。你也不一定能用,很多地方要修改。
squid.conf示例:
鳥哥的範例:http://linux.vbird.org/linux_server/0420squid/0420squid_vbird_ex
成大 gate.ncku.edu.tw 的 squid.conf 設定:http://turtle.ee.ncku.edu.tw/~tung/proxy/squid.conf.ncku
電機系 turtle.ee.ncku.edu.tw 的 squid.conf 設定:http://turtle.ee.ncku.edu.tw/~tung/proxy/squid.conf.turtle
台南學校範例 proxy.school.tn.edu.tw 的 squid.conf 設定:http://turtle.ee.ncku.edu.tw/~tung/proxy/squid.conf.school.tn


[ 本帖最后由 3645636 于 2008-11-20 12:23 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2008-11-20 09:55 |只看该作者
  下面我给出一个最简单的squid.conf文件:

  #squid.conf - a very basic config file for squid

  #Turn logging to it's lowest level

  debug_options ALL,1

  #defines a group (or Access Control List) that includes all IP addresses

  acl all src 0.0.0.0/0.0.0.0

  #define RAM used

  cache_mem 32M

  #defines the cache size

  cache_dir /usr/local/squid/cache 100 16 256

  #allow all sites to use connect to us via HTTP

  http_access allow all

  #allow all sites to use us as a sibling

  icp_access allow all

  #test the following sites to check that we are connected

  dns_testnames internic.net usc.edu cs.colorado.edu mit.edu yale.edu

  #run as the squid user

  cache_effective_user squid squid

  这个配置文件允许所有人使用Squid,创建了100M缓存,使用32M内存,在缺省位置"/usr/local/squid/cache"缓存数据,所有缓存数据以组squid和用户squid身份保存,端口为3128。虽然这个配置很不安全,但是它已经能使用了。


http://fanqiang.chinaunix.net/app/proxy/2005-06-17/3319.shtml

论坛徽章:
2
2015年辞旧岁徽章
日期:2015-03-03 16:54:1515-16赛季CBA联赛之上海
日期:2016-05-05 09:45:14
4 [报告]
发表于 2008-11-20 11:11 |只看该作者
squid.conf
cache_mgr akin.zheng@goqo.com
acl all src 0.0.0.0/0.0.0.0
visible_hostname IM_agent.proxy
http_port 8080
http_access allow all

和和,简单吧,你可以下载我做的安装包,专门为代理做的,和和,


http://autosetup.googlecode.com/files/AutoIM_Porxy-1.0.1.tar.gz

再给你一个,WIN下的,,还认证的,

http://autosetup.googlecode.com/ ... %20WIN%20v1.0.1.rar

[ 本帖最后由 badb0y 于 2008-11-20 16:21 编辑 ]

论坛徽章:
2
2015年辞旧岁徽章
日期:2015-03-03 16:54:1515-16赛季CBA联赛之上海
日期:2016-05-05 09:45:14
5 [报告]
发表于 2008-11-25 09:22 |只看该作者
LS的,,你没看到LZ将分给了2楼的,,所以2楼是正确的!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP