CentOS7 build SS (***) service as well as on Windows and Linux
0X00 ss server set up
0X01 Windows use
0X02 Linux use
Note: The "***" place please forgive me, some things ( shadowsocks ) play out ......
0X00 ss server set up
yum update -y
yum install python-pip m2crypto supervisor -y
pip install shadowsocks
# Create a server configuration file after installation is complete, the parameters are as follows:
vim /etc/shadowsocks/shadowsocks.json
written as follows:
{
"Server": "0.0.0.0", # IP address of the server, the server, then you can use 0.0.0.0
"SERVER_PORT": 443, # server open port, can modify their favorite port number (GFW on small 80/443 monitoring, port monitoring other larger effort, self-measure)
"local_address": "127.0.0.1", # applied to the local loopback address
"local_port": 1080, # local port 1080, the default can be
"password ":" 123456 ", # set password
" timeout ": 300, # set the timeout
" method ":" aes-256 -cfb ", # set encryption
" fast_open ": to false
}
multiple ports follows:
{
"Server": "0.0.0.0",
"local_address": "127.0.0.1",
"local_port": 1080,
"port_password": {
"443": "443",
"8888": "8888"
},
" timeout ": 300,
" Method ":" AES-CFB-256 ",
" fast_open ": to false
}
password own password for connecting to the shadow socks, custom like.
The other does not need to be changed.
Then save and exit.
# Configure the firewall, this step is mainly to improve the security of the system.
# Install a firewall (if not Firewalld)
yum install firewalld
# start the firewall
systemctl start firewalld
open firewall port corresponding
method (recommended)
# Port is the port number you set
# Firewall-cmd = --permanent --zone public --add-Port = 443 / tcp
# Firewall-cmd --reload
Start *** Service
ssserver -c /etc/shadowsocks.json
If you wanted to do something other implementations running in the background , use
nohup ssserver -c /etc/shadowsocks.json
#ssserver -c parameter is specified configuration file, use your own parameters for more detailed help view help at the command line terminal.
# Can also be registered as a service, started by the system command
echo "
[Unit]
Description=***
[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/ssserver -c /etc/shadowsocks/shadowsocks.json
[Install]
WantedBy=multi-user.target
" >> /etc/systemd/system/shadowsocks.service
systemctl start shadowsocks.service && systemctl enable shadowsocks.service
OK! ! ! SS server set up is complete, the following describes the client (Client) to use
0X01 Windows use
On github download the latest version of the client, as required to fill in the parameters
Address https://github.com/shadowsocks/shadowsocks-windows/releases
0X02 Linux use
Likewise, download shadowsocks, create json profile
The client configuration file "server" field can only fill in the proxy server IP address, can not fill or other local address 0.0.0.0
Used to start when the client sslocal command to start,
vim /etc/shadowsocks.json
written as follows:
{
"Server": "server_ip",
"SERVER_PORT": 443, # server open port
"local_address": "127.0.0.1",
"local_port": 1080,
"password": "password", # password
"timeout ": 600,
" Method ":" AES-256-CFB ", settings # encryption, must be consistent with the server
}
# Registered as a service
echo "
[Unit]
Description=shadowsocks
[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/sslocal -c /etc/shadowsocks/shadowsocks.json
[Install]
WantedBy=multi-user.target
" >> /etc/systemd/system/shadowsocks.service
systemctl start shadowsocks.service && systemctl enable shadowsocks.service
# Installation privoxy plug;
yum install privoxy -y;
# Modify the configuration file
sed -i '1336c/forward-socks5t \/ 127.0.0.1:1080 .' /etc/privoxy/config;
sed -i '1336s/^/ /g' /etc/privoxy/config;
systemctl start privoxy && systemctl enable privoxy;
# Additional environment variables
echo "
export http_proxy=http://127.0.0.1:8118
export https_proxy=http://127.0.0.1:8118
" >> /etc/profile;
source /etc/profile;
# To authenticate themselves to access Google
# curl www.google.com