1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-25 00:08:49 +00:00
dockerfiles/obfsproxy/README.md

70 lines
1.5 KiB
Markdown
Raw Normal View History

2015-04-30 10:08:49 +00:00
OpenVPN over Obfsproxy
======================
2015-04-30 10:32:52 +00:00
Obfsproxy is a pluggable transport proxy written in python.
We can transport OpenVPN over Obfsproxy, so that firewall cannot detect it.
2015-04-30 11:39:20 +00:00
Obfsproxy provides several obfuscation method. I consider `scramblesuit` the best.
I will update this image if there's better one.
To use the example bellow, you should run `kylemanna/openvpn` container first.
Don't forget to edit `/etc/openvpn/openvpn.conf` to use `proto tcp`.
2015-04-30 10:32:52 +00:00
2015-04-30 10:08:49 +00:00
## docker-compose.yml
```
2015-04-30 11:39:20 +00:00
data:
image: busybox:latest
volumes:
2015-04-30 11:50:32 +00:00
- /etc/openvpn
2015-04-30 11:39:20 +00:00
server:
image: kylemanna/openvpn:latest
ports:
2015-04-30 11:50:32 +00:00
- "1194:1194/tcp"
2015-04-30 11:39:20 +00:00
volumes_from:
2015-04-30 11:50:32 +00:00
- data
2015-04-30 11:39:20 +00:00
cap_add:
2015-04-30 11:50:32 +00:00
- NET_ADMIN
2015-04-30 11:39:20 +00:00
restart: always
2015-04-30 10:08:49 +00:00
obfsproxy:
image: vimagick/obfsproxy:latest
ports:
- "4911:4911"
links:
2015-04-30 11:39:20 +00:00
- server:openvpn
environment:
- PASSWORD=J23TNHPJPAOQJLTCPLFD4CQYVFY6MEVP
- DEST_HOST=openvpn
- DEST_PORT=1194
- LISTEN_ADDR=0.0.0.0
- LISTEN_PORT=4911
restart: always
```
To link a existing `openvpn` container, please use `external_links` instead of `links`.
2015-04-30 11:46:33 +00:00
```
2015-04-30 11:39:20 +00:00
obfsproxy:
image: vimagick/obfsproxy:latest
ports:
- "4911:4911"
external_links:
2015-04-30 10:08:49 +00:00
- openvpn_server_1:openvpn
environment:
- PASSWORD=J23TNHPJPAOQJLTCPLFD4CQYVFY6MEVP
- DEST_HOST=openvpn
- DEST_PORT=1194
- LISTEN_ADDR=0.0.0.0
- LISTEN_PORT=4911
restart: always
```
2015-04-30 11:39:20 +00:00
The password should be encoded by Base32 with fixed length.
You can generate one via this command:
2015-04-30 11:46:33 +00:00
```
2015-04-30 11:39:20 +00:00
python -c 'import base64, os; print base64.b32encode(os.urandom(20))'
```