openconnect-proxy/build/entrypoint.sh

14 lines
441 B
Bash
Raw Normal View History

2018-11-29 12:07:38 +00:00
#!/bin/sh
# Set proxy port
sed "s/^Port .*$/Port $HTTPS_PROXY_PORT/" -i /etc/tinyproxy.conf
2018-11-29 12:07:38 +00:00
# Start proxy
tinyproxy -c /etc/tinyproxy.conf
# Start socks5 proxy
/usr/local/bin/microsocks -i 0.0.0.0 -p $SOCKS5_PROXY_PORT &
# Start openconnect with a reconnect timeout of 24 hours
echo "$OPENCONNECT_PASSWORD" | openconnect -v -u $OPENCONNECT_USER --no-dtls --passwd-on-stdin $OPENCONNECT_OPTIONS --reconnect-timeout 86400 $OPENCONNECT_URL