fix packet encoding (#774)

* feat(sub): get packet encoding from Clash.Meta's sub

* fix: use "packetaddr" instead of "packet"

* fix

* fix

---------

Co-authored-by: 2022-blake3-chacha8-poly1305 <139959885+xchacha20-ietf-poly1305@users.noreply.github.com>
This commit is contained in:
HystericalDragon
2023-08-08 14:14:39 +08:00
committed by GitHub
parent d35867b7ab
commit df1c7cc8b4
3 changed files with 11 additions and 11 deletions

View File

@@ -70,12 +70,8 @@ namespace NekoGui_fmt {
outbound->insert("tls", tls);
}
if (!packet_encoding.isEmpty()) {
auto pkt = packet_encoding;
if (pkt == "packet") pkt = "packetaddr";
outbound->insert("packet_encoding", pkt);
} else if (outbound->value("type").toString() == "vless") {
outbound->insert("packet_encoding", "");
if (outbound->value("type").toString() == "vmess" || outbound->value("type").toString() == "vless") {
outbound->insert("packet_encoding", packet_encoding);
}
}