Comment on VPN protection: allow other VPN apps (WireGuard, NetBird, ...) as the VPN app (small patch)
So the question isn't really technical. Would you be OK documenting this endpoint and its response fields as a supported contract for VPN apps, perhaps marked experimental?
Currently, it's internal only because no other app supports it.
Two things I couldn't tell from the code: how should a VPN app learn about changes (polling, or a restart/notification when the config changes)? And how does the OpenVPN app use dashboardDomain?
Currently, this is polled. dashboardDomain is used for display purposes. In the VPN app settings, there is a link to the Cloudron dashboard's app passwords settings.
Do you happen to have a package that might work with this change already? Might be interesting to consider this change.
@girish Thanks, that clears it up: an internal endpoint the VPN app polls, with
dashboardDomainfor display only.Yes, there's now a package that works with the change: https://github.com/marcusquinn/cloudron-netbird-router-app
It's a NetBird routing peer with
net_admin. Every 30 seconds it reads/vpn-access-configand keeps one NetBird network in step: itself as a masquerading router, plus one domain resource per protected FQDN (primary, secondary and alias). Who can reach them stays a normal NetBird access policy.Tested on a 10.1.6 Cloudron with the patch:
Two things I learned that matter for the patch:
apps.jscheck is needed. Stock 10.1.6 only refuses to make the OpenVPN app itself VPN access only, so it let me protect the selected router. The patch refuses it for whichever app is selected.CLOUDRONinput chain drops container-to-published-port traffic. The package works around it inside its own container. No change needed on your side, just mentioning it in case it matters for other VPN apps.The dashboard part (the
.vuechanges, so the selector listsnet_adminapps) I only tested through the API. Happy to rebase the patch onto whatever branch suits you.