How julioramos0/gopenvpn works
GopenVPN is a web-managed OpenVPN 3 SSO client that also provides VPN-accessible reverse proxies and outbound SSH/AWS SSM tunnels. Users configure and start the VPN through the browser, complete provider authentication, and the UI polls tunnel status; they can then manage proxy rules and tunnel definitions and lifecycles. The Go server routes these requests to VPN, proxy, and tunnel services. The README documents sidecar networking as a deployment capability, but its container wiring is outside the runtime source map. Relationships are limited to shown calls and documented UI flows; unsampled modules are not treated as inspected.
Main entry points: manager.go Tunnel process manager · app.js VPN and admin UI · proxy.go Reverse proxy service · handlers_vpn.go VPN API handlers
Components 21
Web interface
- Embedded web assets
web/embed.go - VPN and admin UI
web/app.js - Tunnel configuration UI
web/app.js
HTTP server
- HTTP server
cmd/server/main.go - Environment config
config/config.go - VPN API handlers
api/handlers_vpn.go - Proxy API handlers
api/handlers_proxy.go - Tunnel API handlers
api/handlers_tunnels.go
VPN connection
- VPN session runtime
pkg/vpn/vpn.go
Reverse proxy
- Reverse proxy service
pkg/proxy/proxy.go - Proxy rule storage
pkg/proxy/proxy.go
Outbound tunnels
- Tunnel process manager
pkg/tunnel/manager.go - Tunnel definitions
pkg/tunnel/models.go
Other components
- Operator
- Browser
- VPN login portal
- OpenVPN 3 and DBus
- tun0 interface
- VPN-side web targets
- SSH service
- AWS EC2 and SSM
Connections 23
- Operator → Browser: uses
README.md - Browser → VPN and admin UI: loads
README.md - HTTP server → Environment config: loads config
cmd/server/main.go - HTTP server → Embedded web assets: serves
cmd/server/main.go - Embedded web assets → VPN and admin UI: embeds
web/embed.go - VPN and admin UI → VPN API handlers: requests VPN
web/app.js - VPN and admin UI → Proxy API handlers: manages proxies
web/app.js - VPN and admin UI → Tunnel API handlers: manages tunnels
web/app.js - VPN API handlers → VPN session runtime: starts and stops
api/handlers_vpn.go - VPN API handlers → Reverse proxy service: starts and stops
api/handlers_vpn.go - VPN API handlers → Tunnel process manager: stops all
api/handlers_vpn.go - VPN session runtime → OpenVPN 3 and DBus: runs commands
pkg/vpn/vpn.go - VPN session runtime → tun0 interface: checks status
pkg/vpn/vpn.go - Browser → VPN login portal: completes SSO
README.md - Proxy API handlers → Reverse proxy service: manages rules
api/handlers_proxy.go - HTTP server → Reverse proxy service: loads rules
cmd/server/main.go - Reverse proxy service → Proxy rule storage: reads and writes
pkg/proxy/proxy.go - Reverse proxy service → VPN-side web targets: forwards requests
pkg/proxy/proxy.go - Tunnel API handlers → Tunnel definitions: CRUD operations
api/handlers_tunnels.go - Tunnel API handlers → Tunnel process manager: starts and stops
api/handlers_tunnels.go - Tunnel process manager → SSH service: runs SSH
pkg/tunnel/manager.go - Tunnel process manager → AWS EC2 and SSM: runs AWS CLI
pkg/tunnel/manager.go - Tunnel process manager → Tunnel process manager: forwards SSM ports
pkg/tunnel/manager.go