Configuration method:
1. A Running System in the kernel (centos 6.5)
2. Install squid on the server
3. Generate a certificate on the server and use an encrypted proxy.
4. Install Stunnel in the wall. It can be a Windows system or a Linux system (this case is Linux)
1. Server Configuration
1. Install squid
# yum install -y squid
2. Generate a certificate
# openssl req -new > charlie.csr# openssl rsa -in privkey.pem -out charlie.key# openssl x509 -in charlie.csr -out charlie.crt -req -signkey charlie.key -days 365# mkdir /etc/squid/cert# mv * /etc/squid/cert
3. modify configuration
# Vim/etc/squid. conf ACL mynet SRC 201.106.17.45/32 http_access allow mynethttp_access deny all # This line must be followed # http_port 3128 # comment this line https_port 443 Cert =/etc/squid/CERT/Charlie. CRT key =/etc/squid/CERT/Charlie. key to add this row
4. Restart the service
# /etc/init.d/squid start# chkconfig squid on
5. View services
# netstat -lutnp |grep 443tcp 0 0 :::443 :::* LISTEN 9811/(squid)
Now the server configuration is complete.
2. Client Configuration
1. Download Stunnel address: ftp://ftp.stunnel.org/stunnel/
2. Installation
# tar xf stunnel-5.02.tar.gz# cd stunnel-5.02# ./configure# make && make install
3. Configuration
# vim /usr/local/etc/stunnel/stunnel.conf client = yes[https]accept = 0.0.0.0:8088connect = vps-ip:443
4. Start the service
# /usr/local/bin/stunnel
5. View services
# ps -ef |grep stunnelroot 12282 1 0 03:13 ? 00:00:00 /usr/local/bin/stunnelroot 12348 8422 0 03:23 pts/0 00:00:00 grep stunnel# netstat -lutnp |grep 8088tcp 0 0 0.0.0.0:8088 0.0.0.0:* LISTEN 12282/stunnel
Iii. Test
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/38/F2/wKioL1O07nDw2grNAAFEqNASv4w241.jpg "style =" float: none; "Title =" image2.png "alt =" wkiol1o07ndw2grnaafeqnasv4w241.jpg "/>
Set the IP address to the IP address of the client.
Then the browser accesses http://www.youtube.com
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/38/F2/wKiom1O07qCQXY_6AAK79FjBdGo975.jpg "style =" float: none; "Title =" image1.png "alt =" wkiom1o07qcqxy_6aak79fjbdgo975.jpg "/>
This article is from the "charlie_cen" blog, please be sure to keep this source http://charlie928.blog.51cto.com/3741218/1433950