1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-20 13:58:42 +00:00

add RUN_MODE to obfsproxy

This commit is contained in:
kev 2015-05-01 16:25:42 +08:00
parent 3e069f5e2a
commit 85cd97d007
2 changed files with 12 additions and 1 deletions

@ -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

@ -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: