summaryrefslogtreecommitdiff
path: root/images/obfsvpn-client/start.sh
blob: 44fa0139000fe6ed63d7b0da944a7a203a0dfdb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

# start the obfsvpn-client
/usr/bin/obfsvpn-client -c "$OBFS4_CERT" &

# use the server container name as remote
if [ -z "$OBFS4_ENDPOINT" ]; then
    sed -i "s/(^remote) .* ([[:digit:]])/\1 obfsvpn-server \2/1" \
        /vpn/client.ovpn
fi
openvpn --config /vpn/client.ovpn --socks-proxy localhost 8080 &

ping -c5 10.8.0.1

exit $?