Total Pageviews

Sunday, 3 June 2018

安装shadowsocksr-native

登录linux vps,然后
wget https://cmake.org/files/v3.10/cmake-3.10.1.tar.gz
tar zxvf cmake-3.10.1.tar.gz
cd cmake-3.10.1
./configure
make
make install

apt-get install build-essential autoconf libtool asciidoc xmlto -y
(安装asciidoc会占用1.3gb的空间,所以本文的方法太消耗空间,不推荐使用。)
apt-get install git gcc g++ automake -y
apt-get -f install
git clone https://github.com/ShadowsocksR-Live/shadowsocksr-native
cd shadowsocksr-native
git submodule update --init
mkdir build && cd build && cmake .. && make
(make时,会显示:
 Linking C executable ssr-server
...
 Linking C executable ssr-client

root@ar:~/shadowsocksr-native/build# ls
CMakeCache.txt    Makefile         config.h  libcork     libudns
CMakeFiles    cmake_install.cmake  depends   libipset  src
root@ar:~/shadowsocksr-native/build# find . -name ssr-server
./src/ssr-server
(在src目录下,生成了可执行文件ssr-server)
root@ar:~/shadowsocksr-native/build# cd src
root@ar:~/shadowsocksr-native/build/src# ls
CMakeFiles  Makefile  cmake_install.cmake  ssr-client  ssr-local  ssr-server
root@ar:~/shadowsocksr-native/build/src# ./ssr-server -h
ShadowsocksR native server

Usage:

  ssr-server [-d] [-c <config file>] [-h]

Options:

  -d                     Run in background as a daemon.
  -c <config file>       Configure file path.
                         Default: /etc/ssr-native/config.json
  -h                     Show this help message.
(文件/etc/ssr-native/config.json并不存在,所以不用理它)
root@ar:~/shadowsocksr-native/build/src# cp ~/shadowsocksr-native/config.json ./
root@ar:~/shadowsocksr-native/build/src# nano config.json
root@ar:~/shadowsocksr-native/build/src# cat config.json
{
    "server": "0.0.0.0",
    "server_port": 9443,
    "method": "aes-256-cfb",
    "password": "my-password",
    "protocol": "origin", // "auth_aes128_md5",
    "protocol_param": "",
    "obfs": "plain", // "tls1.2_ticket_auth",
    "obfs_param": "",
    "local_address": "127.0.0.1",
    "local_port": 1080,
    "udp": true,
    "timeout": 300
}
root@ar:~/shadowsocksr-native/build/src# ./ssr-server -c config.json -d
服务器端就搭建好了。

客户端。见此:https://github.com/erguotou520/electron-ssr/releases/,
mac系统,下载https://github.com/erguotou520/electron-ssr/releases/download/v0.2.3/electron-ssr-0.2.3.dmg
windows系统,下载https://github.com/erguotou520/electron-ssr/releases/download/v0.2.3/electron-ssr-setup-0.2.3.exe
安装好后,填入相关参数。
or: ShadowsocksX-NGShadowsocksX-R

项目地址:https://github.com/ShadowsocksR-Live/shadowsocksr-native
不过这个shadowsocksr-native依赖libuv,不太robust.
------------------------

A shadowsocksR implementation in uvw, used in QvPlugin-SSR and Trojan-Qt5.

shadowsocksr-uvw

A minimal dependency shadowsocksr implementation.

How to build

If you want shadowsocksr-uvw to avoid using the system's own libuv and libsodium, the default compilation options will be helpful. The compilation options are as follows, which will link libuv and libsodium statically.
git submodule update --init --recursive
mkdir build
cd build
cmake .. -DSSR_UVW_WITH_QT=0
make
By default, shadowsocksr-uvw will use the libuv and libsodium in the submodule for static linking. To avoid this, you can directly specify the compilation options as shown below.
mkdir build
cd build
cmake .. -DSSR_UVW_WITH_QT=0 -DUSE_SYSTEM_SODIUM=ON -DUSE_SYSTEM_LIBUV=ON -DSTATIC_LINK_LIBUV=OFF -DSTATIC_LINK_SODIUM=OFF
make

Encrypto method

nonerc4rc4-md5-6rc4-md5
aes-128-cfbaes-192-cfbaes-256-cfb
aes-128-ctraes-192-ctraes-256-ctr
camellia-128-cfbcamellia-192-cfbcamellia-256-cfb
bf-cfbcast5-cfbdes-cfbidea-cfbrc2-cfbseed-cfb
salsa20chacha20chacha20-ietf

Protocols

Protocols
origin
auth_sha1
auth_sha1_v2
auth_sha1_v4
auth_aes128_sha1
auth_aes128_md5
auth_chain_a
auth_chain_b
auth_chain_c
auth_chain_d
auth_chain_e
auth_chain_f

obfuscators

obfuscators
plain
http_simple
http_post
tls1.2_ticket_auth

from https://github.com/qv2ray/shadowsocksr-uvw

No comments:

Post a Comment