在linux vps上。
首先安装gradle环境:
Gradle的运行需要依赖jdk8,所以在安装Gradle之前我们得先把jdk8装上。然后,
wget https://downloads.gradle.org/distributions/gradle-3.5-bin.zip
根据Gradle官方推荐,我们将安装包的内容解压至
mkdir /opt/gradle
unzip -d /opt/gradle/ gradle-3.5-bin.zip
cd /opt/gradle/
(/opt/gradle/里面有gradle-3.5/bin目录,bin目录里面有可执行文件gradle)
export PATH=$PATH:/opt/gradle/gradle-3.5/bin
echo 'export PATH=$PATH:/opt/gradle/gradle-3.5/bin' >> /etc/profile
cd ~
git clone https://github.com/Bestoa/shadowsocks-vertx shadowsocks-vertx-by-Bestoa
cd shadowsocks-vertx-by-Bestoa
gradle distZip
(会在当前目录下,生成build目录)
(bin目录里面有可执行文件shadowsocks)
./shadowsocks --help
显示:
首先安装gradle环境:
Gradle的运行需要依赖jdk8,所以在安装Gradle之前我们得先把jdk8装上。然后,
wget https://downloads.gradle.org/distributions/gradle-3.5-bin.zip
根据Gradle官方推荐,我们将安装包的内容解压至
/opt/gradle
路径。mkdir /opt/gradle
unzip -d /opt/gradle/ gradle-3.5-bin.zip
cd /opt/gradle/
(/opt/gradle/里面有gradle-3.5/bin目录,bin目录里面有可执行文件gradle)
export PATH=$PATH:/opt/gradle/gradle-3.5/bin
echo 'export PATH=$PATH:/opt/gradle/gradle-3.5/bin' >> /etc/profile
gradle --version
检查gradle是否安装完成,以及查看其版本号。cd ~
git clone https://github.com/Bestoa/shadowsocks-vertx shadowsocks-vertx-by-Bestoa
cd shadowsocks-vertx-by-Bestoa
gradle distZip
(会在当前目录下,生成build目录)
cd build
cd distributions
(distributions目录里面有一个shadowsocks-0.8.4.zip文件)
unzip shadowsocks-0.8.4.zip
cd shadowsocks-0.8.4
cd bin(bin目录里面有可执行文件shadowsocks)
./shadowsocks --help
显示:
01 May 2020 13:11:24,804 INFO Shadowsocks 0.8.3
Usage:
-m crypto method
-k password
-p bind port(server)/remote port(client)
-l local port
-s server
-S server mode
-c config file
-t timeout(unit is second)
-h show help.
nano /etc/systemd/system/shadowsocks-vertx-by-Bestoa.service
cat /etc/systemd/system/shadowsocks-vertx-by-Bestoa.service
[Unit]
After=network.target
[Service]
ExecStart=/root/shadowsocks-vertx-by-Bestoa/build/distributions/shadowsocks-0.8.4/bin/shadowsocks -S -p 3289 -k mypassword -m aes-256-cfb
Restart=always
[Install]
WantedBy=multi-user.target
然后运行:
systemctl start shadowsocks-vertx-by-Bestoa
systemctl enable shadowsocks-vertx-by-Bestoa
服务器端搭建完成。
至于客户端,兼容各大平台下的ss客户端程序。把4个参数填入即可。