2017-04-08 23:43:25 +00:00
|
|
|
package conf
|
|
|
|
|
2017-05-17 10:02:35 +00:00
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
|
|
|
|
"v2ray.com/core"
|
|
|
|
jsonconf "v2ray.com/ext/tools/conf/serial"
|
|
|
|
)
|
|
|
|
|
2017-04-08 23:43:25 +00:00
|
|
|
//go:generate go run $GOPATH/src/v2ray.com/core/tools/generrorgen/main.go -pkg conf -path Tools,Conf
|
2017-05-17 10:02:35 +00:00
|
|
|
|
|
|
|
func init() {
|
|
|
|
core.RegisterConfigLoader(core.ConfigFormat_JSON, func(input io.Reader) (*core.Config, error) {
|
|
|
|
return jsonconf.LoadJSONConfig(input)
|
|
|
|
})
|
|
|
|
}
|