change: set the tunnel device name in the config instead of parsing the log #64
Loading…
Reference in a new issue
No description provided.
Delete branch "change/set-tun-device-name"
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
ovpn()discovers the tunnel interface by regex-matching OpenVPN's log (parse_tun_device, the #15 stopgap). The name is parsed out of output we produce the config for ourselves.Fix
write_confignow sets thedevline in every config aqomui writes, and returns the name;ovpn()announces it up front the way the WireGuard path already announceswg_aqomui. The regex stays only as a fallback for configs aqomui does not write (the raw custom-provider paths and tap configs).Findings from the issue's "check first" questions:
tun_aqomui,tun_aqomui_h,tun_aqomui_b— keyed off the config rolewrite_configalready distinguishes.tun_aqomui, not the issue'sovpn-aqomui:firewall_default.jsonopens the firewall with iptablestun+wildcards, so a name not starting withtunwould have every packet dropped by the default deny — and users may carry customized firewall configs, so editing the shipped default wouldn't cover upgrades. Thetunprefix also lets OpenVPN infer--dev-type, and it matches the existingwg_aqomuinaming. All three names fit IFNAMSIZ.tun+, so renaming them buys nothing, and their type must not be clobbered.Verification
TestWriteConfigDevicepytest class: per-role names, missing-dev-line insertion, tap passthrough, IFNAMSIZ/prefix invariants. Existing parse tests unchanged (the fallback keeps working).write_configexercised manually against a ProtonVPN-style template: main/hop/bypass configs each carry theirdevline, remote/proto rewriting unaffected.ip linkshowstun_aqomui, DNS lands on it, and bypass comes up astun_aqomui_bwith egress IPs correct.Closes #21
🤖 Generated with Claude Code
193e8c298f4629f56e02