This is a creation in Article, where the information may have evolved or changed.
The text begins, please note the following:
Original link: https://techllage.com/techllage/131-shadowsocks-go (Hung)
Today again to send the tutorial ... After a few days to review busy up will not be able to send, simply take advantage of this Sunday night issued.
Today I will introduce the Shadowsocks-go configuration tutorial.
The tutorial I wrote yesterday was mainly about Shadowsocks-libev/shadowsocks-python's tutorial. These two models are the fastest and most stable version of the development process. The advantage of shadowsocks-go is that it can configure multi-users and even clients to configure multiple servers.
So the practical value is very high. But the configuration is slightly more difficult.
(not to be continued)
My lab environment: Techllage Server, CentOS 7 x64 version, Golang 1.4. The entire process requires only an SSH client, which can be easily deployed on the phone on your computer.
First: Deploy the Golang environment.
Open Golang Official download page: https://golang.org/dl/
Download the version you need. Since our server is under Linux, the version used is: go1.4.linux-amd64.tar.gz
We can easily get a download link.
Now we use SSH software to connect to the VPS.
For example, execute the following command in the/root directory:
wget https://storage.googleapis.com/golang/go1.4.linux-amd64.tar.gz--no-check-certificate
Download to a tar.gz installation package.
Perform:
Tar zxvf go1.4.linux-amd64.tar.gz
Get a folder called Go.
After execution:
MV Go/usr/local/go
Your go environment is now installed, but you also need the configuration of the environment variables.
2: Configure the GO environment variable.
Modify/etc/profile:
Vi/etc/profile
At the bottom of the file, add such an environment variable configuration:
#Go Configurationexport Goroot=/usr/local/go This is your Go install directory Export GOARCH=AMD64 This is your processor type ... For example I386,amd64export Goos=linux This is your operating system type. Export Gopath=root/workstation/go This is your Go project folder, if we use a compiled package, we do not need this export path= $GOROOT/bin: $PATH Your go command folder, please keep the default ......
3: Update environment variable settings
Source/etc/profile
Then, execute
Go version
The release number indicates that the go deployment is successful.
4: Install various gogettools.
If you do not want to compile, please skip this step ...
svn-subversion, download at:http://subversion.apache.org/packages.htmlhg-mercurial, download at/http Mercurial.selenic.com/wiki/downloadgit-git, download at Http://git-scm.com/downloadsbzr-Bazaar, download at/http Wiki.bazaar.canonical.com/download
What we need is git and Hg.
Yum install Git-yyum install ' *mercurial* '
And, of course, gcc ... Yum Install GCC
5: Install Shadowsocks-go
If you want to use a ready-made version, look directly at 6~
Go get github.com/shadowsocks/shadowsocks-go/cmd/shadowsocks-server
Pay attention to the permissions of your environment variable export Gopath directory!
Open Root/workstation/go/bin. This is your Shadowsocks installation directory ...
6: Download the off-the-shelf version.
http://dl.chenyufei.info/shadowsocks/
Download the version you need. And then
gzip-d file name
Executes the file on the output shadowsocks.
7:configuration.
Shadowsocks-go scans the Config.json file in the current directory at boot time. So you need to create a Config.json in its installation directory:
If you do not have special needs, write this:
{"Server": "104.224.155.124", "Server_port": 55555 "password": "1111" "Timeout": "Method": "Rc4-md5"}
8: Start.
The best way to keep shadowsocks-go running in the background is:
./shadowsocks-server > Log &
[
If you start the SS, prompt ' bash:./shadowsocks-server:permission denied ',
Chmod-r 777 Shadowsocks-server
]
9:multi-user.
Implementation: Replace the Server_port and Password fields with port password.
Instance:
{"Server": "104.224.155.124", "Port_password": {"23331": "Ss1", "23332": "SS2", "23333": "SS3"}, "timeout ":", "Method": "Rc4-md5"}
10:multi-server:for Linux fans! #^_^#
The implementation is just as simple: replace the original Server,server_port,method and passwd fields with Server_password.
Instance:
{"Local_port": "Server_password": [["127.0.0.1:8387", "SS1", "Rc4-md5"],["127.0.0.1:8388", "SS2", "AES-128-CFB" ]]}
Above.