resources: provider templates are misnamed and embed per-install paths #143

Open
opened 2026-08-24 12:02:53 -04:00 by mysticalsoap · 0 comments
Owner

resources/ mixes three species under config-ish names: per-type OpenVPN base templates (Airvpn_config etc. — blank proto/remote filled by write_config, seeded once into {entry}/openvpn.conf by copy_certs), the stunnel template (ssl_config, rewritten per connection by tunnel.py), and actual default settings (default_config.json, firewall_default.json). The first two are templates, not configs.

Two-stage remedy:

  1. Cheap, anytime: move the templates to resources/templates/{Type}.ovpn (+ the stunnel template). One code reference each — update.py copy_certs for the provider templates, tunnel.py for ssl_config — plus setup.py's data_files.
  2. With the multi-entry work: strip the embedded absolute paths. The shipped per-type templates hardcode per-install, per-type paths (auth-user-pass /usr/share/aqomui/ProtonVPN/ProtonVPN-auth.txt, ca .../proton_ca.crt) — wrong once name≠type is real: an entry named "My Proton" gets its certs in My Proton/ while its seeded config points at ProtonVPN/. Windscribe's template has already drifted (windscribe_userpass.txt vs the {provider}-auth.txt convention). Fix = inject the auth/ca/ta paths per entry at seed time, the way the custom import already rewrites auth-user-pass — templates become purely "what options does this type need".

Caveat: don't over-invest in the ProtonVPN template before #33 settles — the API serves complete per-server configs (the routine already downloads one just to harvest the CA cert and TLS key), so Proton's seed may come from the API instead.

resources/ mixes three species under config-ish names: per-type OpenVPN base templates (Airvpn_config etc. — blank proto/remote filled by write_config, seeded once into {entry}/openvpn.conf by copy_certs), the stunnel template (ssl_config, rewritten per connection by tunnel.py), and actual default settings (default_config.json, firewall_default.json). The first two are templates, not configs. Two-stage remedy: 1. **Cheap, anytime**: move the templates to resources/templates/{Type}.ovpn (+ the stunnel template). One code reference each — update.py copy_certs for the provider templates, tunnel.py for ssl_config — plus setup.py's data_files. 2. **With the multi-entry work**: strip the embedded absolute paths. The shipped per-type templates hardcode per-install, per-type paths (auth-user-pass /usr/share/aqomui/ProtonVPN/ProtonVPN-auth.txt, ca .../proton_ca.crt) — wrong once name≠type is real: an entry named "My Proton" gets its certs in My Proton/ while its seeded config points at ProtonVPN/. Windscribe's template has already drifted (windscribe_userpass.txt vs the {provider}-auth.txt convention). Fix = inject the auth/ca/ta paths per entry at seed time, the way the custom import already rewrites auth-user-pass — templates become purely "what options does this type need". Caveat: don't over-invest in the ProtonVPN template before #33 settles — the API serves complete per-server configs (the routine already downloads one just to harvest the CA cert and TLS key), so Proton's seed may come from the API instead.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mysticalsoap/aqomui#143
No description provided.