rename proxy/internal to proxy/registry

This commit is contained in:
v2ray committed 2016-08-17 23:30:15 +02:00
1 parent d9884b4010
commit 89a876a6d4
27 files changed
+65 -80

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
package registry
import "github.com/v2ray/v2ray-core/common/loader"
var (
inboundConfigCache loader.ConfigLoader
outboundConfigCache loader.ConfigLoader
)
func RegisterInboundConfig(protocol string, creator loader.ConfigCreator) error {
return inboundConfigCache.RegisterCreator(protocol, creator)
}
func RegisterOutboundConfig(protocol string, creator loader.ConfigCreator) error {
return outboundConfigCache.RegisterCreator(protocol, creator)
}
func CreateInboundConfig(protocol string, data []byte) (interface{}, error) {
return inboundConfigCache.LoadWithID(data, protocol)
}
func CreateOutboundConfig(protocol string, data []byte) (interface{}, error) {
return outboundConfigCache.LoadWithID(data, protocol)
}