mirror of
https://github.com/bestnite/sub2clash.git
synced 2025-10-26 09:11:01 +00: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:
@@ -89,18 +89,20 @@ func (p *HysteriaParser) Parse(proxy string) (P.Proxy, error) {
|
||||
remarks = strings.TrimSpace(remarks)
|
||||
|
||||
result := P.Proxy{
|
||||
Type: p.GetType(),
|
||||
Name: remarks,
|
||||
Server: server,
|
||||
Port: port,
|
||||
Up: upmbps,
|
||||
Down: downmbps,
|
||||
Auth: auth,
|
||||
Obfs: obfs,
|
||||
SkipCertVerify: insecureBool,
|
||||
Alpn: alpn,
|
||||
Protocol: protocol,
|
||||
AllowInsecure: insecureBool,
|
||||
Type: p.GetType(),
|
||||
Name: remarks,
|
||||
Hysteria: P.Hysteria{
|
||||
Server: server,
|
||||
Port: port,
|
||||
Up: upmbps,
|
||||
Down: downmbps,
|
||||
Auth: auth,
|
||||
Obfs: obfs,
|
||||
SkipCertVerify: insecureBool,
|
||||
Alpn: alpn,
|
||||
Protocol: protocol,
|
||||
AllowInsecure: insecureBool,
|
||||
},
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user