mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-18 04:54:38 +03:00
update
This commit is contained in:
@@ -11,7 +11,7 @@ namespace Preset {
|
|||||||
} // namespace Xray
|
} // namespace Xray
|
||||||
|
|
||||||
namespace SingBox {
|
namespace SingBox {
|
||||||
inline QStringList VpnImplementation = {"gvisor", "system"};
|
inline QStringList VpnImplementation = {"gvisor", "system", "mixed"};
|
||||||
inline QStringList DomainStrategy = {"", "ipv4_only", "ipv6_only", "prefer_ipv4", "prefer_ipv6"};
|
inline QStringList DomainStrategy = {"", "ipv4_only", "ipv6_only", "prefer_ipv4", "prefer_ipv6"};
|
||||||
inline QStringList UtlsFingerPrint = {"", "chrome", "firefox", "edge", "safari", "360", "qq", "ios", "android", "random", "randomized"};
|
inline QStringList UtlsFingerPrint = {"", "chrome", "firefox", "edge", "safari", "360", "qq", "ios", "android", "random", "randomized"};
|
||||||
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 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"};
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ namespace NekoGui_sub {
|
|||||||
try {
|
try {
|
||||||
auto proxies = YAML::Load(str.toStdString())["proxies"];
|
auto proxies = YAML::Load(str.toStdString())["proxies"];
|
||||||
for (auto proxy: proxies) {
|
for (auto proxy: proxies) {
|
||||||
auto type = Node2QString(proxy["type"]);
|
auto type = Node2QString(proxy["type"]).toLower();
|
||||||
auto type_clash = type;
|
auto type_clash = type;
|
||||||
|
|
||||||
if (type == "ss" || type == "ssr") type = "shadowsocks";
|
if (type == "ss" || type == "ssr") type = "shadowsocks";
|
||||||
@@ -233,7 +233,7 @@ namespace NekoGui_sub {
|
|||||||
ent->bean->serverAddress = Node2QString(proxy["server"]);
|
ent->bean->serverAddress = Node2QString(proxy["server"]);
|
||||||
ent->bean->serverPort = Node2Int(proxy["port"]);
|
ent->bean->serverPort = Node2Int(proxy["port"]);
|
||||||
|
|
||||||
if (type == "shadowsocks") {
|
if (type_clash == "ss") {
|
||||||
auto bean = ent->ShadowSocksBean();
|
auto bean = ent->ShadowSocksBean();
|
||||||
bean->method = Node2QString(proxy["cipher"]).replace("dummy", "none");
|
bean->method = Node2QString(proxy["cipher"]).replace("dummy", "none");
|
||||||
bean->password = Node2QString(proxy["password"]);
|
bean->password = Node2QString(proxy["password"]);
|
||||||
@@ -271,12 +271,7 @@ namespace NekoGui_sub {
|
|||||||
|
|
||||||
// sing-mux
|
// sing-mux
|
||||||
auto smux = NodeChild(proxy, {"smux"});
|
auto smux = NodeChild(proxy, {"smux"});
|
||||||
if (Node2Bool(smux["enabled"]) == true) bean->stream->multiplex_status = 1;
|
if (Node2Bool(smux["enabled"])) bean->stream->multiplex_status = 1;
|
||||||
|
|
||||||
auto protocol_n = proxy["protocol"];
|
|
||||||
if (protocol_n.IsDefined()) {
|
|
||||||
continue; // SSR
|
|
||||||
}
|
|
||||||
} else if (type == "socks" || type == "http") {
|
} else if (type == "socks" || type == "http") {
|
||||||
auto bean = ent->SocksHTTPBean();
|
auto bean = ent->SocksHTTPBean();
|
||||||
bean->username = Node2QString(proxy["username"]);
|
bean->username = Node2QString(proxy["username"]);
|
||||||
@@ -308,7 +303,7 @@ namespace NekoGui_sub {
|
|||||||
|
|
||||||
// sing-mux
|
// sing-mux
|
||||||
auto smux = NodeChild(proxy, {"smux"});
|
auto smux = NodeChild(proxy, {"smux"});
|
||||||
if (Node2Bool(smux["enabled"]) == true) bean->stream->multiplex_status = 1;
|
if (Node2Bool(smux["enabled"])) bean->stream->multiplex_status = 1;
|
||||||
|
|
||||||
// opts
|
// opts
|
||||||
auto ws = NodeChild(proxy, {"ws-opts", "ws-opt"});
|
auto ws = NodeChild(proxy, {"ws-opts", "ws-opt"});
|
||||||
@@ -348,7 +343,7 @@ namespace NekoGui_sub {
|
|||||||
|
|
||||||
// sing-mux
|
// sing-mux
|
||||||
auto smux = NodeChild(proxy, {"smux"});
|
auto smux = NodeChild(proxy, {"smux"});
|
||||||
if (Node2Bool(smux["enabled"]) == true) bean->stream->multiplex_status = 1;
|
if (Node2Bool(smux["enabled"])) bean->stream->multiplex_status = 1;
|
||||||
|
|
||||||
// meta packet encoding
|
// meta packet encoding
|
||||||
if (Node2Bool(proxy["xudp"])) bean->stream->packet_encoding = "xudp";
|
if (Node2Bool(proxy["xudp"])) bean->stream->packet_encoding = "xudp";
|
||||||
@@ -404,7 +399,6 @@ namespace NekoGui_sub {
|
|||||||
auto bean = ent->QUICBean();
|
auto bean = ent->QUICBean();
|
||||||
|
|
||||||
bean->hopPort = Node2QString(proxy["ports"]);
|
bean->hopPort = Node2QString(proxy["ports"]);
|
||||||
if (bean->serverPort == 0) bean->hopPort = Node2QString(proxy["port"]);
|
|
||||||
|
|
||||||
bean->allowInsecure = Node2Bool(proxy["skip-cert-verify"]);
|
bean->allowInsecure = Node2Bool(proxy["skip-cert-verify"]);
|
||||||
auto alpn = Node2QStringList(proxy["alpn"]);
|
auto alpn = Node2QStringList(proxy["alpn"]);
|
||||||
|
|||||||
@@ -48,6 +48,11 @@
|
|||||||
<string notr="true">System</string>
|
<string notr="true">System</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">Mixed</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
Reference in New Issue
Block a user