Added shadowsocks-r docker image

Signed-off-by: Teddysun <i@teddysun.com>
This commit is contained in:
Teddysun 2018-06-23 14:54:49 +09:00
parent c60847dcae
commit 17f514f67c
No known key found for this signature in database
GPG Key ID: 09BD4C080AD6C46D
4 changed files with 109 additions and 2 deletions

View File

@ -1,8 +1,10 @@
## Shadowsocks-libev Docker Image by Teddysun ## Shadowsocks-libev Docker Image by Teddysun
[shadowsocks-libev][1] is a lightweight secured socks5 proxy for embedded devices and low end boxes. It is a port of [shadowsocks][2] created by @clowwindy maintained by @madeye and @linusyang. [shadowsocks-libev][1] is a lightweight secured socks5 proxy for embedded devices and low end boxes.
It is a port of [shadowsocks][2] created by @clowwindy maintained by @madeye and @linusyang.
Docker images are built for quick deployment in various computing cloud providers. For more information on docker and containerization technologies, refer to [official document][3]. Docker images are built for quick deployment in various computing cloud providers.
For more information on docker and containerization technologies, refer to [official document][3].
## Prepare the host ## Prepare the host
@ -13,12 +15,14 @@ If you need to install docker by yourself, follow the [official installation gui
```bash ```bash
$ docker pull teddysun/shadowsocks-libev $ docker pull teddysun/shadowsocks-libev
``` ```
This pulls the latest release of shadowsocks-libev. This pulls the latest release of shadowsocks-libev.
It can be found at [Docker Hub][5]. It can be found at [Docker Hub][5].
## Start a container ## Start a container
You **must create a configuration file** `/etc/shadowsocks-libev/config.json` in host at first, and sample: You **must create a configuration file** `/etc/shadowsocks-libev/config.json` in host at first, and sample:
``` ```
{ {
"server":"0.0.0.0", "server":"0.0.0.0",
@ -31,8 +35,10 @@ You **must create a configuration file** `/etc/shadowsocks-libev/config.json` i
"mode":"tcp_and_udp" "mode":"tcp_and_udp"
} }
``` ```
This container with sample configuration `/etc/shadowsocks-libev/config.json` This container with sample configuration `/etc/shadowsocks-libev/config.json`
There is an example to start a container that listens on `9000` (both TCP and UDP): There is an example to start a container that listens on `9000` (both TCP and UDP):
```bash ```bash
$ docker run -d -p 9000:9000 -p 9000:9000/udp --name ss-libev -v /etc/shadowsocks-libev:/etc/shadowsocks-libev teddysun/shadowsocks-libev $ docker run -d -p 9000:9000 -p 9000:9000/udp --name ss-libev -v /etc/shadowsocks-libev:/etc/shadowsocks-libev teddysun/shadowsocks-libev
``` ```

View File

@ -0,0 +1,23 @@
# Dockerfile for ShadowsocksR
# Copyright (C) 2018 Teddysun <i@teddysun.com>
# Reference URL:
# https://github.com/shadowsocksrr/shadowsocksr
FROM debian:stretch
MAINTAINER Teddysun <i@teddysun.com>
RUN set -ex; \
apt-get update; \
apt-get install -y wget python libsodium-dev openssl; \
rm -rf /var/lib/apt/lists/*; \
wget -O /tmp/shadowsocksr-3.2.2.tar.gz https://github.com/shadowsocksrr/shadowsocksr/archive/3.2.2.tar.gz; \
tar zxf /tmp/shadowsocksr-3.2.2.tar.gz -C /tmp; \
mv /tmp/shadowsocksr-3.2.2/shadowsocks /usr/local/; \
rm -fr /tmp/shadowsocksr-3.2.2;
COPY ./config_sample.json /etc/shadowsocks-r/config.json
VOLUME /etc/shadowsocks-r
USER nobody
CMD [ "/bin/bash", "-c", "/usr/local/shadowsocks/server.py -c /etc/shadowsocks-r/config.json" ]

View File

@ -0,0 +1,60 @@
## ShadowsocksR Docker Image by Teddysun
[shadowsocksr][1] is a lightweight secured socks5 proxy for embedded devices and low end boxes.
It is a port of [shadowsocks][2] created by @clowwindy maintained by @breakwa11 and @Akkariiin.
Docker images are built for quick deployment in various computing cloud providers.
For more information on docker and containerization technologies, refer to [official document][3].
## Prepare the host
If you need to install docker by yourself, follow the [official installation guide][4].
## Pull the image
```bash
$ docker pull teddysun/shadowsocks-r
```
This pulls the latest release of shadowsocks-libev.
It can be found at [Docker Hub][5].
## Start a container
You **must create a configuration file** `/etc/shadowsocks-r/config.json` in host at first, and sample:
```
{
"server":"0.0.0.0",
"server_ipv6":"::",
"server_port":9000,
"local_address":"127.0.0.1",
"local_port":1080,
"password":"password0",
"timeout":120,
"method":"aes-256-cfb",
"protocol":"origin",
"protocol_param":"",
"obfs":"plain",
"obfs_param":"",
"redirect":"",
"dns_ipv6":false,
"fast_open":true,
"workers":1
}
```
This container with sample configuration `/etc/shadowsocks-r/config.json`
There is an example to start a container that listens on `9000` (both TCP and UDP):
```bash
$ docker run -d -p 9000:9000 -p 9000:9000/udp --name ssr -v /etc/shadowsocks-r:/etc/shadowsocks-r teddysun/shadowsocks-r
```
**Note**: The port number must be same as configuration.
[1]: https://github.com/shadowsocksrr/shadowsocksr
[2]: https://shadowsocks.org/en/index.html
[3]: https://docs.docker.com/
[4]: https://docs.docker.com/install/
[5]: https://hub.docker.com/r/teddysun/shadowsocks-r/

View File

@ -0,0 +1,18 @@
{
"server":"0.0.0.0",
"server_ipv6":"::",
"server_port":9000,
"local_address":"127.0.0.1",
"local_port":1080,
"password":"password0",
"timeout":120,
"method":"aes-256-cfb",
"protocol":"origin",
"protocol_param":"",
"obfs":"plain",
"obfs_param":"",
"redirect":"",
"dns_ipv6":false,
"fast_open":true,
"workers":1
}