2015-04-30 12:08:49 +02:00
|
|
|
OpenVPN over Obfsproxy
|
|
|
|
======================
|
|
|
|
|
2015-04-30 12:32:52 +02: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 13:39:20 +02: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 12:32:52 +02:00
|
|
|
|
2015-04-30 12:08:49 +02:00
|
|
|
## docker-compose.yml
|
|
|
|
|
|
|
|
```
|
2015-04-30 13:39:20 +02:00
|
|
|
data:
|
|
|
|
image: busybox:latest
|
|
|
|
volumes:
|
2015-04-30 13:50:32 +02:00
|
|
|
- /etc/openvpn
|
2015-04-30 13:39:20 +02:00
|
|
|
|
|
|
|
server:
|
|
|
|
image: kylemanna/openvpn:latest
|
|
|
|
ports:
|
2015-04-30 13:50:32 +02:00
|
|
|
- "1194:1194/tcp"
|
2015-04-30 13:39:20 +02:00
|
|
|
volumes_from:
|
2015-04-30 13:50:32 +02:00
|
|
|
- data
|
2015-04-30 13:39:20 +02:00
|
|
|
cap_add:
|
2015-04-30 13:50:32 +02:00
|
|
|
- NET_ADMIN
|
2015-04-30 13:39:20 +02:00
|
|
|
restart: always
|
|
|
|
|
2015-04-30 12:08:49 +02:00
|
|
|
obfsproxy:
|
|
|
|
image: vimagick/obfsproxy:latest
|
|
|
|
ports:
|
|
|
|
- "4911:4911"
|
|
|
|
links:
|
2015-04-30 13:39:20 +02: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 13:46:33 +02:00
|
|
|
```
|
2015-04-30 13:39:20 +02:00
|
|
|
obfsproxy:
|
|
|
|
image: vimagick/obfsproxy:latest
|
|
|
|
ports:
|
|
|
|
- "4911:4911"
|
|
|
|
external_links:
|
2015-04-30 12:08:49 +02: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 13:39:20 +02:00
|
|
|
The password should be encoded by Base32 with fixed length.
|
|
|
|
You can generate one via this command:
|
|
|
|
|
2015-04-30 13:46:33 +02:00
|
|
|
```
|
2015-04-30 13:39:20 +02:00
|
|
|
python -c 'import base64, os; print base64.b32encode(os.urandom(20))'
|
|
|
|
```
|