WireGuard bypass tunnel #216
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The last WireGuard capability gap after #176: the bypass's second tunnel is OpenVPN-only (
TUNNEL_BYPASS, refused atWireGuardconstruction). Nothing protocol-level rules it out - kernel WireGuard never inherits the inner packet's fwmark, so the outer packets stay unmarked and consult the main table like any other tunnel's.Shape (building on the #176 seams):
WireGuard.rolesgrows "bypass" → devicewg_aqomui_b(already reserved inconfig.WG_DEVICES);TUNNEL_BYPASS["WireGuard"]flips, which alone lifts the gui gate.ip route replace default dev wg_aqomui_b table 11, the WireGuard analogue of bypass_up.sh (dev-only route is fine: wg is always tun-like, no tap case - this leg needs no $route_vpn_gateway).wg()becomes role-aware: bypass suffix on statuses, role state on "bypass", and no resolved entry (#59's rule) - the service's dnsmasq upstream switching already keys on the bypass role's state.self.bypass_protocol), mirroring the hop one from #214.ping -Inudge can't route through table 11; nudge via a temporary TEST-NET-1 host route into the device instead (the reply is irrelevant, only the outbound attempt triggers the handshake).Also retires the aspiration blocker noted on bypass_up.sh: once a WG bypass routes from Python, the OpenVPN bypass hook is the only script left for its own reasons (tap/subnet gateway, soft-restart re-runs).