create

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: AGPL-3.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler added in v1.0.7

func NewHandler(config *HandlerConfig) (i.Outbound, error)

func NewInbound added in v1.0.7

func NewInbound(config *configs.ProxyInboundConfig, ha i.Handler, tp i.TimeoutSetting) (proxy.Inbound, error)

func NewOutHandler added in v1.0.7

func NewOutHandler(config *Config) (i.Outbound, error)

TODO: Validate config

func NewPolicy

func NewPolicy(config *configs.PolicyConfig) *policy.Policy

func ShadowsocksAccountToMemoryAccount

func ShadowsocksAccountToMemoryAccount(account *proxyconfigs.ShadowsocksAccount) (*shadowsocks.MemoryAccount, error)

func SocketConfigToMemoryConfig

func SocketConfigToMemoryConfig(config *configs.SocketConfig, readCounter, writeCounter *atomic.Uint64) *dlhelper.SocketSetting

func TransportConfigToMemoryConfig

func TransportConfigToMemoryConfig(config *configs.TransportConfig,
	readCounter, writeCounter *atomic.Uint64, dnsServer i.ECHResolver) *transport.Config

func TransportProtocolConfig

func TransportProtocolConfig(tc *configs.TransportConfig) interface{}

func TransportSecurityConfig

func TransportSecurityConfig(config interface{}) interface{}

func UserConfigToUser

func UserConfigToUser(config *configs.UserConfig) (*user.User, error)

Types

type ChainHandler added in v1.0.7

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

func NewChainHandler added in v1.0.7

func NewChainHandler(config *ChainHandlerConfig) (*ChainHandler, error)

func (*ChainHandler) HandleFlow added in v1.0.7

func (c *ChainHandler) HandleFlow(ctx context.Context, dst net.Destination, rw buf.ReaderWriter) error

func (*ChainHandler) HandlePacketConn added in v1.0.7

func (c *ChainHandler) HandlePacketConn(ctx context.Context, dst net.Destination, p udp.PacketReaderWriter) error

func (*ChainHandler) Tag added in v1.0.7

func (c *ChainHandler) Tag() string

type ChainHandlerConfig added in v1.0.7

type ChainHandlerConfig struct {
	*configs.ChainHandlerConfig
	Policy                      *policy.Policy
	IPResolver                  i.IPResolver
	DF                          transport.DialerFactory
	IPResolverForRequestAddress i.IPResolver
	// used to lookup ech config
	EchResolver i.ECHResolver
	RejectQuic  bool
}

type Config added in v1.0.7

type Config struct {
	*configs.OutboundHandlerConfig
	DialerFactory transport.DialerFactory
	Policy        i.TimeoutSetting
	// some outbound require it to lookup server addresses
	IPResolver  i.IPResolver
	ECHResolver i.ECHResolver
	// some outbounds need it to lookup ips of request addresses
	IPResolverForRequestAddress i.IPResolver
	RejectQuic                  bool
}

type HandlerConfig added in v1.0.7

type HandlerConfig struct {
	*configs.HandlerConfig
	DialerFactory transport.DialerFactory
	Policy        *policy.Policy
	// for node domain
	IPResolver                  i.IPResolver
	EchResolver                 i.ECHResolver
	IPResolverForRequestAddress i.IPResolver
	RejectQuic                  bool
}

Jump to

Keyboard shortcuts

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