Net core: subscription fetched through the exit, hourly, and on demand
The cluster subscription host is unreachable directly from home: the provider pull had failed with EOF since day one and the node list went stale (a new node, Aurora, never showed up). The provider now downloads through «exit», every hour instead of 12, and netctl refresh (BroV: «Обновить список узлов») pulls it now and reports added/removed nodes, without a reload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ allows exactly these operations:
|
||||
delay {group}|{proxy} speed test of exit / ai-out / amnezia, or of a client tunnel
|
||||
tun {on} traffic capture on (fresh core start) / off; remembered
|
||||
add_key {text} vpn:// Amnezia key (checked by gen.py) or a vless:// link: stored, core updated
|
||||
refresh {} re-download the VLESS subscription now (new cluster nodes), no reload
|
||||
hide {name} take an Amnezia connection or a VLESS node out of the list and
|
||||
out of "auto" (the key / subscription stay, nothing is deleted)
|
||||
unhide {name} put it back
|
||||
@@ -386,6 +387,14 @@ def change_hidden(name, hide):
|
||||
return {"ok": True, "reloaded": kind == "vless"}
|
||||
|
||||
|
||||
def cmd_refresh(_):
|
||||
before = set(provider_names("vless-cluster"))
|
||||
api("PUT", "/providers/proxies/vless-cluster", timeout=30)
|
||||
after = provider_names("vless-cluster")
|
||||
return {"ok": True, "nodes": after, "added": [n for n in after if n not in before],
|
||||
"removed": sorted(before - set(after))}
|
||||
|
||||
|
||||
def cmd_hide(r):
|
||||
return change_hidden(r.get("name"), True)
|
||||
|
||||
@@ -395,7 +404,8 @@ def cmd_unhide(r):
|
||||
|
||||
|
||||
COMMANDS = {"state": cmd_state, "select": cmd_select, "delay": cmd_delay, "tun": cmd_tun,
|
||||
"add_key": cmd_add_key, "hide": cmd_hide, "unhide": cmd_unhide}
|
||||
"add_key": cmd_add_key, "hide": cmd_hide, "unhide": cmd_unhide,
|
||||
"refresh": cmd_refresh}
|
||||
|
||||
|
||||
# MARK: - Socket server
|
||||
|
||||
Reference in New Issue
Block a user