1
0
mirror of https://github.com/nitezs/sub2clash.git synced 2024-12-23 14:04:41 -05:00

修复hysterica类型代理配置中部分字段的识别

This commit is contained in:
Qi Chai 2024-03-11 12:24:21 +08:00 committed by GitHub
parent ff73da3a4c
commit e5c3852f06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,6 +13,7 @@ type Hysteria struct {
Down string `yaml:"down"` Down string `yaml:"down"`
DownSpeed int `yaml:"down-speed,omitempty"` // compatible with Stash DownSpeed int `yaml:"down-speed,omitempty"` // compatible with Stash
Auth string `yaml:"auth,omitempty"` Auth string `yaml:"auth,omitempty"`
AuthStringOLD string `yaml:"auth_str,omitempty"`
AuthString string `yaml:"auth-str,omitempty"` AuthString string `yaml:"auth-str,omitempty"`
Obfs string `yaml:"obfs,omitempty"` Obfs string `yaml:"obfs,omitempty"`
SNI string `yaml:"sni,omitempty"` SNI string `yaml:"sni,omitempty"`
@ -34,9 +35,13 @@ func ProxyToHysteria(p Proxy) Hysteria {
Name: p.Name, Name: p.Name,
Server: p.Server, Server: p.Server,
Port: p.Port, Port: p.Port,
Ports: p.Ports,
Protocol: p.Protocol,
Up: p.Up, Up: p.Up,
Down: p.Down, Down: p.Down,
Auth: p.Auth, Auth: p.Auth,
AuthStringOLD p.AuthStringOLD,
AuthString: p.AuthString,
Obfs: p.Obfs, Obfs: p.Obfs,
SNI: p.Sni, SNI: p.Sni,
SkipCertVerify: p.SkipCertVerify, SkipCertVerify: p.SkipCertVerify,