Browse Source

amend vmess socks simplified config to allow injection of implementation

Shelikhoo 4 years ago
parent
commit
38f9f1d07a

+ 2 - 2
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)
 	}))
 }

+ 1 - 1
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"

+ 1 - 1
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"