Build a shadowsocks proxy server in CentOS

Source: Internet
Author: User
Tags json centos iptables

Recently, the walls seem to be very congested, and the Great Wall jump methods are extremely slow. No way, you can set up the shadowsocks proxy server by yourself (take CentOS as an example ).

Install related dependencies (enter the following commands in sequence)

Yum install m2crypto python-setuptools
Easy_install pip
Pip install shadowsocks

Create a configuration file
Vi/etc/shadowsocks. json

Write in the file:

{
"Server": "0.0.0.0 ",
"Server_port": 8888,
"Local_address": "127.0.0.1 ",
"Local_port": 1080,
"Password": "123456 ",
"Timeout": 600,
"Method": "aes-128-cfb"
}

Explanation:

Server: the IP address of the server. It is also possible to write 0.0.0.0 directly here (recommended)
Server_port: server proxy port
Local_address: address for local listening (generally 127.0.0.1)
Local_port: local proxy port (the port needed by Switchy and other plug-ins)
Password: connection password
Timeout: timeout
Method: encryption method, recommended aes-128-cfb
Start services in the background


Nohup/usr/bin/ssserver-c/etc/shadowsocks. json>/dev/null 2> & 1 &
Sometimes, the server may need to be restarted, so it is necessary to add it to the startup item:


Echo "nohup/usr/bin/ssserver-c/etc/shadowsocks. json>/dev/null 2> & 1 &">/etc/rc. local
My Gad! Why is it ineffective?

On CentOS, the corresponding Port cannot be accessed due to firewall reasons (port 8888 is still used as an example). Run the following command:


Iptables-P INPUT ACCEPT
Iptables-F
Iptables-a input-p tcp -- dport 8888-j ACCEPT
Remarks

All of the above are server configurations. You also need a local shadowscoks client and configure the IP address, password, and local port. Customer address: http://shadowsocks.org/en/download/clients.html

Then configure the local proxy. One way is to enable the proxy service directly in IE. The configuration is shown in the following figure. The actual port must be used.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.