Home

Awesome

spp-shadowsocks-plugin

<img src="https://img.shields.io/github/license/esrrhs/spp-shadowsocks-plugin"> <img src="https://img.shields.io/github/languages/top/esrrhs/spp-shadowsocks-plugin"> Go Report Card <img src="https://img.shields.io/github/v/release/esrrhs/spp-shadowsocks-plugin"> <img src="https://img.shields.io/github/downloads/esrrhs/spp-shadowsocks-plugin/total"> <img src="https://img.shields.io/github/actions/workflow/status/esrrhs/spp-shadowsocks-plugin/go.yml?branch=master">

spp针对shadowsocks的插件

     +------------+                    +---------------------------+
     |  SS Client +-- Local Loopback --+  Plugin Client (Tunnel)   +--+
     +------------+                    +---------------------------+  |
                                                                      |
                 Public Internet (Obfuscated/Transformed traffic) ==> |
                                                                      |
     +------------+                    +---------------------------+  |
     |  SS Server +-- Local Loopback --+  Plugin Server (Tunnel)   +--+
     +------------+                    +---------------------------+

特性

编译

编译到非Android平台

# go build

或者

# ./pack.sh

编译到Android平台

准备Java环境

# yum install java-1.8.0-openjdk-devel -y
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk/
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
# source ~/.bashrc

准备Android SDK环境

# mkdir -p /home/project/android/cmdline-tools
# cd /home/project/android/cmdline-tools
# wget https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip
# unzip commandlinetools-linux-6609375_latest.zip 
export ANDROID_SDK_ROOT=/home/project/android
# source ~/.bashrc
# cd /home/project/android/cmdline-tools
# ./tools/bin/sdkmanager  "build-tools;28.0.3"  "platform-tools"  "platforms;android-28"

准备Android NDK环境

# wget https://dl.google.com/android/repository/android-ndk-r21b-linux-x86_64.zip
# unzip android-ndk-r21b-linux-x86_64.zip
# mv android-ndk-r21b /home/project
export ANDROID_NDK_HOME=/home/project/android-ndk-r21b
# source ~/.bashrc

编译插件

# ./pack_android.sh

使用

非Android平台

# gunzip shadowsocks2-linux.gz
# ./shadowsocks2-linux -c 'ss://AEAD_CHACHA20_POLY1305:your-password@127.0.0.1:8488' -verbose --plugin spp-shadowsocks-plugin --plugin-opts "proto=rudp" -socks :1080 
# ./shadowsocks2-linux -s 'ss://AEAD_CHACHA20_POLY1305:your-password@:8488' -verbose --plugin spp-shadowsocks-plugin --plugin-opts "type=server;proto=rudp"
# proxychains4 curl google.com
[proxychains] config file found: /usr/local/etc/proxychains.conf
[proxychains] preloading /usr/local/lib/libproxychains4.so
[proxychains] DLL init: proxychains-ng 4.14-git-23-g7fe8139
[proxychains] Strict chain  ...  127.0.0.1:1080  ...  google.com:80  ...  OK
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>

Android平台