diff --git a/proxy/socks/simplified/config.go b/proxy/socks/simplified/config.go index a2b423ee8..30dcdf4b7 100644 --- a/proxy/socks/simplified/config.go +++ b/proxy/socks/simplified/config.go @@ -15,7 +15,7 @@ func init() { Address: simplifiedServer.Address, UdpEnabled: simplifiedServer.UdpEnabled, } - return socks.NewServer(ctx, fullServer) + return common.CreateObject(ctx, fullServer) })) common.Must(common.RegisterConfig((*ClientConfig)(nil), func(ctx context.Context, config interface{}) (interface{}, error) { @@ -28,6 +28,6 @@ func init() { }, }, } - return socks.NewClient(ctx, fullClient) + return common.CreateObject(ctx, fullClient) })) } diff --git a/proxy/vmess/inbound/inbound.go b/proxy/vmess/inbound/inbound.go index 49578b9ed..f6b8c6d06 100644 --- a/proxy/vmess/inbound/inbound.go +++ b/proxy/vmess/inbound/inbound.go @@ -377,7 +377,7 @@ func init() { }(), } - return New(ctx, fullConfig) + return common.CreateObject(ctx, fullConfig) })) defaultFlagValue := "NOT_DEFINED_AT_ALL" diff --git a/proxy/vmess/outbound/outbound.go b/proxy/vmess/outbound/outbound.go index 7ae564ed2..274d9b384 100644 --- a/proxy/vmess/outbound/outbound.go +++ b/proxy/vmess/outbound/outbound.go @@ -222,7 +222,7 @@ func init() { }, }} - return New(ctx, fullClient) + return common.CreateObject(ctx, fullClient) })) const defaultFlagValue = "NOT_DEFINED_AT_ALL"