fix: launch the bypass config for custom providers, stop installing its pushed routes #76
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/bypass-custom-config"
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?
Problem
Issue #75, found live during #68's validation: bypass-over-VPN with a custom provider connects but never carries traffic -- no
tun_aqomui_bat first, then (once launched correctly) bypassed apps' traffic entered the tunnel and vanished. It turned out to be three stacked defects, each masking the next, plus a service crash on teardown.Fix (commit 1)
<provider>/temp.ovpn(the stale main config) instead of thebypass.ovpnwrite_config had just written. Now bypass dicts keep the bypass path.iproutescript redirect is inert on this OpenVPN build, so even the right config would have let the bypass tunnel'sredirect-gatewayhijack the main table. Replaced withroute-noexec+route-upfeeding table 11 (no metric --ip route replacekeys on prefix AND metric, and the physical-link default it must take over is metric 0).scripts/bypass_route.shremoved.fwmark 11rule and looped back into the tunnel device -- measured as one marked packet transmitting 3x on the device and never leaving the box. Fixed by pinning the server via the physical link in both the main table and table 11 before launch (the host routeredirect-gatewaywould have installed, done by hand becauseroute-noexecsuppresses it), so control channel and data path share one route and one NAT. A cgroup masquerade ontun_aqomui_bfixes marked packets' source address, chosen before the mark lands. Both routes are removed on teardown.Fix (commit 2)
cgroup_vpnreadself.netunguarded in a Qt slot; the attribute only exists after the GUI callsbypass(). After a service restart under a running GUI (the #73 scenario) the first bypass teardown core-dumped the root service, killing every tunnel. Now guarded like the disconnect path already was.Verification
route-noexec/route-up, noiproute; custom-provider bypass launchesbypass.ovpnwithtun_aqomui_b; create_cgroup installs the tunnel masquerade.Stacked on #68 -- merge that first; this rebases to two commits.
🤖 Generated with Claude Code
c94d5c1d7392b340f47792b340f4772fe35c7e162fe35c7e160abb93a7870abb93a787832906517c832906517c6d21a0662af959ffb2c8c7386615b3c7386615b3263f38c244