1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-02-20 23:47:21 -05:00

amend vmess socks simplified config to allow injection of implementation

This commit is contained in:
Shelikhoo 2021-09-04 21:26:21 +01:00
parent 8da2f5393d
commit 38f9f1d07a
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316
3 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ func init() {
Address: simplifiedServer.Address, Address: simplifiedServer.Address,
UdpEnabled: simplifiedServer.UdpEnabled, 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) { 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)
})) }))
} }

View File

@ -377,7 +377,7 @@ func init() {
}(), }(),
} }
return New(ctx, fullConfig) return common.CreateObject(ctx, fullConfig)
})) }))
defaultFlagValue := "NOT_DEFINED_AT_ALL" defaultFlagValue := "NOT_DEFINED_AT_ALL"

View File

@ -222,7 +222,7 @@ func init() {
}, },
}} }}
return New(ctx, fullClient) return common.CreateObject(ctx, fullClient)
})) }))
const defaultFlagValue = "NOT_DEFINED_AT_ALL" const defaultFlagValue = "NOT_DEFINED_AT_ALL"