Versions in this module Expand all Collapse all v1 v1.8.5 Sep 3, 2023 Changes in this version + var File_core_config_proto protoreflect.FileDescriptor + var Version_x byte = 1 + var Version_y byte = 8 + var Version_z byte = 4 + func AddInboundHandler(server *Instance, config *InboundHandlerConfig) error + func AddOutboundHandler(server *Instance, config *OutboundHandlerConfig) error + func CreateObject(v *Instance, config interface{}) (interface{}, error) + func Dial(ctx context.Context, v *Instance, dest net.Destination) (net.Conn, error) + func DialUDP(ctx context.Context, v *Instance) (net.PacketConn, error) + func GetFormatByExtension(ext string) string + func RegisterConfigLoader(format *ConfigFormat) error + func RequireFeatures(ctx context.Context, callback interface{}) error + func ServerType() interface + func ToBackgroundDetachedContext(ctx context.Context) context.Context + func Version() string + func VersionStatement() []string + type Annotation struct + API string + type Config struct + App []*serial.TypedMessage + Extension []*serial.TypedMessage + Inbound []*InboundHandlerConfig + Outbound []*OutboundHandlerConfig + Transport *global.Config + func LoadConfig(formatName string, input interface{}) (*Config, error) + func (*Config) Descriptor() ([]byte, []int) + func (*Config) ProtoMessage() + func (x *Config) GetApp() []*serial.TypedMessage + func (x *Config) GetExtension() []*serial.TypedMessage + func (x *Config) GetInbound() []*InboundHandlerConfig + func (x *Config) GetOutbound() []*OutboundHandlerConfig + func (x *Config) GetTransport() *global.Config + func (x *Config) ProtoReflect() protoreflect.Message + func (x *Config) Reset() + func (x *Config) String() string + type ConfigBuilder func(files []string, formats []string) (*Config, error) + var ConfigBuilderForFiles ConfigBuilder + type ConfigFormat struct + Extension []string + Loader ConfigLoader + Name string + type ConfigLoader func(input interface{}) (*Config, error) + type InboundHandlerConfig struct + ProxySettings *serial.TypedMessage + ReceiverSettings *serial.TypedMessage + Tag string + func (*InboundHandlerConfig) Descriptor() ([]byte, []int) + func (*InboundHandlerConfig) ProtoMessage() + func (x *InboundHandlerConfig) GetProxySettings() *serial.TypedMessage + func (x *InboundHandlerConfig) GetReceiverSettings() *serial.TypedMessage + func (x *InboundHandlerConfig) GetTag() string + func (x *InboundHandlerConfig) ProtoReflect() protoreflect.Message + func (x *InboundHandlerConfig) Reset() + func (x *InboundHandlerConfig) String() string + type Instance struct + func FromContext(ctx context.Context) *Instance + func MustFromContext(ctx context.Context) *Instance + func New(config *Config) (*Instance, error) + func NewWithContext(ctx context.Context, config *Config) (*Instance, error) + func StartInstance(configFormat string, configBytes []byte) (*Instance, error) + func (s *Instance) AddFeature(feature features.Feature) error + func (s *Instance) Close() error + func (s *Instance) GetFeature(featureType interface{}) features.Feature + func (s *Instance) RequireFeatures(callback interface{}) error + func (s *Instance) Start() error + func (s *Instance) Type() interface{} + type OutboundHandlerConfig struct + Comment string + Expire int64 + ProxySettings *serial.TypedMessage + SenderSettings *serial.TypedMessage + Tag string + func (*OutboundHandlerConfig) Descriptor() ([]byte, []int) + func (*OutboundHandlerConfig) ProtoMessage() + func (x *OutboundHandlerConfig) GetComment() string + func (x *OutboundHandlerConfig) GetExpire() int64 + func (x *OutboundHandlerConfig) GetProxySettings() *serial.TypedMessage + func (x *OutboundHandlerConfig) GetSenderSettings() *serial.TypedMessage + func (x *OutboundHandlerConfig) GetTag() string + func (x *OutboundHandlerConfig) ProtoReflect() protoreflect.Message + func (x *OutboundHandlerConfig) Reset() + func (x *OutboundHandlerConfig) String() string + type Server interface + type XrayKey int