chore: add a tailscale router that uses the CoderVPN protocol (#15391)

Closes #14732.
This commit is contained in:
Ethan
2024-11-07 22:45:17 +11:00
committed by GitHub
parent 6e18742ad3
commit 098728138f
3 changed files with 182 additions and 0 deletions
+3
View File
@@ -110,6 +110,8 @@ type Options struct {
// DNSConfigurator is optional, and is passed to the underlying wireguard
// engine.
DNSConfigurator dns.OSConfigurator
// Router is optional, and is passed to the underlying wireguard engine.
Router router.Router
}
// TelemetrySink allows tailnet.Conn to send network telemetry to the Coder
@@ -183,6 +185,7 @@ func NewConn(options *Options) (conn *Conn, err error) {
ListenPort: options.ListenPort,
SetSubsystem: sys.Set,
DNS: options.DNSConfigurator,
Router: options.Router,
})
if err != nil {
return nil, xerrors.Errorf("create wgengine: %w", err)