Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/WireGuard/wgctrl-go
/ functions
Functions
219 in github.com/WireGuard/wgctrl-go
⨍
Functions
219
◇
Types & classes
79
↓ 49 callers
Function
m
(attrs ...netlink.Attribute)
internal/wglinux/client_linux_test.go:342
↓ 41 callers
Function
MustCIDR
MustCIDR converts CIDR string s into a net.IPNet or panics.
internal/wgtest/wgtest.go:12
↓ 21 callers
Method
String
String returns the base64-encoded string representation of a Key. ParseKey can be used to produce a new Key from this string.
wgtypes/types.go:153
↓ 15 callers
Function
MustPublicKey
MustPublicKey generates a public key or panics.
internal/wgtest/wgtest.go:57
↓ 15 callers
Function
mustAllowedIPs
(ipns []net.IPNet)
internal/wglinux/client_linux_test.go:328
↓ 13 callers
Function
MustHexKey
MustHexKey decodes a hex string s as a key or panics.
internal/wgtest/wgtest.go:22
↓ 12 callers
Method
Device
(name string)
internal/wginternal/client.go:19
↓ 9 callers
Method
Close
Close implements wginternal.Client.
internal/wguser/client.go:34
↓ 9 callers
Function
sockaddrPort
sockaddrPort interprets port as a big endian uint16 for use passing sockaddr structures to the kernel.
internal/wglinux/configure_linux.go:291
↓ 8 callers
Method
Close
Close implements wginternal.Client.
internal/wglinux/client_linux.go:73
↓ 8 callers
Method
ConfigureDevice
(name string, cfg wgtypes.Config)
internal/wginternal/client.go:20
↓ 8 callers
Function
MustUDPAddr
MustUDPAddr parses s as a UDP address or panics.
internal/wgtest/wgtest.go:62
↓ 7 callers
Method
Devices
()
internal/wginternal/client.go:18
↓ 7 callers
Method
IP
IP returns IPv4 or IPv6 address, or nil if the address is neither.
internal/wgwindows/internal/ioctl/winipcfg_windows.go:64
↓ 7 callers
Method
parseInt
parseInt parses an integer from a string.
internal/wguser/parse.go:201
↓ 6 callers
Method
PublicKey
PublicKey computes a public key from the private key k. PublicKey should only be called when k is a private key.
wgtypes/types.go:137
↓ 6 callers
Function
keyBytes
(s string)
internal/wglinux/configure_linux_test.go:511
↓ 6 callers
Function
panicf
(format string, a ...interface{})
internal/wgtest/wgtest.go:71
↓ 6 callers
Function
testClient
(t *testing.T, fn genltest.Func)
internal/wglinux/client_linux_test.go:284
↓ 5 callers
Method
Device
Device implements wginternal.Client.
internal/wgopenbsd/client_openbsd.go:110
↓ 5 callers
Function
New
New creates a new Client.
internal/wguser/client.go:23
↓ 5 callers
Function
NewKey
NewKey creates a Key from an existing byte slice. The byte slice must be exactly 32 bytes in length.
wgtypes/types.go:112
↓ 5 callers
Method
Parse
Parse parses a single key/value pair into fields of a Device.
internal/wguser/parse.go:98
↓ 5 callers
Function
tryConfigure
(t *testing.T, c *wgctrl.Client, device string, cfg wgtypes.Config)
client_integration_test.go:410
↓ 4 callers
Function
MustPrivateKey
MustPrivateKey generates a private key or panics.
internal/wgtest/wgtest.go:47
↓ 4 callers
Function
bePort
bePort interprets a port integer stored in native endianness as a big endian value. This is necessary for proper endpoint port handling on little endi
internal/wgopenbsd/client_openbsd.go:338
↓ 4 callers
Function
panicf
(format string, a ...interface{})
internal/wguser/client.go:97
↓ 4 callers
Function
parseKey
parseKey parses a wgtypes.Key from a byte slice.
internal/wglinux/parse_linux.go:181
↓ 4 callers
Function
testClient
(t *testing.T, res []byte)
internal/wguser/client_test.go:62
↓ 3 callers
Method
Close
Close releases resources used by a Client.
client.go:34
↓ 3 callers
Function
MustPresharedKey
MustPresharedKey generates a preshared key or panics.
internal/wgtest/wgtest.go:37
↓ 3 callers
Function
devName
(name string)
internal/wgopenbsd/client_openbsd_test.go:333
↓ 3 callers
Function
deviceName
deviceName infers a device name from an absolute file path with extension.
internal/wguser/client.go:93
↓ 3 callers
Function
findUNIXSockets
findUNIXSockets looks for UNIX socket files in the specified directories.
internal/wguser/conn_unix.go:29
↓ 3 callers
Function
generateIPs
(n int)
internal/wglinux/configure_linux_test.go:516
↓ 3 callers
Function
hexKey
hexKey encodes a wgtypes.Key into a hexadecimal string.
internal/wguser/configure.go:104
↓ 3 callers
Function
initClient
initClient is the internal Client constructor used in some tests.
internal/wglinux/client_linux.go:50
↓ 3 callers
Function
isValidIP
isValidIP determines if IP is a valid IPv4 or IPv6 address.
internal/wglinux/configure_linux.go:280
↓ 3 callers
Function
panicf
(format string, a ...interface{})
internal/wgopenbsd/client_openbsd.go:370
↓ 3 callers
Function
panicf
(format string, a ...interface{})
internal/wglinux/client_linux_test.go:348
↓ 3 callers
Method
parseKey
parseKey parses a Key from a hex string.
internal/wguser/parse.go:180
↓ 3 callers
Function
unsafeSlice
unsafeSlice updates the slice slicePtr to be a slice referencing the provided data with its length & capacity set to lenCap. TODO: whenGo 1.17 is the
internal/wgwindows/internal/ioctl/configuration_windows.go:125
↓ 2 callers
Method
Device
Device implements wginternal.Client.
internal/wgfreebsd/client_freebsd.go:117
↓ 2 callers
Function
GenerateKey
GenerateKey generates a Key suitable for use as a pre-shared secret key from a cryptographically safe source. The output Key should not be used as a
wgtypes/types.go:84
↓ 2 callers
Function
GeneratePrivateKey
GeneratePrivateKey generates a Key suitable for use as a private key from a cryptographically safe source.
wgtypes/types.go:95
↓ 2 callers
Function
Marshal
Marshal encodes a Go map to a FreeBSD name-value list (nv(9))
internal/wgfreebsd/internal/nv/encode.go:21
↓ 2 callers
Function
New
New creates a new Client.
client.go:22
↓ 2 callers
Function
New
New creates a new Client and returns whether or not the generic netlink interface is available.
internal/wglinux/client_linux.go:32
↓ 2 callers
Function
ParseKey
ParseKey parses a Key from a base64-encoded string, as produced by the Key.String method.
wgtypes/types.go:125
↓ 2 callers
Function
Unmarshal
Unmarshal decodes a FreeBSD name-value list (nv(9)) to a Go map
internal/wgfreebsd/internal/nv/decode.go:15
↓ 2 callers
Function
countPeerIPs
(d *wgtypes.Device)
client_integration_test.go:422
↓ 2 callers
Function
deviceName
deviceName converts an interface name string to the format required to pass with wgh.WGGetServ.
internal/wgopenbsd/client_openbsd.go:238
↓ 2 callers
Function
deviceName
deviceName converts an interface name string to the format required to pass with wgh.WGGetServ.
internal/wgfreebsd/client_freebsd.go:219
↓ 2 callers
Function
diffAttrs
(x, y []netlink.Attribute)
internal/wglinux/client_linux_test.go:308
↓ 2 callers
Function
encodeAllowedIPs
encodeAllowedIPs returns a function to encode allowed IP nested attributes.
internal/wglinux/configure_linux.go:250
↓ 2 callers
Method
execute
execute executes a single WireGuard netlink request with the specified command, header flags, and attribute arguments.
internal/wglinux/client_linux.go:149
↓ 2 callers
Function
findNamedPipes
findNamedPipes looks for Windows named pipes that match the specified search string prefix.
internal/wguser/conn_windows.go:40
↓ 2 callers
Method
getDevice
The WireGuard userspace configuration protocol is described here: https://www.wireguard.com/xplatform/#cross-platform-userspace-implementation. getDev
internal/wguser/parse.go:22
↓ 2 callers
Function
htons
(i uint16)
internal/wgwindows/internal/ioctl/winipcfg_windows.go:30
↓ 2 callers
Function
htons
(i int)
internal/wgfreebsd/client_freebsd.go:264
↓ 2 callers
Function
intPtr
(v int)
internal/wguser/client_test.go:130
↓ 2 callers
Function
intPtr
(v int)
internal/wglinux/client_linux_test.go:346
↓ 2 callers
Function
integrationClient
(t *testing.T)
client_integration_test.go:102
↓ 2 callers
Method
interfaceHandle
(name string)
internal/wgwindows/client_windows.go:87
↓ 2 callers
Function
ioctl
ioctl is a raw wrapper for the ioctl system call.
internal/wgopenbsd/client_openbsd.go:360
↓ 2 callers
Function
ioctl
ioctl is a raw wrapper for the ioctl system call.
internal/wgfreebsd/client_freebsd.go:246
↓ 2 callers
Function
isIPv6
isIPv6 determines if IP is a valid IPv6 address.
internal/wglinux/configure_linux.go:285
↓ 2 callers
Function
keyPtr
(k wgtypes.Key)
wgtypes/types_test.go:114
↓ 2 callers
Function
keyPtr
(k wgtypes.Key)
internal/wguser/client_test.go:129
↓ 2 callers
Function
keyPtr
(k wgtypes.Key)
internal/wglinux/client_linux_test.go:345
↓ 2 callers
Function
mustKeyPair
()
wgtypes/types_test.go:105
↓ 2 callers
Function
ntohs
(i uint16)
internal/wgwindows/internal/ioctl/winipcfg_windows.go:26
↓ 2 callers
Function
ntohs
(i uint16)
internal/wgfreebsd/client_freebsd.go:259
↓ 2 callers
Method
parseInt64
parseInt64 parses an int64 from a string.
internal/wguser/parse.go:216
↓ 2 callers
Function
parseRTNLInterfaces
parseRTNLInterfaces unpacks rtnetlink messages and returns WireGuard interface names.
internal/wglinux/client_linux.go:201
↓ 2 callers
Function
parseTimespec
parseTimespec parses a time.Time from raw timespec bytes.
internal/wglinux/parse_linux.go:256
↓ 2 callers
Method
refreshInterfaceCache
()
internal/wgwindows/client_windows.go:41
↓ 2 callers
Function
resetDevice
(t *testing.T, c *wgctrl.Client, d *wgtypes.Device)
client_integration_test.go:393
↓ 1 callers
Method
AppendAllowedIP
(allowedIP *AllowedIP)
internal/wgwindows/internal/ioctl/configuration_windows.go:106
↓ 1 callers
Method
AppendInterface
(interfaze *Interface)
internal/wgwindows/internal/ioctl/configuration_windows.go:94
↓ 1 callers
Method
AppendPeer
(peer *Peer)
internal/wgwindows/internal/ioctl/configuration_windows.go:100
↓ 1 callers
Method
Close
Close implements wginternal.Client.
internal/wgopenbsd/client_openbsd.go:59
↓ 1 callers
Method
Close
Close implements wginternal.Client.
internal/wgfreebsd/client_freebsd.go:64
↓ 1 callers
Method
ConfigureDevice
ConfigureDevice configures a WireGuard device by its interface name. Because the zero value of some Go types may be significant to WireGuard for Conf
client.go:87
↓ 1 callers
Method
Device
Device retrieves a WireGuard device by its interface name. If the device specified by name does not exist or is not a WireGuard device, an error is r
client.go:63
↓ 1 callers
Method
Device
Device returns a Device or any errors that were encountered while parsing a Device.
internal/wguser/parse.go:86
↓ 1 callers
Method
Device
Device implements wginternal.Client.
internal/wgwindows/client_windows.go:141
↓ 1 callers
Method
Device
Device implements wginternal.Client.
internal/wglinux/client_linux.go:103
↓ 1 callers
Method
Devices
Devices retrieves all WireGuard devices on this system.
client.go:45
↓ 1 callers
Method
Devices
Devices implements wginternal.Client.
internal/wgopenbsd/client_openbsd.go:64
↓ 1 callers
Method
FirstAllowedIP
()
internal/wgwindows/internal/ioctl/configuration_windows.go:76
↓ 1 callers
Method
FirstPeer
()
internal/wgwindows/internal/ioctl/configuration_windows.go:68
↓ 1 callers
Method
Interface
()
internal/wgwindows/internal/ioctl/configuration_windows.go:112
↓ 1 callers
Function
New
New creates a new Client and returns whether or not the ioctl interface is available.
internal/wgopenbsd/client_openbsd.go:38
↓ 1 callers
Function
New
New creates a new Client
internal/wgwindows/client_windows.go:131
↓ 1 callers
Function
New
New creates a new Client and returns whether or not the ioctl interface is available.
internal/wgfreebsd/client_freebsd.go:43
↓ 1 callers
Method
NextAllowedIP
()
internal/wgwindows/internal/ioctl/configuration_windows.go:80
↓ 1 callers
Method
NextPeer
()
internal/wgwindows/internal/ioctl/configuration_windows.go:72
↓ 1 callers
Method
Port
Port returns the port if the address if IPv4 or IPv6, or 0 if neither.
internal/wgwindows/internal/ioctl/winipcfg_windows.go:77
↓ 1 callers
Method
Preallocate
(size uint32)
internal/wgwindows/internal/ioctl/configuration_windows.go:88
next →
1–100 of 219, ranked by callers