1
0
mirror of https://github.com/nitezs/sub2clash.git synced 2024-12-24 12:54:41 -05:00
sub2clash/model/proxy_shadowsocksr.go
nitezs ad7d2b98f6 fix: 修复当base64字符串长度不为4的倍数时,解码失败的问题
update: 提高根据ISO匹配国家名称的正确率
fix: 修复vmess的port和aid不规范导致无法解析的问题
modify: 一些没用的修改
2023-09-24 18:06:44 +08:00

32 lines
873 B
Go

package model
type ShadowSocksR struct {
Type string `yaml:"type"`
Name string `yaml:"name"`
Server string `yaml:"server"`
Port int `yaml:"port"`
Password string `yaml:"password"`
Cipher string `yaml:"cipher"`
Obfs string `yaml:"obfs"`
ObfsParam string `yaml:"obfs-param,omitempty"`
Protocol string `yaml:"protocol"`
ProtocolParam string `yaml:"protocol-param,omitempty"`
UDP bool `yaml:"udp,omitempty"`
}
func ProxyToShadowSocksR(p Proxy) ShadowSocksR {
return ShadowSocksR{
Type: "ssr",
Name: p.Name,
Server: p.Server,
Port: p.Port,
Password: p.Password,
Cipher: p.Cipher,
Obfs: p.Obfs,
ObfsParam: p.ObfsParam,
Protocol: p.Protocol,
ProtocolParam: p.ProtocolParam,
UDP: p.UDP,
}
}