From 1e27bb23cba19ac6b74388d042ce99a534d50a2f Mon Sep 17 00:00:00 2001 From: newnius Date: Tue, 26 Sep 2017 12:34:19 +0800 Subject: [PATCH] add rpi-shadowsocks --- rpi-shadowsocks/2.9.1/Dockerfile | 19 +++++++++++++++++++ rpi-shadowsocks/2.9.1/README.md | 23 +++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 rpi-shadowsocks/2.9.1/Dockerfile create mode 100644 rpi-shadowsocks/2.9.1/README.md diff --git a/rpi-shadowsocks/2.9.1/Dockerfile b/rpi-shadowsocks/2.9.1/Dockerfile new file mode 100644 index 0000000..a30d573 --- /dev/null +++ b/rpi-shadowsocks/2.9.1/Dockerfile @@ -0,0 +1,19 @@ +FROM hypriot/rpi-alpine-scratch:v3.4 + +MAINTAINER Newnius + +RUN apk update && \ + apk add python openssl && \ + rm -rf /var/cache/apk/* + +RUN wget -O shadowsocks.tar.gz https://github.com/shadowsocks/shadowsocks/archive/2.9.1.tar.gz && \ + tar -xzf shadowsocks.tar.gz && \ + rm shadowsocks.tar.gz && \ + ln -s /shadowsocks-2.9.1 /shadowsocks + +RUN echo '#!/bin/sh' > /usr/bin/ssserver && \ + echo 'python /shadowsocks/shadowsocks/server.py "$@"' >> /usr/bin/ssserver && \ + echo '#!/bin/sh' > /usr/bin/sslocal && \ + echo 'python /shadowsocks/shadowsocks/local.py "$@"' >> /usr/bin/sslocal && \ + chmod +x /usr/bin/ssserver && \ + chmod +x /usr/bin/sslocal diff --git a/rpi-shadowsocks/2.9.1/README.md b/rpi-shadowsocks/2.9.1/README.md new file mode 100644 index 0000000..0201562 --- /dev/null +++ b/rpi-shadowsocks/2.9.1/README.md @@ -0,0 +1,23 @@ +# Run shadowsocks in RaspberryPi + +## Run as server +``` +docker run \ +-d \ +--restart always \ +--publish 1080:1080 \ +--name shadowsocks \ +newnius/rpi-shadowsocks \ +ssserver -p 1080 -k PASSWORD -m aes-256-cfb +``` + +## Run as client +``` +docker run \ +-d \ +--restart always \ +--publish 1081:1081 \ +--name shadowsocks \ +newnius/rpi-shadowsocks \ +sslocal -s SERVER_IP -p 1080 -l 1081 -k PASSWORD -m aes-256-cfb +```