SQUID3.0透明代理配置

成功配置SQUID3.0透明代理,希望有能力者把我这脚本完善一下,一来可以提高自己的服务器的性能,来二初学者可以做为样本直接可用.eth0是外网 eth1 是196.196.0.8

内网是(196.196.0.0/24)我要做的是关掉所有下载,包括在线视频.如土豆网等一下视频.(土豆网等一些视频我是让它进到页面无法显示网页里的视频播放器达到禁止的效果)http_port 3128 transparentcache_mem 256 MBdns_nameservers 196.196.0.8maximum_object_size_in_memory 2 MBmemory_replacement_policy heap LFUDAcache_replacement_policy heap LFUDAcache_dir ufs /var/squid/cache 5000 32 512error_directory /usr/local/squid/share/errors/Simplify_Chineseacl nocache urlpath_regex cookie.*\.php *\.jsp *\.asp *\.pl *\.cgino_cache deny nocacheacl audio urlpath_regex -i .torrent$ .avi$ .mp3$ .mp4$

http_access deny audioacl badfiles urlpath_regex -i .swf$ .flv$http_access deny badfilesacl download urlpath_regex -i \.zip$ \.exe$ \.mp3$ \.ra$ \.avi$ \.rar$ \.rvmb$ \.mpe$ \.flv$ \.swf$?? #表示定义禁止下载exe等http_access deny downloadacl localhost src 196.196.0.0/24http_access allow localhosthttp_access deny allacl safe port 80 3128http_access allow safecache_effective_user squidcache_effective_group squidicp_port 0cache_mgr worldrestart@yahoo.com.cnacl OverConnLimit maxconn 16http_access deny OverConnLimitacl conncount maxconn 5visible_hostname 196.196.0.8icon_directory /usr/local/squid/share/iconsmax_open_disk_fds 0minimum_object_size 1 KBmaximum_object_size 20 MBcache_swap_low 90cache_swap_high 95access_log /usr/local/squid/var/logs/access.log squidcache_log /usr/local/squid/var/logs/cache.log squidcache_store_log noneemulate_httpd_log onrefresh_pattern -i \.htm$ 0 20% 1440refresh_pattern -i \.html$ 0 20% 1440refresh_pattern -i . 5 25% 2880acl buggy_server url_regex ^http://…. http://broken_posts allow buggy_serverrequest_entities offrelaxed_header_parser onclient_lifetime 120 minutehostname_aliases 196.196.0.8error_directory /usr/local/squid/share/errors/Simplify_Chinesealways_direct allow allignore_unknown_nameservers oncoredump_dir??/var/log/squidhalf_closed_clients offbuffered_logs on

SQUID3.0透明代理配置

相关文章:

你感兴趣的文章:

标签云: