feat: Add new sniff protocols

This commit is contained in:
Nova 2024-08-28 23:25:32 +03:30
parent 427184b4b9
commit 373c048ce6
No known key found for this signature in database
GPG Key ID: 389787EC83F5D73A
2 changed files with 5 additions and 1 deletions

View File

@ -2,6 +2,7 @@
#include <QJsonArray>
#include "RouteEntity.h"
#include "db/Database.hpp"
#include "fmt/Preset.hpp"
#include <iostream>
namespace NekoGui {
@ -169,7 +170,9 @@ namespace NekoGui {
return {"", "tcp", "udp"};
}
if (fieldName == "protocol") {
return {"", "http", "tls", "quic", "stun", "dns", "bittorrent"};
auto resp = Preset::SingBox::SniffProtocols;
resp.prepend("");
return resp;
}
return {};
}

View File

@ -8,6 +8,7 @@ namespace Preset {
inline QStringList ShadowsocksMethods = {"2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305", "none", "aes-128-gcm", "aes-192-gcm", "aes-256-gcm", "chacha20-ietf-poly1305", "xchacha20-ietf-poly1305", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", "rc4-md5", "chacha20-ietf", "xchacha20"};
inline QStringList V2RAYTransports = {"http", "grpc", "quic", "httpupgrade", "ws", "tcp"};
inline QStringList Flows = {"xtls-rprx-vision"};
inline QStringList SniffProtocols = {"http", "tls", "quic", "stun", "dns", "bittorrent", "dtls", "ssh"};
} // namespace SingBox
} // namespace Preset