fix: ping router instead of Mac for LAN detection
Deploy Dashboard / deploy (push) Successful in 50s

This commit is contained in:
Gan, Jimmy
2026-02-26 03:24:02 +08:00
parent da1f709f01
commit 1b55675201
+1 -1
View File
@@ -123,7 +123,7 @@ async def client_ip(request: Request):
if ip.startswith("100."):
try:
proc = await asyncio.create_subprocess_exec(
"ping", "-c", "1", "-W", "1", "192.168.31.2",
"ping", "-c", "1", "-W", "1", "192.168.31.1",
stdout=asyncio.subprocess.DEVNULL, stderr=asyncio.subprocess.DEVNULL,
)
return {"ip": ip, "lan": await asyncio.wait_for(proc.wait(), 2) == 0}