summaryrefslogtreecommitdiffstats
path: root/core/modules/redsocks
diff options
context:
space:
mode:
authorSimon Rettberg2018-10-02 16:50:01 +0200
committerSimon Rettberg2018-10-02 16:50:01 +0200
commitd6c88fdc6b7ed9e339522e8f9b2c7bebfac0b467 (patch)
tree5de7747615159cee6ba52549fabddf7f9cef7b60 /core/modules/redsocks
parent[redsocks] Direct transparent HTTP proxying (diff)
downloadmltk-d6c88fdc6b7ed9e339522e8f9b2c7bebfac0b467.tar.gz
mltk-d6c88fdc6b7ed9e339522e8f9b2c7bebfac0b467.tar.xz
mltk-d6c88fdc6b7ed9e339522e8f9b2c7bebfac0b467.zip
[redocks] HIRN AN!
Diffstat (limited to 'core/modules/redsocks')
-rwxr-xr-xcore/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy6
1 files changed, 3 insertions, 3 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 0457728f..94135bc3 100755
--- a/core/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy
+++ b/core/modules/redsocks/data/opt/openslx/scripts/systemd-setup_proxy
@@ -31,9 +31,9 @@ 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
+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
+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
@@ -67,7 +67,7 @@ if [ -n "$SLX_PROXY_BLACKLIST" ]; then
done >> "$tfile"
fi
-if [ "${SLX_PROXY_TYPE#0:5}" = "http-" ]; then
+if [ "${SLX_PROXY_TYPE:0:5}" = "http-" ]; then
# transparent proxying for HTTP
echo "iptables -t nat -A REDSOCKS -p tcp --dport 80 -j DNAT --to-destination ${SLX_PROXY_IP}:${SLX_PROXY_PORT}" >> "$tfile"
fi