fix: ping router instead of Mac for LAN detection
Deploy Dashboard / deploy (push) Successful in 50s
Deploy Dashboard / deploy (push) Successful in 50s
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user