测试:增加hysteria2内核

This commit is contained in:
wyx2685
2024-02-06 10:59:37 +09:00
parent 77ec03016c
commit 0d274bcf61
15 changed files with 933 additions and 28 deletions

View File

@@ -5,10 +5,11 @@ import (
)
type CoreConfig struct {
Type string `json:"Type"`
Name string `json:"Name"`
XrayConfig *XrayConfig `json:"-"`
SingConfig *SingConfig `json:"-"`
Type string `json:"Type"`
Name string `json:"Name"`
XrayConfig *XrayConfig `json:"-"`
SingConfig *SingConfig `json:"-"`
Hysteria2Config *Hysteria2Config `json:"-"`
}
type _CoreConfig CoreConfig
@@ -25,6 +26,9 @@ func (c *CoreConfig) UnmarshalJSON(b []byte) error {
case "sing":
c.SingConfig = NewSingConfig()
return json.Unmarshal(b, c.SingConfig)
case "hysteria2":
c.Hysteria2Config = NewHysteria2Config()
return json.Unmarshal(b, c.Hysteria2Config)
}
return nil
}