feat: expose controller through decky backend
Prepare signs in on load (never connects), system CA bundle for HTTPS, root-owned deploy extraction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4e27e29225
commit
384d0a75f0
8 files changed
+131
-5
No files matched your search
@@ -6,6 +6,7 @@ import time
|
||||
import urllib.request
|
||||
from typing import Callable, Optional, Tuple
|
||||
|
||||
from .client import ssl_context
|
||||
from .routes import delete_routes # noqa: F401 (re-exported for the controller)
|
||||
|
||||
MUDFISH_ROOT = "/opt/mudfish"
|
||||
@@ -66,7 +67,7 @@ def route_text(run=subprocess.run) -> str:
|
||||
|
||||
def public_ip() -> Optional[dict]:
|
||||
try:
|
||||
with urllib.request.urlopen("https://ipinfo.io/json", timeout=8) as resp:
|
||||
with urllib.request.urlopen("https://ipinfo.io/json", timeout=8, context=ssl_context()) as resp:
|
||||
data = json.load(resp)
|
||||
return {"ip": data.get("ip"), "country": data.get("country")}
|
||||
except Exception:
|
||||
|
||||
Reference in new issue
Block a user