mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-22 15:12:48 +00:00
protobuf for kcp config
This commit is contained in:
23 files changed
+463
-82
No files matched your search
@@ -3,16 +3,19 @@ package registry
|
||||
import "v2ray.com/core/common/loader"
|
||||
|
||||
var (
|
||||
inboundConfigCache loader.ConfigLoader
|
||||
outboundConfigCache loader.ConfigLoader
|
||||
inboundConfigCreatorCache = loader.ConfigCreatorCache{}
|
||||
inboundConfigCache loader.ConfigLoader
|
||||
|
||||
outboundConfigCreatorCache = loader.ConfigCreatorCache{}
|
||||
outboundConfigCache loader.ConfigLoader
|
||||
)
|
||||
|
||||
func RegisterInboundConfig(protocol string, creator loader.ConfigCreator) error {
|
||||
return inboundConfigCache.RegisterCreator(protocol, creator)
|
||||
return inboundConfigCreatorCache.RegisterCreator(protocol, creator)
|
||||
}
|
||||
|
||||
func RegisterOutboundConfig(protocol string, creator loader.ConfigCreator) error {
|
||||
return outboundConfigCache.RegisterCreator(protocol, creator)
|
||||
return outboundConfigCreatorCache.RegisterCreator(protocol, creator)
|
||||
}
|
||||
|
||||
func CreateInboundConfig(protocol string, data []byte) (interface{}, error) {
|
||||
|
||||
@@ -7,6 +7,6 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
inboundConfigCache = loader.NewJSONConfigLoader(loader.ConfigCreatorCache{}, "protocol", "settings")
|
||||
outboundConfigCache = loader.NewJSONConfigLoader(loader.ConfigCreatorCache{}, "protocol", "settings")
|
||||
inboundConfigCache = loader.NewJSONConfigLoader(inboundConfigCreatorCache, "protocol", "settings")
|
||||
outboundConfigCache = loader.NewJSONConfigLoader(outboundConfigCreatorCache, "protocol", "settings")
|
||||
}
|
||||
Reference in new issue
Block a user