Added shadowsocks-libev docker image
This image based debian:stretch Signed-off-by: Teddysun <i@teddysun.com>
This commit is contained in:
parent
903f675701
commit
c60847dcae
19
docker/shadowsocks-libev/Dockerfile
Normal file
19
docker/shadowsocks-libev/Dockerfile
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
# Dockerfile for shadowsocks-libev
|
||||||
|
# Copyright (C) 2018 Teddysun <i@teddysun.com>
|
||||||
|
# Reference URL:
|
||||||
|
# https://github.com/shadowsocks/shadowsocks-libev
|
||||||
|
|
||||||
|
FROM debian:stretch
|
||||||
|
MAINTAINER Teddysun <i@teddysun.com>
|
||||||
|
|
||||||
|
RUN set -ex; \
|
||||||
|
printf "deb http://deb.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/stretch-backports.list; \
|
||||||
|
apt-get update; \
|
||||||
|
apt-get -t stretch-backports install -y shadowsocks-libev; \
|
||||||
|
rm -rf /var/lib/apt/lists/*;
|
||||||
|
|
||||||
|
VOLUME /etc/shadowsocks-libev
|
||||||
|
|
||||||
|
USER nobody
|
||||||
|
|
||||||
|
CMD [ "/bin/bash", "-c", "/usr/bin/ss-server -c /etc/shadowsocks-libev/config.json" ]
|
||||||
46
docker/shadowsocks-libev/README.md
Normal file
46
docker/shadowsocks-libev/README.md
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
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-libev
|
||||||
|
```
|
||||||
|
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-libev/config.json` in host at first, and sample:
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"server":"0.0.0.0",
|
||||||
|
"server_port":9000,
|
||||||
|
"password":"password0",
|
||||||
|
"timeout":300,
|
||||||
|
"method":"aes-256-gcm",
|
||||||
|
"fast_open":true,
|
||||||
|
"nameserver":"8.8.8.8",
|
||||||
|
"mode":"tcp_and_udp"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
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):
|
||||||
|
```bash
|
||||||
|
$ docker run -d -p 9000:9000 -p 9000:9000/udp --name ss-libev -v /etc/shadowsocks-libev:/etc/shadowsocks-libev teddysun/shadowsocks-libev
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note**: The port number must be same as configuration.
|
||||||
|
|
||||||
|
[1]: https://github.com/shadowsocks/shadowsocks-libev
|
||||||
|
[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-libev/
|
||||||
10
docker/shadowsocks-libev/config_sample.json
Normal file
10
docker/shadowsocks-libev/config_sample.json
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"server":"0.0.0.0",
|
||||||
|
"server_port":9000,
|
||||||
|
"password":"password0",
|
||||||
|
"timeout":300,
|
||||||
|
"method":"aes-256-gcm",
|
||||||
|
"fast_open":true,
|
||||||
|
"nameserver":"8.8.8.8",
|
||||||
|
"mode":"tcp_and_udp"
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user