-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathshadowsocks_rust翻墙.txt
56 lines (47 loc) · 2.17 KB
/
shadowsocks_rust翻墙.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
shadowsocks-rust是使用rust语言编写的科学上网工具。
shadowsocks-rust包的仓库地址:https://github.com/shadowsocks/shadowsocks-rust
使用shadowsocks-rust实现科学上网的详细步骤如下:
1、安装rust
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
2、安装c/c++编译环境
Ubuntu在默认情况下没有提供c/c++的编译环境,因此需要手动安装。如果单独安装gcc以及g++比较麻烦,我们可以使用Ubuntu提供的build-essential软件包。
sudo apt-get install build-essential
3、安装libsodium
shadowsocks-rust依赖libsodium这个工具包。
libsodium包的仓库地址:https://github.com/jedisct1/libsodium
sudo wget https://github.com/jedisct1/libsodium/releases/download/1.0.17/libsodium-1.0.17.tar.gz
tar xf libsodium-1.0.17.tar.gz
cd libsodium-1.0.17/
sudo ./configure
sudo make -j3 && sudo make install
sudo ldconfig
4、安装openssl
shadowsocks-rust依赖openssl开发包。
sudo apt-get install openssl
sudo apt-get install libssl-dev
sudo apt-get install pkg-config
5、安装shadowsocks-rust
cargo install shadowsocks-rust
shadowsocks-rust安装完成后,将会得到两个全局命令ssserver和sslocal。
ssserver用于配置并启动shadowsocks-rust服务器。sslocal用于配置并启动shadowsocks-rust客户端,一般用不到。
6、编写shadowsocks-rust配置文件
编写shadowsocks-rust配置文件config.json(文件名任意),配置文件内容如下:
{
"server": "your_server_ip", // 更改
"server_port": 8388, // 更改
"local_address": "127.0.0.1",
"local_port": 1080, // 更改
"password": "yourpassword", // 更改
"timeout": 300,
"method": "aes-256-cfb"
}
7、启动shadowsocks-rust服务器
nohup ssserver -c config.json &
8、配置并启动你本地的shadowsocks客户端
本地shadowsocks客户端和shadowsocks-rust无关,只要把本地客户端的服务器地址、端口、密码修改为我们刚配置好的shadowsocks-rust服务器即可。
各平台shadowsocks客户端:
windows:https://github.com/shadowsocks/shadowsocks-windows
android:https://github.com/shadowsocks/shadowsocks-android
ios:https://github.com/RobertYan/ShadowsocksX