new: add support for hysteria and wg

This commit is contained in:
Hiddify
2023-12-19 08:39:08 +01:00
parent 58c5c86232
commit 34b491ac0d

View File

@@ -54,12 +54,15 @@ abstract class LinkParser {
uri.hasFragment ? Uri.decodeComponent(uri.fragment) : null;
final name = switch (uri.scheme) {
'ss' => fragment ?? ProxyType.shadowsocks.label,
'ssconf' => fragment ?? ProxyType.shadowsocks.label,
'vmess' => ProxyType.vmess.label,
'vless' => fragment ?? ProxyType.vless.label,
'trojan' => fragment ?? ProxyType.trojan.label,
'tuic' => fragment ?? ProxyType.tuic.label,
'hy2' || 'hysteria2' => fragment ?? ProxyType.hysteria.label,
'hy2' || 'hysteria2' => fragment ?? ProxyType.hysteria2.label,
'hy' || 'hysteria' => fragment ?? ProxyType.hysteria.label,
'ssh' => fragment ?? ProxyType.ssh.label,
'wg' => fragment ?? ProxyType.wireguard.label,
_ => null,
};
if (name != null) {