#!/bin/sh

# TODO: Randomly choose a obfs proxy ports, set them explictly in
# configuration and enable firewall for them.

apt-get install -y tor obfsproxy

cat > /etc/tor/torrc <<EOF
SocksPort 127.0.0.1:9050
ORPort auto
ControlPort 9051
BridgeRelay 1
Exitpolicy reject *:*
ServerTransportPlugin obfs3 exec /usr/bin/obfsproxy managed
EOF
