summaryrefslogtreecommitdiffstats
path: root/core/modules/redsocks
diff options
context:
space:
mode:
authorSimon Rettberg2021-08-11 14:35:45 +0200
committerSimon Rettberg2021-08-11 14:35:45 +0200
commit8733353ac01a3b678dc32fcea296ec2cb2671991 (patch)
treea0de54665a358252e8ac7a3daed2de2a1741ad74 /core/modules/redsocks
parent[qemu] Add switch to enable Nvidia GPU-passthrough patch (diff)
downloadmltk-8733353ac01a3b678dc32fcea296ec2cb2671991.tar.gz
mltk-8733353ac01a3b678dc32fcea296ec2cb2671991.tar.xz
mltk-8733353ac01a3b678dc32fcea296ec2cb2671991.zip
[redsocks] Upper- and lowercase proxy env
This is badly standardized, declare both to be extra safe
Diffstat (limited to 'core/modules/redsocks')
-rwxr-xr-xcore/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy15
1 files changed, 7 insertions, 8 deletions
diff --git a/core/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy b/core/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy
index 54c81bfd..7cf9cb8c 100755
--- a/core/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy
+++ b/core/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy
@@ -29,14 +29,6 @@ fi
[ "$PROXY" == "off" ] && echo "Proxy mode not required." && exit 0
echo "Setting up transparent proxying via $SLX_PROXY_IP"
-## Do this in addition so proxy-aware programs can use it directly
-#mkdir -p /etc/profile.d
-#if [ "${SLX_PROXY_TYPE:0:5}" = "http-" ]; then
-# echo "export http_proxy=http://${SLX_PROXY_IP}:${SLX_PROXY_PORT}/" > "/etc/profile.d/system-proxy.sh"
-#elif [ "${SLX_PROXY_TYPE:0:5}" = "socks" ]; then
-# echo "export ALL_PROXY=${SLX_PROXY_TYPE}://${SLX_PROXY_IP}:${SLX_PROXY_PORT}/" > "/etc/profile.d/system-proxy.sh"
-#fi
-
sed -i "s/%%PROXY_IP%%/$SLX_PROXY_IP/g;s/%%PROXY_PORT%%/$SLX_PROXY_PORT/g;s/%%PROXY_TYPE%%/$SLX_PROXY_TYPE/g" /etc/redsocks.conf
mkdir -p /run/redsocks
@@ -77,12 +69,19 @@ if [ "${SLX_PROXY_TYPE:0:5}" = "http-" ]; then
#echo "iptables -t nat -A REDSOCKS -p tcp --dport 80 -j DNAT --to-destination ${SLX_PROXY_IP}:${SLX_PROXY_PORT}" >> "$tfile"
mkdir -p "/etc/profile.d" &> /dev/null
echo "export http_proxy='http://${SLX_PROXY_IP}:${SLX_PROXY_PORT}/'"
+ echo "export HTTP_PROXY='http://${SLX_PROXY_IP}:${SLX_PROXY_PORT}/'"
echo "export all_proxy='http://${SLX_PROXY_IP}:${SLX_PROXY_PORT}/'"
+ echo "export ALL_PROXY='http://${SLX_PROXY_IP}:${SLX_PROXY_PORT}/'"
echo -n "export no_proxy='${SLX_PXE_SERVER_IP}"
for ADDR in $SLX_PROXY_BLACKLIST; do
echo -n ", $ADDR"
done
echo "'"
+ echo -n "export NO_PROXY='${SLX_PXE_SERVER_IP}"
+ for ADDR in $SLX_PROXY_BLACKLIST; do
+ echo -n ", $ADDR"
+ done
+ echo "'"
fi > "/etc/profile.d/99-proxy.sh"
cat >> "$tfile" <<HEREDOCBROWN