mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-24 23:19:44 +00:00
unified config loader
This commit is contained in:
1 parent
3f7b70a465
commit
e732ba62a6
18 files changed
+257
-215
No files matched your search
@@ -6,7 +6,7 @@ import (
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/v2ray/v2ray-core/proxy/internal/config"
|
||||
"github.com/v2ray/v2ray-core/proxy/internal"
|
||||
)
|
||||
|
||||
// UnmarshalJSON implements json.Unmarshaler
|
||||
@@ -62,10 +62,5 @@ func (this *Config) UnmarshalJSON(data []byte) error {
|
||||
}
|
||||
|
||||
func init() {
|
||||
config.RegisterInboundConfig("http",
|
||||
func(data []byte) (interface{}, error) {
|
||||
rawConfig := new(Config)
|
||||
err := json.Unmarshal(data, rawConfig)
|
||||
return rawConfig, err
|
||||
})
|
||||
internal.RegisterInboundConfig("http", func() interface{} { return new(Config) })
|
||||
}
|
||||
Reference in new issue
Block a user