sing_tun

package
v0.0.0-...-686dedc Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: GPL-3.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultInterfaceFinder control.InterfaceFinder = (*defaultInterfaceFinder)(nil)
View Source
var EnforceBindInterface = false
View Source
var InterfaceName = "Meta"

Functions

func CalculateInterfaceName

func CalculateInterfaceName(name string) (tunName string)

Types

type Listener

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

func New

func New(options LC.Tun, tunnel C.Tunnel, additions ...inbound.Addition) (l *Listener, err error)

func (*Listener) Address

func (l *Listener) Address() string

func (*Listener) Close

func (l *Listener) Close() error

func (*Listener) Config

func (l *Listener) Config() LC.Tun

func (*Listener) FlushDefaultInterface

func (l *Listener) FlushDefaultInterface()

type ListenerHandler

type ListenerHandler struct {
	*sing.ListenerHandler
	DnsAdds []netip.AddrPort
}

func (*ListenerHandler) NewConnection

func (h *ListenerHandler) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error

func (*ListenerHandler) NewPacketConnection

func (h *ListenerHandler) NewPacketConnection(ctx context.Context, conn network.PacketConn, metadata M.Metadata) error

func (*ListenerHandler) ShouldHijackDns

func (h *ListenerHandler) ShouldHijackDns(targetAddr netip.AddrPort) bool

func (*ListenerHandler) TypeMutation

func (h *ListenerHandler) TypeMutation(typ C.Type) *ListenerHandler

Jump to

Keyboard shortcuts

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