add rpi-shadowsocks

This commit is contained in:
Newnius 2017-09-26 12:34:19 +08:00
parent b5e3da77c1
commit 1e27bb23cb
2 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,19 @@
FROM hypriot/rpi-alpine-scratch:v3.4
MAINTAINER Newnius <newnius.cn@gmail.com>
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

View File

@ -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
```