MCPcopy Create free account
hub / github.com/coder/coder / Conn

Struct Conn

tailnet/conn.go:441–472  ·  view source on GitHub ↗

Conn is an actively listening Wireguard connection.

Source from the content-addressed store, hash-verified

439
440// Conn is an actively listening Wireguard connection.
441type Conn struct {
442 // Unique ID used for telemetry.
443 id uuid.UUID
444 mutex sync.Mutex
445 closed chan struct{}
446 logger slog.Logger
447
448 dialer *tsdial.Dialer
449 tunDevice *tstun.Wrapper
450 configMaps *configMaps
451 nodeUpdater *nodeUpdater
452 netStack *netstack.Impl
453 magicConn *magicsock.Conn
454 wireguardMonitor *netmon.Monitor
455 wireguardRouter *router.Config
456 wireguardEngine wgengine.Engine
457 dnsConfigurator dns.OSConfigurator
458 listeners map[listenKey]*listener
459 clientType proto.TelemetryEvent_ClientType
460 createdAt time.Time
461
462 telemetrySink TelemetrySink
463 // telemetryStore will be nil if telemetrySink is nil.
464 telemetryStore *TelemetryStore
465 telemetryWg sync.WaitGroup
466
467 watchCtx context.Context
468 watchCancel func()
469
470 trafficStats *connstats.Statistics
471 lastNetInfo *tailcfg.NetInfo
472}
473
474func (c *Conn) GetNetInfo() *tailcfg.NetInfo {
475 c.mutex.Lock()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected