sing_tun

package
v1.18.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

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

Jump to

Keyboard shortcuts

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