client

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// All components and Inbounds will be started and closed
	Components *common.Components
	Inbounds   []interface{}

	Dispatcher      *dispatcher.Dispatcher
	Geo             *geo.GeoWrapper
	Subscription    *subscription.SubscriptionManager
	DialerFactory   transport.DialerFactory
	Policy          *policy.Policy
	InboundManager  *proxy.InboundManager
	UserLogger      *userlogger.UserLogger
	OutboundManager *outbound.Manager
	// might be nil
	DB        Db
	Tetser    *tester.Tester
	Router    *router.RouterWrapper
	Selectors *selector.Selectors
	Logger    *logger.Logger
	// used to handle dns requests
	Dns *dns.Dns
	// used to resolve domains when dial, typically node address and domains of direct connection
	IPResolver i.IPResolver
	// used to resolve domains of proxied connections, typically used for converting domain to real ip for udp connections
	IPResolverForRequestAddress i.IPResolver
	IPToDomain                  *dns.IPToDomain
	FakeDnsEnabled              atomic.Bool
	AllFakeDns                  *dns.AllFakeDns
	Hysteria2RejectQuic         bool
}

func (*Client) Close

func (c *Client) Close() error

func (*Client) CreateHandler

func (c *Client) CreateHandler(h *configs.HandlerConfig, landHandlerIds []*xsqlite.OutboundHandler) (i.Outbound, error)

func (*Client) GetFakeDnsEnabled

func (c *Client) GetFakeDnsEnabled() bool

func (*Client) SetFakeDnsEnabled

func (c *Client) SetFakeDnsEnabled(enabled bool)

func (*Client) Start

func (c *Client) Start() error

type Db

type Db interface {
	selector.Db
	UpdateHandler(id int, m map[string]interface{}) error
}

Jump to

Keyboard shortcuts

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