fix: lock Zoraxy proxy configs with immutable flag (chattr +i)
This commit is contained in:
parent
4416f15797
commit
47efc2e62d
1 changed files with 7 additions and 0 deletions
|
|
@ -179,6 +179,10 @@ ZORAXY_APP
|
||||||
}
|
}
|
||||||
ZORAXY_DNS
|
ZORAXY_DNS
|
||||||
|
|
||||||
|
# Lock proxy configs so Zoraxy cannot rewrite them (clearing OriginIpOrDomain)
|
||||||
|
echo "[*] Locking proxy configs (chattr +i)..."
|
||||||
|
chattr -R +i "$TARGET_DIR/config/zoraxy/conf/proxy/" 2>/dev/null || true
|
||||||
|
|
||||||
# Copy launcher config files
|
# Copy launcher config files
|
||||||
cp -r config/nextworkspace/* "$TARGET_DIR/config/nextworkspace/"
|
cp -r config/nextworkspace/* "$TARGET_DIR/config/nextworkspace/"
|
||||||
|
|
||||||
|
|
@ -323,7 +327,10 @@ else
|
||||||
cp config/nextworkspace/apps.yaml "$TARGET_DIR/config/nextworkspace/apps.yaml"
|
cp config/nextworkspace/apps.yaml "$TARGET_DIR/config/nextworkspace/apps.yaml"
|
||||||
fi
|
fi
|
||||||
if [ -d config/zoraxy/conf/proxy ]; then
|
if [ -d config/zoraxy/conf/proxy ]; then
|
||||||
|
# Unlock, copy, re-lock to prevent Zoraxy from clearing OriginIpOrDomain
|
||||||
|
chattr -R -i "$TARGET_DIR/config/zoraxy/conf/proxy/" 2>/dev/null || true
|
||||||
cp config/zoraxy/conf/proxy/* "$TARGET_DIR/config/zoraxy/conf/proxy/" 2>/dev/null || true
|
cp config/zoraxy/conf/proxy/* "$TARGET_DIR/config/zoraxy/conf/proxy/" 2>/dev/null || true
|
||||||
|
chattr -R +i "$TARGET_DIR/config/zoraxy/conf/proxy/" 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "[6/6] Restarting Zoraxy and launcher..."
|
echo "[6/6] Restarting Zoraxy and launcher..."
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue