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

Function uninstallWinTun

vpn/tun_windows.go:147–157  ·  view source on GitHub ↗

TODO(@dean): implement a way to install/uninstall the wintun driver, most likely as a CLI command This is taken from Tailscale: https://github.com/tailscale/tailscale/blob/3abfbf50aebbe3ba57dc749165edb56be6715c0a/cmd/tailscaled/tailscaled_windows.go#L543

(logf logger.Logf)

Source from the content-addressed store, hash-verified

145// This is taken from Tailscale:
146// https://github.com/tailscale/tailscale/blob/3abfbf50aebbe3ba57dc749165edb56be6715c0a/cmd/tailscaled/tailscaled_windows.go#L543
147func uninstallWinTun(logf logger.Logf) {
148 dll := windows.NewLazyDLL("wintun.dll")
149 if err := dll.Load(); err != nil {
150 logf("Cannot load wintun.dll for uninstall: %v", err)
151 return
152 }
153
154 logf("Removing wintun driver...")
155 err := wintun.Uninstall()
156 logf("Uninstall: %v", err)
157}
158
159// TODO(@dean): remove
160var _ = uninstallWinTun

Callers

nothing calls this directly

Calls 2

logfFunction · 0.85
LoadMethod · 0.45

Tested by

no test coverage detected