Fix proxy in combination with ufw, open access to proxy, add openvpn arguments to transmission script
This commit is contained in:
@@ -64,6 +64,11 @@ if [ "true" = "$ENABLE_UFW" ]; then
|
|||||||
echo "allowing $PEER_PORT through the firewall"
|
echo "allowing $PEER_PORT through the firewall"
|
||||||
ufw allow $PEER_PORT
|
ufw allow $PEER_PORT
|
||||||
|
|
||||||
|
if [ "true" = "$WEBPROXY_ENABLED" ]; then
|
||||||
|
echo "allowing $WEBPROXY_PORT through the firewall"
|
||||||
|
ufw allow $WEBPROXY_PORT
|
||||||
|
fi
|
||||||
|
|
||||||
eval $(/sbin/ip r l m 0.0.0.0 | awk '{if($5!="tun0"){print "GW="$3"\nINT="$5; exit}}')
|
eval $(/sbin/ip r l m 0.0.0.0 | awk '{if($5!="tun0"){print "GW="$3"\nINT="$5; exit}}')
|
||||||
echo "allowing access to $TRANSMISSION_RPC_PORT from $GW"
|
echo "allowing access to $TRANSMISSION_RPC_PORT from $GW"
|
||||||
ufw allow proto tcp from $GW to any port $TRANSMISSION_RPC_PORT
|
ufw allow proto tcp from $GW to any port $TRANSMISSION_RPC_PORT
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
/etc/transmission/start.sh
|
/etc/transmission/start.sh "$@"
|
||||||
/opt/tinyproxy/start.sh
|
/opt/tinyproxy/start.sh
|
||||||
|
@@ -4,7 +4,6 @@
|
|||||||
. /etc/transmission/environment-variables.sh
|
. /etc/transmission/environment-variables.sh
|
||||||
|
|
||||||
PROXY_CONF='/etc/tinyproxy.conf'
|
PROXY_CONF='/etc/tinyproxy.conf'
|
||||||
DEFAULT_PORT=8888
|
|
||||||
|
|
||||||
set_port()
|
set_port()
|
||||||
{
|
{
|
||||||
@@ -33,12 +32,10 @@ if [ "${WEBPROXY_ENABLED}" = "true" ]; then
|
|||||||
|
|
||||||
echo "STARTING TINYPROXY"
|
echo "STARTING TINYPROXY"
|
||||||
|
|
||||||
if [ -z "$WEBPROXY_PORT" ] ; then
|
set_port ${WEBPROXY_PORT} ${PROXY_CONF}
|
||||||
set_port ${WEBPROXY_PORT} ${PROXY_CONF}
|
|
||||||
else
|
# Allow all clients
|
||||||
# Always default back to port 8888
|
sed -i -e"s/^Allow /#Allow /" ${PROXY_CONF}
|
||||||
set_port ${DEFAULT_PORT} ${PROXY_CONF}
|
|
||||||
fi
|
|
||||||
|
|
||||||
/etc/init.d/tinyproxy start
|
/etc/init.d/tinyproxy start
|
||||||
echo "Tinyproxy startup script complete."
|
echo "Tinyproxy startup script complete."
|
||||||
|
Reference in New Issue
Block a user