squid pac prxoy
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
README.md Update README.md Oct 1, 2018
centos-squid.conf Update centos-squid.conf Oct 29, 2018
ubuntu-squid.conf Create ubuntu-squid.conf Oct 1, 2018

README.md

squid proxy

轻量级的翻墙工具,不需要安装客户端,配合pac文件使用可达到中的分流效果。

ubuntu搭建代码

apt-get -y install squid
curl https://raw.githubusercontent.com/NutterChen/squid-pac-prxoy/master/ubuntu-squid.conf > /etc/squid/squid.conf
echo "666:qQWImxRoncbEA" >> /etc/squid/passwd
mkdir -p /var/cache/squid
chmod -R 777 /var/cache/squid
service squid stop
squid -z
service squid restart

代码需要一行一行复制使用,默认用户名与密码均为“666”

centos搭建代码

setenforce 0
ulimit -n 655350
echo "* soft nofile 655350" >> /etc/security/limits.conf
echo "* hard nofile 655350" >> /etc/security/limits.conf
echo "alias net-pf-10 off" >> /etc/modprobe.d/dist.conf
echo "alias ipv6 off" >> /etc/modprobe.d/dist.conf
killall -9 sendmail
/etc/init.d/postfix stop
chkconfig --level 2345 postfix off
chkconfig --level 2345 sendmail off
yum -y install squid wget
wget https://raw.githubusercontent.com/NutterChen/squid-pac-prxoy/master/centos-squid.conf -O /etc/squid/squid.conf
echo "666:qQWImxRoncbEA" >> /etc/squid/passwd
mkdir -p /var/cache/squid
chmod -R 777 /var/cache/squid
squid -z
service squid restart
chkconfig --level 2345 squid on
iptables -t nat -F
iptables -t nat -X
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT
iptables -t mangle -F
iptables -t mangle -X
iptables -t mangle -P PREROUTING ACCEPT
iptables -t mangle -P INPUT ACCEPT
iptables -t mangle -P FORWARD ACCEPT
iptables -t mangle -P OUTPUT ACCEPT
iptables -t mangle -P POSTROUTING ACCEPT
iptables -F
iptables -X
iptables -P FORWARD ACCEPT
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t raw -F
iptables -t raw -X
iptables -t raw -P PREROUTING ACCEPT
iptables -t raw -P OUTPUT ACCEPT
service iptables save

代码可整段复制使用,默认用户名与密码均为“666”