Showing posts with label shadowsocks. Show all posts
Showing posts with label shadowsocks. Show all posts

Monday, September 24, 2018

GoQuiet/Shadowsocks

Server: 

`wget https://github.com/cbeuw/GoQuiet/releases/download/v1.2.1/gq-server-linux-arm64-1.2.1`

` mv gq-server-linux-arm64-1.2.1 /usr/local/bin`

`chmod +x /usr/local/bin/gq-server-linux-arm64-1.2.1`
 
`vi /etc/gqserver.json`
`{
"WebServerAddr":"127.0.0.1:444", // Nginx Https Server On port 444
"Key":"qFR0UtSfyUJuYan9"
}`

...Install Shadowsocks-libev...
`vi /etc/shadowsocks-libev/config.json`
`{
"server":"0.0.0.0",
"server_port":443,
"local_port":1080,
"password":"V12n2IiyqYygJUuj",
"timeout":60,
"method":"chacha20",
"plugin":"/usr/local/bin/
gq-server-linux-arm64-1.2.1",
"plugin_opts":"/etc/gqserver.json"

}`
Test:
`ss-server -c /etc/shadowsocks-libev/config.json`

Start on boot:
`vi /etc/systemd/system/shadowsocks-libev.service`
 
`[Unit]
Description=Shadowsocks-libev Server
After=network.target

[Service]
ExecStart=/usr/bin/ss-server -c /etc/shadowsocks-libev/config.json
Restart=on-abort

[Install]
WantedBy=multi-user.target`

Command:
`reboot`

`systemctl start shadowsocks-libev`
`systemctl enable shadowsocks-libev`

Client

Download Shadowsocks for Windows

Visit Github and identify the latest release of Shadowsocks for Windows. At the time of writing, it was Shadowsocks-4.0.8.zip.
Download and unzip this file. It creates a folder named, for example, Shadowsocks-4.0.8.

Download GoQuiet Client

Visit Github and identify the latest release of GoQuiet for your platform. At the time of writing, for a 64-bit Windows PC, this was gq-client-win64-1.0.0.exe.
Download this file and place it in the same folder as Shadowsocks for Windows. In our example, that folder is Shadowsocks-4.0.8.

Configure GoQuiet

Before launching the program, in the same folder, use Notepad++ to create a new file named gqclient.json.
`{
"ServerName":"www.theorymag.ml",
"Key":"qFR0UtSfyUJuYan9",
"TicketTimeHint":3600,
"Browser":"chrome"
}`
The Key is the preshared key (PSK) for GoQuiet, which may be different from your Shadowsocks password.

Launch and Configure Shadowsocks

Double-click on Shadowsocks.exe to launch the program.
You may get a warning to say, "Malicious file" or "Windows protected your PC," and you will need to click on Run anyway.
Configure the Shadowsocks client on Windows to match the settings on the server. For the plugin and plugin options, give the full path to the files, unless they are in the same folder as your Shadowsocks executable.
@reference_1_github.com
GoQuiet
@reference_2_dcamero.azurewebsites.net
Shadowsocks + GoQuiet

Tuesday, September 5, 2017

Install shadowsocks-libev from source on Ubuntu

1. Install the packages required:
mkdir shadowsocks-libev && cd shadowsocks-libev
apt-get install build-essential autoconf libtool libssl-dev \
  gawk debhelper dh-systemd init-system-helpers pkg-config git
2. Download the source code through git:
git clone https://github.com/shadowsocks/shadowsocks-libev.git
3. build shadowsocks-libev and all its dependencies by script:
mkdir -p ~/build-area/
cp ./scripts/build_deb.sh ~/build-area/
cd ~/build-area
./build_deb.sh
4.Edit /etc/shadowsocks-libev/config.json, configure as follows:
{
 "server":"X.X.X.X",
 "server_port":443,
 "password":"password",
 "timeout":300,
 "method":"aes-256-cfb"
}
5. Startup

Ubuntu/Debian Installed from deb package(Installed from deb package will implicitly activate self start-up):
service shadowsocks-libev restart

@reference_1_github.com
@reference_2_github.com



Monday, December 19, 2016

Compile and Install Shadowsocks-libev on Ubuntu 16.04 Server

1. git version control tool

 apt-get update
 apt install git

2. Clone the source repository from Github.

git clone https://github.com/shadowsocks/shadowsocks-libev.git 
cd shadowsocks-libev

3. Install build dependencies.

apt install build-essential autoconf libtool libssl-dev asciidoc
apt-get install libpcre3 libpcre3-dev

4. Configure build environment and compile it.

./configure && make

5. Install shadowsocks-libev

make install
---------------------------------------------
nano /etc/shadowsocks/config.json
......
{
"server":"your_server_ip",
"server_port":9999,
"local_address": "127.0.0.1",
"local_port":1080,
"password":"your_passwd",
"timeout":600,
"method":"aes-256-cfb"
}
---------------------------------------------
Run:
nohup ss-server -c /etc/shadowsocks/config2.json &

Then:
nano /etc/rc.local
Add the ss-server command above exit 0

@reference_1_linuxbabe
@reference_2_cyberciti

-------------------------------------------------
no plan to support multi port configuration. Actually you can use multiple instances instead. For example:
ss-server -c config1.json -f pid1
ss-server -c config2.json -f pid2
ss-server -c config3.json -f pid3
As the best practice we recommend for shadowsocks-libev, it helps to isolate each user in different processes and reconfigure each user's port/password/encyption/timeout without reload/restart the whole service. Furthermore, this approach enables us to manage users with legacy control panels, for example old SSH / VHOST panels with each user's ss-server running in its own space.
Compared to other implementations, shadowsocks-libev uses much fewer resources (about 1MB memory and hundreds of file descriptors in a typical usage) . As a result, this kind of multi processes should only introduce slight overhead and even works well for low end boxes. @reference_3_github
 -------------------------------------------
不用多实例,用iptables的端口转发功能,随意设定在多少端口上监听 。
 iptables -t nat -A PREROUTING -d <监听地址>/32 -p tcp -m tcp --dport <起始端口>:<结束端口>  -j REDIRECT --to-ports <SS 端口>
@reference_4_plus.google
@reference_5_teddysun