1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-07 10:47:48 -05:00
v2fly/transport/internet/authenticator_json.go

20 lines
380 B
Go
Raw Normal View History

2016-08-06 15:59:22 -04:00
// +build json
package internet
2016-08-25 07:25:59 -04:00
import (
"v2ray.com/core/common/loader"
)
2016-08-06 15:59:22 -04:00
2016-09-21 07:52:16 -04:00
func CreateAuthenticatorConfig(rawConfig []byte) (string, interface{}, error) {
2016-08-25 07:25:59 -04:00
config, name, err := configCache.Load(rawConfig)
if err != nil {
return name, nil, err
}
return name, config, nil
2016-08-06 15:59:22 -04:00
}
2016-08-25 07:25:59 -04:00
2016-09-21 07:52:16 -04:00
func init() {
configCache = loader.NewJSONConfigLoader(loader.ConfigCreatorCache{}, "type", "")
}