Add v2ray stats api

This commit is contained in:
世界
2022-09-26 19:37:06 +08:00
parent c7a485815c
commit 1b44faed17
32 changed files with 1408 additions and 64 deletions

View File

@@ -14,6 +14,11 @@ import (
N "github.com/sagernet/sing/common/network"
)
type (
ServerConstructor[O any] func(ctx context.Context, options O, tlsConfig tls.Config, handler N.TCPConnectionHandler, errorHandler E.Handler) (adapter.V2RayServerTransport, error)
ClientConstructor[O any] func(ctx context.Context, dialer N.Dialer, serverAddr M.Socksaddr, options O, tlsConfig tls.Config) (adapter.V2RayClientTransport, error)
)
func NewServerTransport(ctx context.Context, options option.V2RayTransportOptions, tlsConfig tls.Config, handler N.TCPConnectionHandler, errorHandler E.Handler) (adapter.V2RayServerTransport, error) {
if options.Type == "" {
return nil, nil