Versions in this module Expand all Collapse all v0 v0.0.1 Feb 6, 2024 Changes in this version + const EventDown — windows/amd64 + const EventMTUUpdate — windows/amd64 + const EventUp — windows/amd64 + const TAP + const TUN + var WintunStaticRequestedGUID *windows.GUID — windows/amd64 + var WintunTunnelType = "Wintun" — windows/amd64 + type Config struct + DeviceType DeviceType + type DevicePermissions struct — linux/amd64 + Group uint + Owner uint + type DeviceType int + type Event int — windows/amd64 + type Interface struct + func New(config Config) (ifce *Interface, err error) + func NewTAP(ifName string) (ifce *Interface, err error) + func NewTUN(ifName string) (ifce *Interface, err error) + func (ifce *Interface) IsTAP() bool + func (ifce *Interface) IsTUN() bool + func (ifce *Interface) Name() string + type MacOSDriverProvider int — darwin/amd64 + const MacOSDriverSystem + const MacOSDriverTunTapOSX + type NativeTun struct — windows/amd64 + func CreateTUN(ifname string, mtu int) (*NativeTun, error) + func CreateTUNWithRequestedGUID(ifname string, requestedGUID *windows.GUID, mtu int) (*NativeTun, error) + func (tun *NativeTun) Close() error + func (tun *NativeTun) Events() chan Event + func (tun *NativeTun) File() *os.File + func (tun *NativeTun) Flush() error + func (tun *NativeTun) ForceMTU(mtu int) + func (tun *NativeTun) LUID() uint64 + func (tun *NativeTun) MTU() (int, error) + func (tun *NativeTun) Name() (string, error) + func (tun *NativeTun) Read(buff []byte, offset int) (int, error) + func (tun *NativeTun) RunningVersion() (version uint32, err error) + func (tun *NativeTun) Write(buff []byte, offset int) (int, error) + type PlatformSpecificParams struct — darwin/amd64, linux/amd64, windows/amd64 + ComponentID string + Driver MacOSDriverProvider + MultiQueue bool + Name string + Network string + Permissions *DevicePermissions + Persist bool + type PlatformSpecificParams struct — js/wasm + type WTun struct — windows/amd64 + func (w *WTun) Close() error + func (w *WTun) Read(b []byte) (int, error) + func (w *WTun) Write(b []byte) (int, error)