From 85cd97d00786ad68661d238fe13f56bfe1dc97bb Mon Sep 17 00:00:00 2001 From: kev Date: Fri, 1 May 2015 16:25:42 +0800 Subject: [PATCH] add RUN_MODE to obfsproxy --- obfsproxy/Dockerfile | 3 ++- obfsproxy/README.md | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/obfsproxy/Dockerfile b/obfsproxy/Dockerfile index 766c9b1..ded6fc6 100644 --- a/obfsproxy/Dockerfile +++ b/obfsproxy/Dockerfile @@ -14,6 +14,7 @@ ENV DATA_DIR /var/lib/obfsproxy ENV PASSWORD XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ENV DEST_ADDR openvpn ENV DEST_PORT 1194 +ENV RUN_MODE server ENV LISTEN_ADDR 0.0.0.0 ENV LISTEN_PORT 4911 @@ -21,5 +22,5 @@ EXPOSE $LISTEN_PORT CMD obfsproxy --log-min-severity=$LOG_MIN_SEVERITY --data-dir=$DATA_DIR \ scramblesuit --password=$PASSWORD --dest=$DEST_ADDR:$DEST_PORT \ - server $LISTEN_ADDR:$LISTEN_PORT + $RUN_MODE $LISTEN_ADDR:$LISTEN_PORT diff --git a/obfsproxy/README.md b/obfsproxy/README.md index ab60d90..39f8cbb 100644 --- a/obfsproxy/README.md +++ b/obfsproxy/README.md @@ -61,6 +61,16 @@ obfsproxy: restart: always ``` +The default run mode is `server`. You can also run container in `client` mode: + +``` +obfsproxy: + ... + environment: + - RUN_MODE=client + ... +``` + The password should be encoded by Base32 with fixed length. You can generate one via this command: