测试:尝试增加hysteria2协议,尝试增加设备数限制功能

This commit is contained in:
wyx2685
2023-11-18 07:05:28 +09:00
parent f928b4f8f3
commit cf8016f405
18 changed files with 380 additions and 323 deletions

View File

@@ -200,6 +200,22 @@ func getInboundOptions(tag string, info *panel.NodeInfo, c *conf.Options) (optio
Obfs: info.Hysteria.Obfs,
TLS: &tls,
}
case "hysteria2":
in.Type = "hysteria2"
var obfs *option.Hysteria2Obfs
if info.Hysteria2.ObfsType != "" {
obfs = &option.Hysteria2Obfs{
Type: info.Hysteria2.ObfsType,
Password: info.Hysteria2.ObfsPassword,
}
}
in.Hysteria2Options = option.Hysteria2InboundOptions{
ListenOptions: listen,
UpMbps: info.Hysteria2.UpMbps,
DownMbps: info.Hysteria2.DownMbps,
Obfs: obfs,
TLS: &tls,
}
}
return in, nil
}