Fix Cascade egress verify to bind awg0 IP (v2.2.1).

Use client-subnet policy routing for curl checks instead of cascade peer Address; soft-warn when echo services fail but the route is OK.
This commit is contained in:
orohi
2026-07-27 04:27:00 +03:00
parent ac76a0e540
commit 80160d0ef4
9 changed files with 168 additions and 26 deletions
+7 -2
View File
@@ -102,7 +102,7 @@ else:
application_path = os.path.dirname(__file__)
DATA_FILE = os.path.join(application_path, 'data.json') # legacy JSON; used only for one-shot import / export
CURRENT_VERSION = "v2.2.0"
CURRENT_VERSION = "v2.2.1"
RELEASES_REPO_URL = "https://git.evilfox.cc/test2/Amnezia-Web-Panel-main"
RELEASES_API_LATEST = "https://git.evilfox.cc/api/v1/repos/test2/Amnezia-Web-Panel-main/releases/latest"
BIN_DIR = os.environ.get('TUNNEL_BIN_DIR', os.path.join(application_path, 'bin'))
@@ -3476,7 +3476,12 @@ async def api_cascade_setup(request: Request, server_id: int, req: CascadeSetupR
}
async with DATA_LOCK:
await asyncio.to_thread(save_data, data)
return {'status': 'success', 'cascade': entry['cascade'], 'applied': applied}
return {
'status': 'success',
'cascade': entry['cascade'],
'applied': applied,
'warning': applied.get('warning'),
}
except Exception as e:
logger.exception("Error setting up cascade")
return JSONResponse({'error': str(e)}, status_code=500)