1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

update register logic

This commit is contained in:
Shelikhoo 2021-09-05 00:42:21 +01:00
parent 9d771f2f9f
commit 8c57d03418
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316
2 changed files with 0 additions and 6 deletions

View File

@ -4,7 +4,6 @@ package freedom
import ( import (
"context" "context"
"github.com/v2fly/v2ray-core/v4/common/registry"
"time" "time"
core "github.com/v2fly/v2ray-core/v4" core "github.com/v2fly/v2ray-core/v4"
@ -39,8 +38,6 @@ func init() {
fullConfig := &Config{} fullConfig := &Config{}
return common.CreateObject(ctx, fullConfig) return common.CreateObject(ctx, fullConfig)
})) }))
common.Must(registry.RegisterImplementation(new(SimplifiedConfig).ProtoReflect().Descriptor(), nil))
} }
// Handler handles Freedom connections. // Handler handles Freedom connections.

View File

@ -4,7 +4,6 @@ import (
"context" "context"
"github.com/v2fly/v2ray-core/v4/common" "github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/protocol" "github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/registry"
"github.com/v2fly/v2ray-core/v4/proxy/socks" "github.com/v2fly/v2ray-core/v4/proxy/socks"
) )
@ -18,7 +17,6 @@ func init() {
} }
return common.CreateObject(ctx, fullServer) return common.CreateObject(ctx, fullServer)
})) }))
common.Must(registry.RegisterImplementation(new(ServerConfig).ProtoReflect().Descriptor(), nil))
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) {
simplifiedClient := config.(*ClientConfig) simplifiedClient := config.(*ClientConfig)
@ -32,5 +30,4 @@ func init() {
} }
return common.CreateObject(ctx, fullClient) return common.CreateObject(ctx, fullClient)
})) }))
common.Must(registry.RegisterImplementation(new(ClientConfig).ProtoReflect().Descriptor(), nil))
} }