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:
@ -84,12 +84,10 @@ func (p *TrojanParser) Parse(proxy string) (P.Proxy, error) {
|
||||
alpn = nil
|
||||
}
|
||||
|
||||
result := P.Proxy{
|
||||
Type: p.GetType(),
|
||||
result := P.Trojan{
|
||||
Server: server,
|
||||
Port: port,
|
||||
Password: password,
|
||||
Name: remarks,
|
||||
Network: network,
|
||||
}
|
||||
|
||||
@ -125,7 +123,11 @@ func (p *TrojanParser) Parse(proxy string) (P.Proxy, error) {
|
||||
}
|
||||
}
|
||||
|
||||
return result, nil
|
||||
return P.Proxy{
|
||||
Type: p.GetType(),
|
||||
Name: remarks,
|
||||
Trojan: result,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
Reference in New Issue
Block a user