service

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const BufferSize = 40960
View Source
const DefaultTimeout = time.Minute * 5

Variables

This section is empty.

Functions

func KeepAlive

func KeepAlive(resolver *resolve.Resolver)

func ServeDNS

func ServeDNS(bindAddr string, dnsServer DNSServer)

func ServeHTTP

func ServeHTTP(bindAddr string, dialer *dial.Dialer)

func ServeShadowsocks added in v0.7.0

func ServeShadowsocks(dialer *dial.Dialer, url string)

func ServeSocks5

func ServeSocks5(bindAddr string, dialer *dial.Dialer, resolver *resolve.Resolver, user string, password string)

func ServeTCPForwarding

func ServeTCPForwarding(stack stack.Stack, bindAddress string, remoteAddress string)

func ServeUDPForwarding

func ServeUDPForwarding(stack stack.Stack, bindAddress string, remoteAddress string)

Types

type DNSServer

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

func NewDnsServer added in v0.6.0

func NewDnsServer(resolver *resolve.Resolver, dnsServers []string) DNSServer

func (DNSServer) CheckDnsHijack added in v0.6.0

func (d DNSServer) CheckDnsHijack(dstIP net.IP) bool

func (DNSServer) HandleDnsMsg added in v0.6.0

func (d DNSServer) HandleDnsMsg(ctx context.Context, requestMsg *dns.Msg) (*dns.Msg, error)

type UDPConnection

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

type UDPForward

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

Jump to

Keyboard shortcuts

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