mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-23 01:39:27 +02:00
add shadowsocks-rust
This commit is contained in:
parent
1cd5d434e5
commit
beaf83ac48
35
shadowsocks/rust/Dockerfile
Normal file
35
shadowsocks/rust/Dockerfile
Normal file
@ -0,0 +1,35 @@
|
||||
#
|
||||
# Dockerfile for shadowsocks-rust
|
||||
#
|
||||
|
||||
FROM alpine:3
|
||||
MAINTAINER EasyPi Software Foundation
|
||||
|
||||
ARG SS_RUST_VERSION=v1.14.3
|
||||
ARG SS_RUST_FILE=shadowsocks-${SS_RUST_VERSION}.x86_64-unknown-linux-gnu.tar.xz
|
||||
ARG SS_RUST_URL=https://github.com/shadowsocks/shadowsocks-rust/releases/download/${SS_RUST_VERSION}/${SS_RUST_FILE}
|
||||
|
||||
RUN set -ex \
|
||||
&& apk add --no-cache curl \
|
||||
&& curl -sSL ${SS_RUST_URL} | tar xJ -C /usr/bin/ \
|
||||
&& apk del curl
|
||||
|
||||
ENV SERVER_ADDR=0.0.0.0
|
||||
ENV SERVER_PORT=8388
|
||||
ENV METHOD=chacha20-ietf-poly1305
|
||||
ENV PASSWORD=
|
||||
ENV DNS=8.8.8.8,8.8.4.4
|
||||
ENV TIMEOUT=300
|
||||
ENV WORKERS=4
|
||||
|
||||
EXPOSE $SERVER_PORT/tcp $SERVER_PORT/udp
|
||||
|
||||
CMD ssservice server -s "$SERVER_ADDR:$SERVER_PORT" \
|
||||
-k "${PASSWORD:-$(hostname)}" \
|
||||
-m "$METHOD" \
|
||||
--dns "$DNS" \
|
||||
--timeout "$TIMEOUT" \
|
||||
--worker-threads "$WORKERS" \
|
||||
--tcp-fast-open --tcp-no-delay \
|
||||
-U
|
||||
|
12
shadowsocks/rust/docker-compose.yml
Normal file
12
shadowsocks/rust/docker-compose.yml
Normal file
@ -0,0 +1,12 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
shadowsocks:
|
||||
image: vimagick/shadowsocks-rust
|
||||
ports:
|
||||
- "8388:8388/tcp"
|
||||
- "8388:8388/udp"
|
||||
environment:
|
||||
- SERVER_PORT=8388
|
||||
- METHOD=chacha20-ietf-poly1305
|
||||
- PASSWORD=9MLSpPmNt
|
||||
restart: unless-stopped
|
Loading…
Reference in New Issue
Block a user