zapret-kvn/xray_fluent/application
Repository files (latest commit first)
Filename Latest commit message Latest commit date
loop-uh 7acad15dcd fix: resolve AWG uplink via WinAPI and unify the sidecar relay seam
The AmneziaWG sidecar failed at startup with "Physical interface for
Amnezia UDP transport not found". Three compounding causes:

- physical_network() spawned PowerShell and filtered on HardwareInterface,
  which wrongly excludes Hyper-V / WSL / Docker vEthernet uplinks, so every
  AWG key failed identically on such hosts; a transient miss aborted the
  whole startup with a hard OSError.
- A successful tunnel changes the outbound IP (e.g. 10.9.0.49), which the
  network monitor misread as a real network change and reconnected on,
  re-running the resolve while the tunnel held the default route — a
  self-inflicted flap.

Replace the PowerShell probe with a pure-WinAPI resolver: extend
win_netinfo (GetAdaptersAddresses gateways, DNS, OperStatus, IfType,
Ipv4Metric) and pick the up adapter that owns an IPv4 gateway and a
routable address, lowest Ipv4Metric. Requiring a gateway naturally
excludes the WireGuard/AWG TUN (it has none), so the relay never binds
back onto its own tunnel; dropping HardwareInterface fixes vEthernet
uplinks. The owned Go core still hard-requires a non-zero interface index
(IP_UNICAST_IF, no default-bind fallback), so a transient miss is retried
instead of aborting. Ignore network-change events whose address is the
active tunnel's own, breaking the reconnect loop.

Extract the shared sidecar seam — the loopback SOCKS relay must accept a
TCP connection before the sing-box front dials it — into
engines/sidecar.wait_for_loopback_relay(). Hysteria delegates to it (no
behavior change); Amnezia adopts it as a confirming gate after
relay_ready, so both cores share one readiness contract. The divergent
domain models (config handoff, handshake detection, failure taxonomy,
recovery) intentionally stay per-engine.

Verified on Linux: 890 unit tests pass (offscreen). Tunnel-comes-up and
Hysteria startup still need on-device confirmation on Windows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HAjvZYzPW2yTtToKJXGdbS
2026-09-14 11:54:30 +03:00
..
__init__.py Prepare v0.4.78: server list rework, faster switching, subscriptions 2026-08-11 22:10:53 +03:00
async_steps.py fix: unify transport transitions and restore direct Russian services 2026-09-06 01:10:35 +03:00
auto_switch_service.py feat: use official Amnezia transport and organize runtime modules 2026-09-06 00:14:08 +03:00
config.py фикс открытого прокси 2026-04-07 20:49:48 +03:00
config_documents.py Prepare v0.4.78: server list rework, faster switching, subscriptions 2026-08-11 22:10:53 +03:00
config_profiles.py Update config_profiles.py 2026-04-07 21:11:24 +03:00
connection_service.py fix: unify transport transitions and restore direct Russian services 2026-09-06 01:10:35 +03:00
controller.py fix: resolve AWG uplink via WinAPI and unify the sidecar relay seam 2026-09-14 11:54:30 +03:00
node_runtime_service.py fix: preserve interactive server table and bound DNS fallback readiness 2026-09-06 02:07:48 +03:00
node_service.py fix: unify transport transitions and restore direct Russian services 2026-09-06 01:10:35 +03:00
nodes.py фикс открытого прокси 2026-04-07 20:49:48 +03:00
outbound_pool_service.py feat: use official Amnezia transport and organize runtime modules 2026-09-06 00:14:08 +03:00
port_allocator.py sing-box extended 2026-07-11 21:01:15 +03:00
profile_service.py fix: refresh managed DNS and cache server table rendering 2026-09-06 14:51:07 +03:00
protocol_core.py feat: use official Amnezia transport and organize runtime modules 2026-09-06 00:14:08 +03:00
rotation_service.py feat: use official Amnezia transport and organize runtime modules 2026-09-06 00:14:08 +03:00
runtime.py Make server switching responsive 2026-08-05 00:06:32 +03:00
runtime_introspection.py wireguard 2026-07-11 23:17:09 +03:00
runtime_security.py feat: use official Amnezia transport and organize runtime modules 2026-09-06 00:14:08 +03:00
runtime_services.py fix: unify transport transitions and restore direct Russian services 2026-09-06 01:10:35 +03:00
session_state.py feat: use official Amnezia transport and organize runtime modules 2026-09-06 00:14:08 +03:00
signature_service.py feat: use official Amnezia transport and organize runtime modules 2026-09-06 00:14:08 +03:00
singbox_config_recovery.py Automatically recover wrapped sing-box configs 2026-07-25 18:34:27 +03:00
startup_service.py feat: use official Amnezia transport and organize runtime modules 2026-09-06 00:14:08 +03:00
subscription_service.py feat: use official Amnezia transport and organize runtime modules 2026-09-06 00:14:08 +03:00
template_sync.py fix: refresh managed DNS and cache server table rendering 2026-09-06 14:51:07 +03:00
transition_engine.py fix: unify transport transitions and restore direct Russian services 2026-09-06 01:10:35 +03:00
update_service.py feat: use official Amnezia transport and organize runtime modules 2026-09-06 00:14:08 +03:00
worker_service.py fix: unify transport transitions and restore direct Russian services 2026-09-06 01:10:35 +03:00
xray_runtime_service.py feat: use official Amnezia transport and organize runtime modules 2026-09-06 00:14:08 +03:00
zapret_prewarm_service.py feat: use official Amnezia transport and organize runtime modules 2026-09-06 00:14:08 +03:00