mirror of
https://github.com/MarkusMcNugen/docker-qBittorrentvpn
synced 2024-11-14 06:34:58 +00:00
Merge pull request #17 from ianneub/bind-transmission-to-tun0
Bind transmission to tun0
This commit is contained in:
commit
5f797d0fbd
@ -23,10 +23,10 @@ ADD piaconfig/crl.pem /etc/openvpn/crl.pem
|
||||
ADD transmission/defaultSettings.tmpl /etc/transmission-daemon/settings.tmpl
|
||||
ADD transmission/updateTransmissionPort.sh /etc/transmission-daemon/updatePort.sh
|
||||
ADD transmission/periodicUpdates.sh /etc/transmission-daemon/periodicUpdates.sh
|
||||
ADD transmission/run.sh /etc/transmission-daemon/start.sh
|
||||
ADD transmission/start.sh /etc/transmission-daemon/start.sh
|
||||
ADD transmission/runUpdates.sh /etc/transmission-daemon/startPortUpdates.sh
|
||||
ADD transmission/down.sh /etc/transmission-daemon/stop.sh
|
||||
ADD runOpenVpn.sh /etc/openvpn/start.sh
|
||||
ADD start.sh /etc/openvpn/start.sh
|
||||
|
||||
ENV PIA_USERNAME=**None** \
|
||||
PIA_PASSWORD=**None** \
|
||||
@ -37,7 +37,6 @@ ENV PIA_USERNAME=**None** \
|
||||
"TRANSMISSION_ALT_SPEED_TIME_ENABLED=false" \
|
||||
"TRANSMISSION_ALT_SPEED_TIME_END=1020" \
|
||||
"TRANSMISSION_ALT_SPEED_UP=50" \
|
||||
"TRANSMISSION_BIND_ADDRESS_IPV4=0.0.0.0" \
|
||||
"TRANSMISSION_BIND_ADDRESS_IPV6=::" \
|
||||
"TRANSMISSION_BLOCKLIST_ENABLED=false" \
|
||||
"TRANSMISSION_BLOCKLIST_URL=http://www.example.com/blocklist" \
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote aus-melbourne.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote aus.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote ca.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote ca-toronto.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote france.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote germany.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote hk.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote israel.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote japan.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote mexico.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote nl.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote ro.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote russia.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote sg.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote sweden.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote swiss.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote uk-london.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote uk-southampton.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote us-california.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote us-east.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote us-florida.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote us-midwest.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote us-seattle.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote us-siliconvalley.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote us-texas.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -1,5 +1,5 @@
|
||||
client
|
||||
dev tun
|
||||
dev tun0
|
||||
proto udp
|
||||
remote us-west.privateinternetaccess.com 1194
|
||||
resolv-retry infinite
|
||||
|
@ -38,13 +38,13 @@ fi
|
||||
echo $TRANSMISSION_RPC_USERNAME > /config/transmission-credentials.txt
|
||||
echo $TRANSMISSION_RPC_PASSWORD >> /config/transmission-credentials.txt
|
||||
|
||||
|
||||
# setup transmission configuration
|
||||
if [ ! -z ${KEEP_TRANSMISSION_STATE} ]
|
||||
then
|
||||
mkdir -p /data/transmission-data/
|
||||
dockerize -template /etc/transmission-daemon/settings.tmpl:/data/transmission-data/settings.json true
|
||||
dockerize -template /etc/transmission-daemon/settings.tmpl:/data/transmission-data/settings.json /bin/true
|
||||
else
|
||||
dockerize -template /etc/transmission-daemon/settings.tmpl:/etc/transmission-daemon/settings.json true
|
||||
dockerize -template /etc/transmission-daemon/settings.tmpl:/etc/transmission-daemon/settings.json /bin/true
|
||||
fi
|
||||
|
||||
exec openvpn --config "$OPEN_VPN_CONFIG"
|
@ -6,7 +6,7 @@
|
||||
"alt-speed-time-enabled": {{ .Env.TRANSMISSION_ALT_SPEED_TIME_ENABLED }},
|
||||
"alt-speed-time-end": {{ .Env.TRANSMISSION_ALT_SPEED_TIME_END }},
|
||||
"alt-speed-up": {{ .Env.TRANSMISSION_ALT_SPEED_UP }},
|
||||
"bind-address-ipv4": "{{ .Env.TRANSMISSION_BIND_ADDRESS_IPV4 }}",
|
||||
"bind-address-ipv4": "!!BINDIPV4!!",
|
||||
"bind-address-ipv6": "{{ .Env.TRANSMISSION_BIND_ADDRESS_IPV6 }}",
|
||||
"blocklist-enabled": {{ .Env.TRANSMISSION_BLOCKLIST_ENABLED }},
|
||||
"blocklist-url": "{{ .Env.TRANSMISSION_BLOCKLIST_URL }}",
|
||||
|
@ -9,6 +9,11 @@ else
|
||||
exec /usr/bin/transmission-daemon -g /etc/transmission-daemon/ &
|
||||
fi
|
||||
|
||||
# determine IP of tun0, and bind to it
|
||||
export TRANSMISSION_BIND_ADDRESS_IPV4=$(ifconfig tun0 | sed -n '2 p' | awk '{print $2}' | cut -d: -f2)
|
||||
echo "BINDING TRANSMISSION to $TRANSMISSION_BIND_ADDRESS_IPV4"
|
||||
perl -p -i -e 's/!!BINDIPV4!!/$ENV{"TRANSMISSION_BIND_ADDRESS_IPV4"}/' /etc/transmission-daemon/settings.json
|
||||
|
||||
exec /etc/transmission-daemon/startPortUpdates.sh &
|
||||
|
||||
echo "STARTED PORT UPDATER"
|
Loading…
Reference in New Issue
Block a user