mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 17:46:58 -05:00
support more than one type for a config
This commit is contained in:
parent
9b93bb614a
commit
c89d629943
@ -19,7 +19,13 @@ type implementationRegistry struct {
|
||||
}
|
||||
|
||||
func (i *implementationRegistry) RegisterImplementation(name string, opt *protoext.MessageOpt, loader CustomLoader) {
|
||||
interfaceType := opt.GetType()[0]
|
||||
interfaceType := opt.GetType()
|
||||
for _, v := range interfaceType {
|
||||
i.registerSingleImplementation(v, name, opt, loader)
|
||||
}
|
||||
}
|
||||
|
||||
func (i *implementationRegistry) registerSingleImplementation(interfaceType, name string, opt *protoext.MessageOpt, loader CustomLoader) {
|
||||
implSet, found := i.implSet[interfaceType]
|
||||
if !found {
|
||||
implSet = newImplementationSet()
|
||||
|
Loading…
Reference in New Issue
Block a user