mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-24 17:33:46 +00:00
Add experimental HTTP/TLS obfuscating as an **optional extension** of shadowsocks protocol. More discussions can be found here: https://github.com/shadowsocks/shadowsocks-org/issues/26 As this feature is still a SIP (Shadowsocks Improvement Proposal), it's very unstable and experimental. So, 1. Don't enable it unless you know what it is. 2. Be very careful when using it in production environment.
60 lines
1.6 KiB
Docker
60 lines
1.6 KiB
Docker
#
|
|
# Dockerfile for shadowsocks-libev
|
|
#
|
|
|
|
FROM alpine
|
|
MAINTAINER kev <noreply@datageek.info>
|
|
|
|
ARG SS_VER=2.6.0
|
|
ARG SS_URL=https://github.com/shadowsocks/shadowsocks-libev/archive/v$SS_VER.tar.gz
|
|
|
|
ENV SERVER_ADDR 0.0.0.0
|
|
ENV SERVER_PORT 8388
|
|
ENV PASSWORD=
|
|
ENV METHOD aes-256-cfb
|
|
ENV TIMEOUT 300
|
|
ENV DNS_ADDR 8.8.8.8
|
|
ENV DNS_ADDR_2 8.8.4.4
|
|
|
|
RUN set -ex && \
|
|
apk add --no-cache --virtual .build-deps \
|
|
asciidoc \
|
|
autoconf \
|
|
build-base \
|
|
curl \
|
|
libtool \
|
|
linux-headers \
|
|
openssl-dev \
|
|
pcre-dev \
|
|
tar \
|
|
xmlto && \
|
|
cd /tmp && \
|
|
curl -sSL $SS_URL | tar xz --strip 1 && \
|
|
./configure --prefix=/usr --disable-documentation && \
|
|
make install && \
|
|
cd .. && \
|
|
|
|
runDeps="$( \
|
|
scanelf --needed --nobanner /usr/bin/ss-* \
|
|
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
|
| xargs -r apk info --installed \
|
|
| sort -u \
|
|
)" && \
|
|
apk add --no-cache --virtual .run-deps $runDeps && \
|
|
apk del .build-deps && \
|
|
rm -rf /tmp/*
|
|
|
|
USER nobody
|
|
|
|
EXPOSE $SERVER_PORT/tcp $SERVER_PORT/udp
|
|
|
|
CMD ss-server -s $SERVER_ADDR \
|
|
-p $SERVER_PORT \
|
|
-k ${PASSWORD:-$(hostname)} \
|
|
-m $METHOD \
|
|
-t $TIMEOUT \
|
|
--fast-open \
|
|
-d $DNS_ADDR \
|
|
-d $DNS_ADDR_2 \
|
|
-u
|