mirror of
https://github.com/bestnite/sub2clash.git
synced 2025-06-17 12:43:18 +08:00
Refactor proxy structure and parser implementations to streamline protocol handling; remove unused marshaler interfaces and improve YAML serialization for various proxy types.
This commit is contained in:
@ -81,17 +81,19 @@ func (p *Hysteria2Parser) Parse(proxy string) (P.Proxy, error) {
|
||||
remarks = strings.TrimSpace(remarks)
|
||||
|
||||
result := P.Proxy{
|
||||
Type: p.GetType(),
|
||||
Name: remarks,
|
||||
Server: server,
|
||||
Port: port,
|
||||
Password: password,
|
||||
Obfs: obfs,
|
||||
ObfsParam: obfsPassword,
|
||||
Sni: sni,
|
||||
SkipCertVerify: insecureBool,
|
||||
TLS: enableTLS,
|
||||
Network: network,
|
||||
Type: p.GetType(),
|
||||
Name: remarks,
|
||||
Hysteria2: P.Hysteria2{
|
||||
Server: server,
|
||||
Port: port,
|
||||
Password: password,
|
||||
Obfs: obfs,
|
||||
ObfsParam: obfsPassword,
|
||||
Sni: sni,
|
||||
SkipCertVerify: insecureBool,
|
||||
TLS: enableTLS,
|
||||
Network: network,
|
||||
},
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user