network

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2023 License: GPL-3.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectState

type ConnectState int
const (
	Connecting ConnectState = iota
	Connected
	Authenticating
	Authorizing
	WaitingForExitNode
	NotConnected
)

type TailscaleClient

type TailscaleClient struct {
	// contains filtered or unexported fields
}

func NewTailscaleClient

func NewTailscaleClient(
	tunDevName string,
	spaceDeviceName string,
	spaceNodes *mycscloud.SpaceNodes,
) (*TailscaleClient, error)

func (*TailscaleClient) AddSplitDestinations

func (tsc *TailscaleClient) AddSplitDestinations(destinations []string)

func (*TailscaleClient) Connect

func (tsc *TailscaleClient) Connect(
	space userspace.SpaceNode,
	useSpaceDNS, egressViaSpace bool,
) error

func (*TailscaleClient) Disconnect

func (tsc *TailscaleClient) Disconnect() error

func (*TailscaleClient) GetStatus

func (tsc *TailscaleClient) GetStatus() string

func (*TailscaleClient) Write

func (tsc *TailscaleClient) Write(p []byte) (n int, err error)

io.Writer intercepts tailscale output and inspects for status updates and redirects to MyCS debug logs

type TailscaleDaemon

type TailscaleDaemon struct {
	*tailscale_common.TailscaleDaemon
	// contains filtered or unexported fields
}

func NewTailscaleDaemon

func NewTailscaleDaemon(
	statePath string,
	spaceNodes *mycscloud.SpaceNodes,
	monitorService *monitors.MonitorService,
) *TailscaleDaemon

func (*TailscaleDaemon) BytesTransmitted

func (tsd *TailscaleDaemon) BytesTransmitted() (int64, int64, error)

func (*TailscaleDaemon) CacheDNSNames

func (tsd *TailscaleDaemon) CacheDNSNames(dnsNames []string) ([]string, error)

func (*TailscaleDaemon) ConfigureTLS

func (tsd *TailscaleDaemon) ConfigureTLS(host string, tc *tls.Config) error

hook in - tailscale.com/net/tlsdial/tlsdial.go

func (*TailscaleDaemon) ExcludeRoute

func (tsd *TailscaleDaemon) ExcludeRoute(pfx netip.Prefix) bool

hook in - tailscale.com/wgengine/router/router_userspace_bsd.go

func (*TailscaleDaemon) IgnoreSetsockoptInt

func (tsd *TailscaleDaemon) IgnoreSetsockoptInt() bool

hook in - tailscale.com/net/netns/netns_darwin_tailscaled.go

func (*TailscaleDaemon) ResolvedDNSNames

func (tsd *TailscaleDaemon) ResolvedDNSNames() []ipnlocal.MyCSDNSMapping

hook in - tailscale.com/ipn/ipnlocal/local.go

func (*TailscaleDaemon) Start

func (tsd *TailscaleDaemon) Start() error

func (*TailscaleDaemon) Stop

func (tsd *TailscaleDaemon) Stop()

func (*TailscaleDaemon) Write

func (tsd *TailscaleDaemon) Write(p []byte) (n int, err error)

io.Writer intercepts tailscale log output and redirects to MyCS debug logs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL