feat: phone login via QR when the saved Mudfish login expires
When autologin is rejected the panel offers '휴대폰으로 로그인 (QR)'. It opens a 5-minute LAN relay to the launcher UI guarded by a one-time token (first phone to open the QR URL is the only client allowed) and shows the URL as a QR code. The relay closes as soon as a new session appears, on cancel, on expiry, and on unload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d8f1c05372
commit
7513fef6f8
12 files changed
+586
-7
No files matched your search
@@ -71,6 +71,16 @@ def route_text(run=subprocess.run) -> str:
|
||||
return run(["ip", "-4", "route"], capture_output=True, text=True, timeout=5).stdout
|
||||
|
||||
|
||||
def lan_ip(run=subprocess.run) -> Optional[str]:
|
||||
"""The Deck's source address for outbound traffic (its Wi-Fi/LAN IP when the VPN is off)."""
|
||||
try:
|
||||
out = run(["ip", "-4", "route", "get", "1.1.1.1"], capture_output=True, text=True, timeout=5).stdout
|
||||
except Exception:
|
||||
return None
|
||||
parts = out.split()
|
||||
return parts[parts.index("src") + 1] if "src" in parts[:-1] else None
|
||||
|
||||
|
||||
def public_ip() -> Optional[dict]:
|
||||
try:
|
||||
with urllib.request.urlopen("https://ipinfo.io/json", timeout=8, context=ssl_context()) as resp:
|
||||
|
||||
Reference in new issue
Block a user