summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2021-09-27 11:37:32 +0200
committerSimon Rettberg2021-09-27 11:37:32 +0200
commit3db40f686e7ed02df89156657791d15ea9accf2f (patch)
tree91e70df773ca1c01799b242052de084083bf0fe3
parent[run-virt-docker] fix pv binary fetching (diff)
downloadmltk-3db40f686e7ed02df89156657791d15ea9accf2f.tar.gz
mltk-3db40f686e7ed02df89156657791d15ea9accf2f.tar.xz
mltk-3db40f686e7ed02df89156657791d15ea9accf2f.zip
[redsocks] Always blacklist satellite.bwlehrpool
Otherwise, HTTPS breaks in proxy setups
-rwxr-xr-xcore/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy25
1 files changed, 13 insertions, 12 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 7cf9cb8c..c1224ec7 100755
--- a/core/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy
+++ b/core/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy
@@ -64,25 +64,26 @@ if [ -n "$SLX_PROXY_BLACKLIST" ]; then
done >> "$tfile"
fi
+# Append alias for satellite server, used for HTTPS
+SLX_PROXY_BLACKLIST="$SLX_PROXY_BLACKLIST satellite.bwlehrpool"
+mkdir -p "/etc/profile.d"
+rm -f -- "/etc/profile.d/99-proxy.sh"
+
if [ "${SLX_PROXY_TYPE:0:5}" = "http-" ]; then
# transparent proxying for HTTP -- DOES NOT WORK, might give 400 Bad Request
#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 var in http_proxy HTTP_PROXY all_proxy ALL_PROXY; do
+ echo "export ${var}='http://${SLX_PROXY_IP}:${SLX_PROXY_PORT}/'"
+ done >> "/etc/profile.d/99-proxy.sh"
+fi
+# No proxy - always set
+for var in no_proxy NO_PROXY; do
+ echo -n "export ${var}='${SLX_PXE_SERVER_IP}"
for ADDR in $SLX_PROXY_BLACKLIST; do
echo -n ", $ADDR"
done
echo "'"
-fi > "/etc/profile.d/99-proxy.sh"
+done >> "/etc/profile.d/99-proxy.sh"
cat >> "$tfile" <<HEREDOCBROWN
iptables -t nat -A REDSOCKS -p tcp -j REDIRECT --to-port 12345