fix: Zoraxy config expansion — use full schema with origin IP
This commit is contained in:
parent
f9b1b3aa7b
commit
4416f15797
1 changed files with 89 additions and 15 deletions
92
deploy.sh
92
deploy.sh
|
|
@ -73,20 +73,57 @@ if [ "$GREENFIELD" = true ]; then
|
||||||
cp compose/zoraxy.yaml "$TARGET_DIR/compose/zoraxy.yaml"
|
cp compose/zoraxy.yaml "$TARGET_DIR/compose/zoraxy.yaml"
|
||||||
podman-compose -f "$TARGET_DIR/compose/zoraxy.yaml" up -d 2>&1 || echo "[WARN] Zoraxy deploy had issues (see above)"
|
podman-compose -f "$TARGET_DIR/compose/zoraxy.yaml" up -d 2>&1 || echo "[WARN] Zoraxy deploy had issues (see above)"
|
||||||
|
|
||||||
# Generate Zoraxy proxy configs (both app and dns, AuthMethod 0 — binary handles auth for app)
|
# Generate Zoraxy proxy configs with full schema (prevents Zoraxy from clearing OriginIpOrDomain on expand)
|
||||||
echo "[*] Generating Zoraxy proxy configs..."
|
echo "[*] Generating Zoraxy proxy configs..."
|
||||||
cat > "$TARGET_DIR/config/zoraxy/conf/proxy/app.$DOMAIN.config" <<ZORAXY_APP
|
cat > "$TARGET_DIR/config/zoraxy/conf/proxy/app.$DOMAIN.config" <<ZORAXY_APP
|
||||||
{
|
{
|
||||||
"ProxyType": 1,
|
"ProxyType": 1,
|
||||||
"RootOrMatchingDomain": "app.$DOMAIN",
|
"RootOrMatchingDomain": "app.$DOMAIN",
|
||||||
"ActiveOrigins": [{
|
"MatchingDomainAlias": [],
|
||||||
|
"ActiveOrigins": [
|
||||||
|
{
|
||||||
"OriginIpOrDomain": "127.0.0.1:9000",
|
"OriginIpOrDomain": "127.0.0.1:9000",
|
||||||
"RequireTLS": false,
|
"RequireTLS": false,
|
||||||
|
"SkipCertValidations": false,
|
||||||
|
"SkipWebSocketOriginCheck": false,
|
||||||
"Weight": 1,
|
"Weight": 1,
|
||||||
"MaxConn": 0
|
"MaxConn": 0,
|
||||||
}],
|
"RespTimeout": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"InactiveOrigins": [],
|
||||||
|
"UseStickySession": false,
|
||||||
|
"UseActiveLoadBalance": false,
|
||||||
"Disabled": false,
|
"Disabled": false,
|
||||||
"AuthenticationProvider": {"AuthMethod": 0}
|
"BypassGlobalTLS": false,
|
||||||
|
"VirtualDirectories": [],
|
||||||
|
"HeaderRewriteRules": {
|
||||||
|
"UserDefinedHeaders": null,
|
||||||
|
"RequestHostOverwrite": "",
|
||||||
|
"HSTSMaxAge": 0,
|
||||||
|
"EnablePermissionPolicyHeader": false,
|
||||||
|
"PermissionPolicy": null,
|
||||||
|
"DisableHopByHopHeaderRemoval": false
|
||||||
|
},
|
||||||
|
"EnableWebsocketCustomHeaders": false,
|
||||||
|
"AuthenticationProvider": {
|
||||||
|
"AuthMethod": 0,
|
||||||
|
"BasicAuthCredentials": null,
|
||||||
|
"BasicAuthExceptionRules": null,
|
||||||
|
"BasicAuthGroupIDs": [],
|
||||||
|
"ForwardAuthURL": "",
|
||||||
|
"ForwardAuthResponseHeaders": [],
|
||||||
|
"ForwardAuthResponseClientHeaders": [],
|
||||||
|
"ForwardAuthRequestHeaders": [],
|
||||||
|
"ForwardAuthRequestExcludedCookies": []
|
||||||
|
},
|
||||||
|
"RequireRateLimit": false,
|
||||||
|
"RateLimit": 0,
|
||||||
|
"DisableUptimeMonitor": false,
|
||||||
|
"AccessFilterUUID": "",
|
||||||
|
"DefaultSiteOption": 0,
|
||||||
|
"DefaultSiteValue": "",
|
||||||
|
"Tags": []
|
||||||
}
|
}
|
||||||
ZORAXY_APP
|
ZORAXY_APP
|
||||||
|
|
||||||
|
|
@ -94,14 +131,51 @@ ZORAXY_APP
|
||||||
{
|
{
|
||||||
"ProxyType": 1,
|
"ProxyType": 1,
|
||||||
"RootOrMatchingDomain": "dns.$DOMAIN",
|
"RootOrMatchingDomain": "dns.$DOMAIN",
|
||||||
"ActiveOrigins": [{
|
"MatchingDomainAlias": [],
|
||||||
|
"ActiveOrigins": [
|
||||||
|
{
|
||||||
"OriginIpOrDomain": "127.0.0.1:8000",
|
"OriginIpOrDomain": "127.0.0.1:8000",
|
||||||
"RequireTLS": false,
|
"RequireTLS": false,
|
||||||
|
"SkipCertValidations": false,
|
||||||
|
"SkipWebSocketOriginCheck": false,
|
||||||
"Weight": 1,
|
"Weight": 1,
|
||||||
"MaxConn": 0
|
"MaxConn": 0,
|
||||||
}],
|
"RespTimeout": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"InactiveOrigins": [],
|
||||||
|
"UseStickySession": false,
|
||||||
|
"UseActiveLoadBalance": false,
|
||||||
"Disabled": false,
|
"Disabled": false,
|
||||||
"AuthenticationProvider": {"AuthMethod": 0}
|
"BypassGlobalTLS": false,
|
||||||
|
"VirtualDirectories": [],
|
||||||
|
"HeaderRewriteRules": {
|
||||||
|
"UserDefinedHeaders": null,
|
||||||
|
"RequestHostOverwrite": "",
|
||||||
|
"HSTSMaxAge": 0,
|
||||||
|
"EnablePermissionPolicyHeader": false,
|
||||||
|
"PermissionPolicy": null,
|
||||||
|
"DisableHopByHopHeaderRemoval": false
|
||||||
|
},
|
||||||
|
"EnableWebsocketCustomHeaders": false,
|
||||||
|
"AuthenticationProvider": {
|
||||||
|
"AuthMethod": 0,
|
||||||
|
"BasicAuthCredentials": null,
|
||||||
|
"BasicAuthExceptionRules": null,
|
||||||
|
"BasicAuthGroupIDs": [],
|
||||||
|
"ForwardAuthURL": "",
|
||||||
|
"ForwardAuthResponseHeaders": [],
|
||||||
|
"ForwardAuthResponseClientHeaders": [],
|
||||||
|
"ForwardAuthRequestHeaders": [],
|
||||||
|
"ForwardAuthRequestExcludedCookies": []
|
||||||
|
},
|
||||||
|
"RequireRateLimit": false,
|
||||||
|
"RateLimit": 0,
|
||||||
|
"DisableUptimeMonitor": false,
|
||||||
|
"AccessFilterUUID": "",
|
||||||
|
"DefaultSiteOption": 0,
|
||||||
|
"DefaultSiteValue": "",
|
||||||
|
"Tags": []
|
||||||
}
|
}
|
||||||
ZORAXY_DNS
|
ZORAXY_DNS
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue