首先搭建java环境:
接着是搭建maven环境:
如果你的客户机器为mac,则访问http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html,选择Accept License Agreement,获得下载地址,下载这个jdk-8u65-macosx-x64.dmg文件,然后安装它。
然后,运行:
export JAVA_HOME=`/usr/libexec/java_home`
这样mac上的java环境就搭建好了。接着是搭建maven环境:
建议这样安装Maven:
apt-get install -y maven*
(yum install -y maven*)
mvn -version
显示:
Apache Maven 3.0.5
(0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 11:22:22-0400)
(0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 11:22:22-0400)
...
如上的显示则表明正确地安装了Maven.
然后,
git clone https://github.com/ksfzhaohui/shadowsocks-netty
cd shadowsocks-netty
mvn package
(稍等一段时间,当前目录里面,会生成target目录,target目录里面会出现shadowsocks-netty-0.0.2-bin.zip文件。)
cd target
unzip shadowsocks-netty-0.0.2-bin.zip
(会释放出shadowsocks-netty-0.0.2目录)
cd shadowsocks-netty-0.0.2
bogon:shadowsocks-netty-0.0.2 brite$ ls
conf shadowsocks-netty-0.0.2.jar
lib shadowsocks-netty.bat
logs shadowsocks-netty.sh
bogon:shadowsocks-netty-0.0.2 brite$ nano conf/config.xml
bogon:shadowsocks-netty-0.0.2 brite$ cat conf/config.xml
显示:
<?xml version="1.0" encoding="UTF-8" ?>
<config>
<local_port>10800</local_port>
<remotes>
<remote>
<ip_addr>your-vps-ip</ip_addr>
<port>ss-port-number</port>
<method>aes-256-cfb</method>
<password>your-password</password>
</remote>
</remotes>
</config>
bogon:shadowsocks-netty-0.0.2 brite$ java -jar shadowsocks-netty-0.0.2.jar
会显示:
2018-10-20 12:02:07 - load config !
2018-10-20 12:02:07 - load pac !
2018-10-20 12:02:07 - Start At Port 10800
不要关闭此终端窗口,然后设置浏览器的socks5代理服务器为127.0.0.1,端口为10800 ,浏览器即可翻墙。
项目地址:https://github.com/ksfzhaohui/shadowsocks-netty