使用squid快速搭建代理
2017-09-04 09:26
288 查看
如何使用squid快速搭建代理
=======本项目主要介绍如何利用国外VPS搭建多协议代理服务。GFW 封锁了 HTTP/Socks5 代理,HTTP 代理是关键词过滤,Socks5 代理则是封锁协议。不过某些特殊的低端口并没有这么处理,已知的有 21,25。20端口已经被封杀,21端口目前会被限速400Kbps,换算后约合50KB/S,建议使用25端口,不限速。搭建代理服务器==============在 25 端口搭建 http/https 代理。Ubuntu:
不知道能否使用,先收藏找时间试试
参考:http://www.cnblogs.com/tangkai/p/4758877.html
=======本项目主要介绍如何利用国外VPS搭建多协议代理服务。GFW 封锁了 HTTP/Socks5 代理,HTTP 代理是关键词过滤,Socks5 代理则是封锁协议。不过某些特殊的低端口并没有这么处理,已知的有 21,25。20端口已经被封杀,21端口目前会被限速400Kbps,换算后约合50KB/S,建议使用25端口,不限速。搭建代理服务器==============在 25 端口搭建 http/https 代理。Ubuntu:
apt-get install squid curl https://pac.itzmx.com/squid/ubuntu-squid.conf >> /etc/squid3/squid.conf /etc/init.d/squid restartCentos:
setenforce 0 ulimit -n 1048576 echo "* soft nofile 1048576" >> /etc/security/limits.conf echo "* hard nofile 1048576" >> /etc/security/limits.conf killall sendmail /etc/init.d/postfix stop chkconfig --level 2345 postfix off yum -y install squid wget -O /etc/squid/squid.conf https://pac.itzmx.com/squid/centos-squid.conf /etc/init.d/squid restart chkconfig --level 2345 squid on
https://pac.itzmx.com/squid/ubuntu-squid.conf的内容如下:
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwd auth_param basic children 5 auth_param basic realm Welcome to pac.itzmx.com proxy web server 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 591 # filemaker acl Safe_ports port 777 # multiling http acl CONNECT method CONNECT acl squid_user proxy_auth REQUIRED http_access allow squid_user http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access deny all http_port 25 coredump_dir /var/spool/squid refresh_pattern -i ^ftp: 525600 95% 525600 reload-into-ims refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 reload-into-ims refresh_pattern -i . 525600 95% 525600 reload-into-ims strip_query_terms off visible_hostname pac.itzmx.com cache_mgr 1265578519@qq.com cache_store_log none cache_access_log none cache_mem 256 MB cache_dir aufs /var/cache/squid 5000 128 128 cache_swap_low 90 cache_swap_high 95 maximum_object_size 128 MB maximum_object_size_in_memory 128 MB dns_nameservers 8.8.8.8 8.8.4.4 client_lifetime 1 minutes half_closed_clients off fqdncache_size 65535 ipcache_size 65535 ipcache_low 90 ipcache_high 95
https://pac.itzmx.com/squid/centos-squid.conf的内容如下:
auth_param basic program /usr/lib64/squid/ncsa_auth /etc/squid/passwd auth_param basic children 5 auth_param basic realm Welcome to pac.itzmx.com proxy web server acl manager proto cache_object acl localhost dst 127.0.0.0/8 0.0.0.0/32 ::1 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 591 # filemaker acl Safe_ports port 777 # multiling http acl CONNECT method CONNECT acl squid_user proxy_auth REQUIRED http_access allow squid_user http_access allow manager localhost http_access deny manager http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access deny all http_port 25 coredump_dir /var/spool/squid refresh_pattern -i ^ftp: 525600 95% 525600 reload-into-ims refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 reload-into-ims refresh_pattern -i . 525600 95% 525600 reload-into-ims strip_query_terms off visible_hostname pac.itzmx.com cache_mgr 1265578519@qq.com cache_store_log none cache_access_log none cache_mem 256 MB cache_dir aufs /var/cache/squid 5000 128 128 cache_swap_low 90 cache_swap_high 95 maximum_object_size 128 MB maximum_object_size_in_memory 128 MB dns_nameservers 8.8.8.8 8.8.4.4 client_lifetime 1 minutes half_closed_clients off fqdncache_size 65535 ipcache_size 65535 ipcache_low 90 ipcache_high 95
不知道能否使用,先收藏找时间试试
参考:http://www.cnblogs.com/tangkai/p/4758877.html
相关文章推荐
- 转 Centos7下使用Squid快速搭建带认证的HTTP代理服务器
- 使用squid搭建https透明代理
- 使用Amazon免费云主机和Docker技术,快速搭建Squid服务器!
- CentOS 6.5使用yum快速搭建LAMP环境
- 使用Express 快速搭建Nodejs项目
- 使用JPress快速搭建系统
- 搜索服务Solr集群搭建 使用ZooKeeper作为代理层
- 使用squid搭建http代理
- 使用dnsmasq快速搭建内网DNS
- webservice快速入门-使用JAX-WS注解的方式快速搭建ws服务端和客户端(一)
- 使用logstash+elasticsearch+kibana快速搭建日志平台
- 使用CentOS7配置Squid代理
- spring boot / cloud (十八) 使用docker快速搭建本地环境
- 08如何使用express框架快速写项目_使用express完成项目的搭建
- centos 使用sshfs快速搭建文件共享服务
- CentOS 6.5使用yum快速搭建LAMP环境
- ros使用百度UNIT快速搭建机器人对话系统 人机语音交互