Versions in this module Expand all Collapse all v1 v1.4.1 May 10, 2026 Changes in this version + func Context(ctx context.Context, inboundRegistry adapter.InboundRegistry, ...) context.Context + func DNSTransportRegistry() *dns.TransportRegistry + func EndpointRegistry() *endpoint.Registry + func InboundRegistry() *inbound.Registry + func NewDefaultFactory(ctx context.Context, formatter log.Formatter, writer io.Writer, ...) log.ObservableFactory + func NewFactory(options log.Options) (log.Factory, error) + func OutboundRegistry() *outbound.Registry + func ServiceRegistry() *service.Registry + type Box struct + func NewBox(options Options) (*Box, error) + func (s *Box) Close() error + func (s *Box) ConnTracker() *ConnTracker + func (s *Box) Endpoint() adapter.EndpointManager + func (s *Box) Inbound() adapter.InboundManager + func (s *Box) Network() adapter.NetworkManager + func (s *Box) Outbound() adapter.OutboundManager + func (s *Box) PreStart() error + func (s *Box) Router() adapter.Router + func (s *Box) Start() error + func (s *Box) StatsTracker() *StatsTracker + func (s *Box) Uptime() uint32 + type CheckOutboundResult struct + Delay uint16 + Error string + OK bool + func CheckOutbound(ctx context.Context, tag string, link string) (result CheckOutboundResult) + type ConnTracker struct + func NewConnTracker() *ConnTracker + func (c *ConnTracker) CloseConnByInbound(inbound string) int + func (c *ConnTracker) Reset() + func (c *ConnTracker) RoutedConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, ...) net.Conn + func (c *ConnTracker) RoutedPacketConnection(ctx context.Context, conn network.PacketConn, metadata adapter.InboundContext, ...) network.PacketConn + type ConnectionInfo struct + Conn net.Conn + ID string + Inbound string + PacketConn network.PacketConn + Type string + type Core struct + func NewCore() *Core + func (c *Core) AddEndpoint(config []byte) error + func (c *Core) AddInbound(config []byte) error + func (c *Core) AddOutbound(config []byte) error + func (c *Core) AddService(config []byte) error + func (c *Core) GetCtx() context.Context + func (c *Core) GetInstance() *Box + func (c *Core) IsRunning() bool + func (c *Core) RemoveEndpoint(tag string) error + func (c *Core) RemoveInbound(tag string) error + func (c *Core) RemoveOutbound(tag string) error + func (c *Core) RemoveService(tag string) error + func (c *Core) Start(sbConfig []byte) error + func (c *Core) Stop() error + type Counter struct + type Options struct + Context context.Context + type PlatformWriter struct + func (p PlatformWriter) DisableColors() bool + func (p PlatformWriter) WriteMessage(level log.Level, message string) + type StatsTracker struct + func NewStatsTracker() *StatsTracker + func (c *StatsTracker) GetStats() *[]model.Stats + func (c *StatsTracker) Reset() + func (c *StatsTracker) RoutedConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, ...) net.Conn + func (c *StatsTracker) RoutedPacketConnection(ctx context.Context, conn network.PacketConn, metadata adapter.InboundContext, ...) network.PacketConn