├── sysctl.conf
├── mproxy
├── zproxy
├── EasyRSA-2.2.2.tar.gz
├── epel-release-6-8.noarch.rpm
├── 32-epel-release-6-8.noarch.rpm
├── squid.conf
├── onlyme.ovpn
├── server.conf
└── openvpn.sh
/sysctl.conf:
--------------------------------------------------------------------------------
1 | net.ipv4.ip_forward = 1
--------------------------------------------------------------------------------
/mproxy:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrcosir/no/HEAD/mproxy
--------------------------------------------------------------------------------
/zproxy:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrcosir/no/HEAD/zproxy
--------------------------------------------------------------------------------
/EasyRSA-2.2.2.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrcosir/no/HEAD/EasyRSA-2.2.2.tar.gz
--------------------------------------------------------------------------------
/epel-release-6-8.noarch.rpm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrcosir/no/HEAD/epel-release-6-8.noarch.rpm
--------------------------------------------------------------------------------
/32-epel-release-6-8.noarch.rpm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mrcosir/no/HEAD/32-epel-release-6-8.noarch.rpm
--------------------------------------------------------------------------------
/squid.conf:
--------------------------------------------------------------------------------
1 | acl SSL_ports port 443
2 | acl Safe_ports port 80
3 | acl Safe_ports port 21
4 | acl Safe_ports port 443
5 | acl Safe_ports port 70
6 | acl Safe_ports port 210
7 | acl Safe_ports port 1025-65535
8 | acl Safe_ports port 280
9 | acl Safe_ports port 488
10 | acl Safe_ports port 591
11 | acl Safe_ports port 777
12 | acl CONNECT method CONNECT
13 | via on
14 | request_header_access X-Forwarded-For deny all
15 | request_header_access user-agent deny all
16 | reply_header_access X-Forwarded-For deny all
17 | reply_header_access user-agent deny all
18 | http_port 80
19 | http_access allow all
20 | access_log /var/log/squid/access.log
21 | visible_hostname TD-LTE/FDD-LTE(openVPN免流)
22 | cache_mgr Welcome_to_use_OpenVPN
--------------------------------------------------------------------------------
/onlyme.ovpn:
--------------------------------------------------------------------------------
1 | # 配置模板
2 | setenv IV_GUI_VER "de.blinkt.openvpn 0.6.17"
3 | machine-readable-output
4 | client
5 | dev tun
6 | connect-retry-max 5
7 | connect-retry 5
8 | resolv-retry 60
9 | ########免流代码########
10 | http-proxy-option EXT1 "POST http://rd.go.10086.cn"
11 | http-proxy-option EXT1 "GET http://rd.go.10086.cn"
12 | http-proxy-option EXT1 "X-Online-Host: rd.go.10086.cn"
13 | http-proxy-option EXT1 "POST http://rd.go.10086.cn"
14 | http-proxy-option EXT1 "X-Online-Host: rd.go.10086.cn"
15 | http-proxy-option EXT1 "POST http://rd.go.10086.cn"
16 | http-proxy-option EXT1 "Host: rd.go.10086.cn"
17 | http-proxy-option EXT1 "GET http://rd.go.10086.cn"
18 | http-proxy-option EXT1 "Host: rd.go.10086.cn"
19 | http-proxy 填写你的IP 80
20 | ########免流代码########
21 |
22 | remote 填写你的IP 3389 tcp-client
23 | resolv-retry infinite
24 | nobind
25 | persist-key
26 | persist-tun
27 |
28 |
29 | CA证书
30 |
31 |
32 |
33 | 客户证书
34 |
35 |
36 |
37 | 客户密钥
38 |
39 |
40 | ns-cert-type server
41 | comp-lzo
42 | verb 3
43 |
--------------------------------------------------------------------------------
/server.conf:
--------------------------------------------------------------------------------
1 | #################################################
2 | # OpenVPN免流配置 #
3 | # 2016.02.22 #
4 | # #
5 | #################################################
6 |
7 | port 3389
8 | proto tcp
9 | dev tun
10 | ca /etc/openvpn/easy-rsa/keys/ca.crt
11 | cert /etc/openvpn/easy-rsa/keys/centos.crt
12 | key /etc/openvpn/easy-rsa/keys/centos.key
13 | dh /etc/openvpn/easy-rsa/keys/dh2048.pem
14 | server 10.8.0.0 255.255.255.0
15 | ifconfig-pool-persist ipp.txt
16 | ;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100
17 | push "redirect-gateway def1 bypass-dhcp"
18 | ;push "route 192.168.10.0 255.255.255.0"
19 | ;push "route 192.168.20.0 255.255.255.0"
20 | ;push "dhcp-option DNS 114.114.114.114"
21 | ;push "dhcp-option DNS 114.114.115.115"
22 | ;client-to-client
23 | keepalive 10 120
24 | # tls-auth /etc/openvpn/easy-rsa/ta.key 1
25 | comp-lzo
26 | max-clients 10
27 | persist-key
28 | persist-tun
29 | status openvpn-status.log
30 | log openvpn.log
31 | log-append openvpn.log
32 | verb 3
33 | ;mute 20
34 | ;crl-verify /etc/openvpn/easy-rsa/keys/crl.pem
--------------------------------------------------------------------------------
/openvpn.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
3 | export PATH
4 |
5 | clear;
6 | # Logo ******************************************************************
7 | CopyrightLogo='
8 | CentOS6.x OpenVPN-2.3.10 云免服务器
9 | Powered by 沔县聂人狂 2015-2016
10 | All Rights Reserved
11 |
12 | by 聂人狂
13 | ==========================================================================';
14 | echo "$CopyrightLogo";
15 | echo "请按回车执行安装"
16 | read
17 | echo
18 | # sbwml
19 | echo "正在进行部署环境..."
20 | sleep 3
21 | service httpd stop >/dev/null
22 | yum -y remove httpd >/dev/null
23 |
24 | if [ $version == "6" ];then
25 | if [ $(getconf WORD_BIT) = '32' ];then
26 | wget https://raw.github.com/mu228/no/master/32-epel-release-6-8.noarch.rpm
27 | rpm -ivh 32-epel-release-6-8.noarch.rpm
28 | else
29 | wget https://raw.github.com/mu228/no/master/epel-release-6-8.noarch.rpm
30 | rpm -ivh epel-release-6-8.noarch.rpm
31 | fi
32 | fi
33 | yum update -y
34 | # OpenVPN Installing ****************************************************************************
35 | iptables -F
36 | service iptables save
37 | service iptables restart
38 | iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
39 | iptables -A INPUT -p TCP --dport 3389 -j ACCEPT
40 | iptables -A INPUT -p TCP --dport 80 -j ACCEPT
41 | iptables -A INPUT -p TCP --dport 22 -j ACCEPT
42 | iptables -t nat -A POSTROUTING -j MASQUERADE
43 | iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
44 | service iptables save
45 | # OpenVPN Installing ****************************************************************************
46 | setenforce 0
47 | cd /etc/
48 | rm -rf ./sysctl.conf
49 | wget https://raw.github.com/mu228/no/master/sysctl.conf
50 | chmod 0755 ./sysctl.conf
51 | sysctl -p
52 | # OpenVPN Installing ****************************************************************************
53 | echo "正在安装环境..."
54 | sleep 3
55 | yum install -y curl wget squid openssl openssl-devel lzo lzo-devel pam pam-devel automake pkgconfig
56 | yum install -y openvpn
57 | # OpenVPN Installing ****************************************************************************
58 | cd /etc/openvpn/
59 | rm -rf ./server.conf
60 | wget https://raw.github.com/mu228/no/master/server.conf
61 | chmod 0755 ./server.conf
62 | cd /etc/squid/
63 | rm -f ./squid.conf
64 | wget https://raw.github.com/mu228/no/master/squid.conf
65 | chmod 0755 /etc/squid/squid.conf
66 | squid -z
67 | squid -s
68 | chkconfig squid on
69 | # OpenVPN Installing ****************************************************************************
70 | cd /etc/openvpn/
71 | wget https://raw.github.com/mu228/no/master/EasyRSA-2.2.2.tar.gz
72 | tar -zxvf EasyRSA-2.2.2.tar.gz
73 | cd /etc/openvpn/easy-rsa/
74 | source vars
75 | ./clean-all
76 | clear
77 | echo "以下操作请根据提示键入 y 确认..."
78 | sleep 3
79 | echo -e "nnnnnnnn" | ./build-ca
80 | echo -e "nnnnnnnnnn" | ./build-key-server server && echo -e "nnnnnnnnnn" | ./build-key client-name
81 | ./build-ca
82 | ./build-key-server centos
83 | ./build-key me
84 | ./build-dh
85 | # OpenVPN Installing ****************************************************************************
86 | service openvpn start
87 | chkconfig openvpn on
88 | # OpenVPN Installing ****************************************************************************
89 | cp /etc/openvpn/easy-rsa/keys/{ca.crt,me.{crt,key}} /home/
90 | cd /home/
91 | wget https://raw.github.com/mu228/no/master/onlyme.ovpn
92 | tar -zcvf openvpn.tar.gz ./{onlyme.ovpn,ca.crt,me.{crt,key}}
93 | rm -rf ./{onlyme.ovpn,ca.crt,me.{crt,key}}
94 | # OpenVPN Installing ****************************************************************************
95 | echo "正在创建下载链接:"
96 | echo
97 | sleep 2
98 | echo '=========================================================================='
99 | echo
100 | curl --upload-file ./openvpn.tar.gz https://transfer.sh/openvpn.tar.gz
101 | echo
102 | echo "上传成功:"
103 | echo "请复制https://链接到浏览器下载配置文件"
104 | echo
105 | echo '=========================================================================='
106 | echo
107 | Client='
108 | OpenVPN-2.3.10 安装完毕
109 | Powered by 沔县聂人狂 2015-2016
110 | All Rights Reserved
111 |
112 | ==========================================================================';
113 | echo "$Client";
114 |
115 |
--------------------------------------------------------------------------------