mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
feat: add option to speedtest to dump a pcap of network traffic (#11848)
This commit is contained in:
@@ -30,6 +30,7 @@ import (
|
||||
tslogger "tailscale.com/types/logger"
|
||||
"tailscale.com/types/netlogtype"
|
||||
"tailscale.com/wgengine"
|
||||
"tailscale.com/wgengine/capture"
|
||||
"tailscale.com/wgengine/magicsock"
|
||||
"tailscale.com/wgengine/netstack"
|
||||
"tailscale.com/wgengine/router"
|
||||
@@ -310,6 +311,12 @@ type Conn struct {
|
||||
trafficStats *connstats.Statistics
|
||||
}
|
||||
|
||||
func (c *Conn) InstallCaptureHook(f capture.Callback) {
|
||||
c.mutex.Lock()
|
||||
defer c.mutex.Unlock()
|
||||
c.wireguardEngine.InstallCaptureHook(f)
|
||||
}
|
||||
|
||||
func (c *Conn) MagicsockSetDebugLoggingEnabled(enabled bool) {
|
||||
c.magicConn.SetDebugLoggingEnabled(enabled)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user