Signed-off-by: shirakun <nico@ni-co.moe>
This commit is contained in:
commit
989d7b8b87
25
.docker/build
Normal file
25
.docker/build
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
build_ss_libev(){
|
||||
SS_DIR = $BUILD_DIR/shadowsocks-libev
|
||||
apk add build-deps git autoconf automake libtool build-base libev-dev linux-headers libsodium-dev mbedtls-dev pcre-dev c-ares-dev
|
||||
git clone https://github.com/shadowsocks/shadowsocks-libev.git $SS_DIR
|
||||
cd $SS_DIR
|
||||
./autogen.sh && ./configure
|
||||
make && make install
|
||||
}
|
||||
|
||||
build_obfs(){
|
||||
OBFS_DIR = $BUILD_DIR/simple-obfs
|
||||
apk add gcc autoconf make libtool automake zlib-devel openssl asciidoc xmlto libpcre32 libev-dev g++ linux-headers
|
||||
git clone https://github.com/shadowsocks/simple-obfs.git $OBFS_DIR
|
||||
cd $OBFS_DIR
|
||||
git submodule update --init --recursive
|
||||
./autogen.sh && ./configure
|
||||
make && make install
|
||||
}
|
||||
|
||||
apk update
|
||||
build_ss_libev
|
||||
build_obfs
|
||||
rm -rf $BUILD_DIR/*
|
||||
11
.docker/env
Normal file
11
.docker/env
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
BIND_IP = 0.0.0.0
|
||||
BIND_PORT = 8981
|
||||
ENCRYPT_METHOD = aes-256-cfb
|
||||
PASSWD = 123456
|
||||
DNS_1 = 8.8.8.8
|
||||
DNS_2 = 8.8.4.4
|
||||
TIMEOUT = 300
|
||||
FAST_OPEN = false
|
||||
OBFS = true
|
||||
OBFS_METHOD = tls
|
||||
|
||||
9
.docker/run
Normal file
9
.docker/run
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
exec ss-libev
|
||||
if [ $OBFS -eq true ]
|
||||
then
|
||||
exec ss-server -s $BIND_IP -p $BIND_PORT -k $PASSWD -m $ENCRYPT_METHOD -t TIMEOUT -d $DNS_1 -d $DNS_2 -u --plugin obfs-server --plugin-opts "obfs=$OBFS_METHOD"
|
||||
else
|
||||
exec ss-server -s $BIND_IP -p $BIND_PORT -k $PASSWD -m $ENCRYPT_METHOD -t TIMEOUT -d $DNS_1 -d $DNS_2 -u
|
||||
fi
|
||||
8
Dockerfile
Normal file
8
Dockerfile
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
FROM smartentry/alpine:3.6-0.4.0
|
||||
|
||||
MAINTAINER Kagurazaka Shira <nico@ni-co.moe>
|
||||
|
||||
ADD .docker $ASSETS_DIR
|
||||
ADD .build_dir $BUILD_DIR
|
||||
|
||||
RUN smartentry.sh build
|
||||
Loading…
Reference in New Issue
Block a user