Versions in this module Expand all Collapse all v1 v1.0.10 Dec 21, 2018 v1.0.9 Nov 13, 2018 v1.0.8 Aug 14, 2018 v1.0.7 Aug 3, 2018 v1.0.6 Jun 26, 2018 v1.0.5 Jun 5, 2018 Changes in this version + const DEFAULT_DOWNSTREAM_PACKET_QUEUE_SIZE + const DEFAULT_IDLE_SESSION_EXPIRY_SECONDS + const DEFAULT_MTU + const DEFAULT_PUBLIC_INTERFACE_NAME + const DEFAULT_UPSTREAM_PACKET_QUEUE_SIZE + const FLOW_IDLE_EXPIRY + const ORPHAN_METRICS_CHECKPOINTER_PERIOD + func BindToDevice(_ int, _ string) error — js/wasm, windows/amd64 + func BindToDevice(fd int, deviceName string) error — darwin/amd64, linux/amd64 + func GetTransparentDNSResolverIPv4Address() net.IP + func GetTransparentDNSResolverIPv6Address() net.IP + func IsSupported() bool + func OpenTunDevice(_ string) (*os.File, string, error) — js/wasm, windows/amd64 + func OpenTunDevice(name string) (*os.File, string, error) — darwin/amd64, linux/amd64 + type AllowedPortChecker func(upstreamIPAddress net.IP, port int) bool + type Channel struct + func NewChannel(transport io.ReadWriteCloser, MTU int) *Channel + func (channel *Channel) Close() error + func (channel *Channel) ReadPacket() ([]byte, error) + func (channel *Channel) WriteFramedPackets(packetBuffer []byte) error + func (channel *Channel) WritePacket(packet []byte) error + type Client struct + func NewClient(config *ClientConfig) (*Client, error) + func (client *Client) Start() + func (client *Client) Stop() + type ClientConfig struct + AllowNoIPv6NetworkConfiguration bool + IPv4AddressCIDR string + IPv6AddressCIDR string + Logger common.Logger + MTU int + RouteDestinations []string + SudoNetworkConfigCommands bool + Transport io.ReadWriteCloser + TunFileDescriptor int + UpstreamPacketQueueSize int + type Device struct + func NewClientDevice(config *ClientConfig) (*Device, error) + func NewClientDeviceFromFD(config *ClientConfig) (*Device, error) + func NewServerDevice(config *ServerConfig) (*Device, error) + func (device *Device) Close() error + func (device *Device) Name() string + func (device *Device) ReadPacket() ([]byte, error) + func (device *Device) WritePacket(packet []byte) error + type FlowActivityUpdater interface + UpdateProgress func(upstreamBytes, downstreamBytes int64, durationNanoseconds int64) + type FlowActivityUpdaterMaker func(upstreamHostname string, upstreamIPAddress net.IP) []FlowActivityUpdater + type MetricsUpdater func(...) + type NonblockingIO struct + func NewNonblockingIO(ioFD int) (*NonblockingIO, error) + func (nio *NonblockingIO) Close() error + func (nio *NonblockingIO) IsClosed() bool + func (nio *NonblockingIO) Read(p []byte) (int, error) + func (nio *NonblockingIO) Write(p []byte) (int, error) + type PacketQueue struct + func NewPacketQueue(maxSize int) *PacketQueue + func (queue *PacketQueue) DequeueFramedPackets(runContext context.Context) ([]byte, bool) + func (queue *PacketQueue) Enqueue(packet []byte) + func (queue *PacketQueue) Replace(buffer []byte) + type Server struct + func NewServer(config *ServerConfig) (*Server, error) + func (server *Server) ClientConnected(sessionID string, transport io.ReadWriteCloser, ...) error + func (server *Server) ClientDisconnected(sessionID string) + func (server *Server) Start() + func (server *Server) Stop() + type ServerConfig struct + AllowNoIPv6NetworkConfiguration bool + DownstreamPacketQueueSize int + EgressInterface string + GetDNSResolverIPv4Addresses func() []net.IP + GetDNSResolverIPv6Addresses func() []net.IP + Logger common.Logger + MTU int + SessionIdleExpirySeconds int + SudoNetworkConfigCommands bool Incompatible versions in this module v2.0.2+incompatible Mar 5, 2019 v2.0.1+incompatible Feb 21, 2019 v2.0.0+incompatible Dec 21, 2018