2018-11-29 12:07:38 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Set proxy port
|
2019-09-20 14:49:38 +00:00
|
|
|
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
|
|
|
|
|
2019-09-20 14:49:38 +00:00
|
|
|
# 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
|