diff --git a/.github/workflows/build-qv2ray-cmake.yml b/.github/workflows/build-qv2ray-cmake.yml index fd737e7..4100e91 100644 --- a/.github/workflows/build-qv2ray-cmake.yml +++ b/.github/workflows/build-qv2ray-cmake.yml @@ -35,7 +35,6 @@ jobs: if: steps.cache-common.outputs.cache-hit != 'true' uses: actions/setup-go@v3 with: - stable: false go-version: 1.19.2 - name: Build golang parts if: steps.cache-common.outputs.cache-hit != 'true' diff --git a/db/ConfigBuilder.cpp b/db/ConfigBuilder.cpp index 445f4c3..fc173c5 100644 --- a/db/ConfigBuilder.cpp +++ b/db/ConfigBuilder.cpp @@ -771,7 +771,7 @@ namespace NekoRay { cidr_rule = "," + QJsonObject2QString(rule, false); } // - auto tun_name = "nekoray_tun"; + auto tun_name = "nekoray-tun"; #ifdef Q_OS_MACOS tun_name = "utun9"; #endif diff --git a/fmt/Bean2External.cpp b/fmt/Bean2External.cpp index aaf0d53..d140093 100644 --- a/fmt/Bean2External.cpp +++ b/fmt/Bean2External.cpp @@ -69,7 +69,13 @@ namespace NekoRay::fmt { config = config.replace("%mapping_port%", Int2String(mapping_port)); config = config.replace("%socks_port%", Int2String(socks_port)); - WriteTempFile("custom_cfg_" + GetRandomString(10) + ".tmp", config.toUtf8()); + // trojan-go: unsupported config format: xxx.tmp. use .yaml or .json instead. + auto suffix = ".tmp"; + if (!QString2QJsonObject(config).isEmpty()) { + suffix = ".json"; + } + + WriteTempFile("custom_" + GetRandomString(10) + suffix, config.toUtf8()); for (int i = 0; i < result.arguments.count(); i++) { result.arguments[i] = result.arguments[i].replace("%config%", TempFile); } diff --git a/sub/GroupUpdater.cpp b/sub/GroupUpdater.cpp index f5809be..a0f3755 100644 --- a/sub/GroupUpdater.cpp +++ b/sub/GroupUpdater.cpp @@ -363,7 +363,6 @@ namespace NekoRay::sub { for (const auto &profile: in) { profileManager->DeleteProfile(profile->id); } - in = {}; } } @@ -378,6 +377,7 @@ namespace NekoRay::sub { ProfileFilter::OnlyInSrc(out, in, only_out); ProfileFilter::Common(in, out, update_del, false, true); update_del += only_in; + if (dataStore->sub_clear) update_del = {}; for (const auto &ent: update_del) { profileManager->DeleteProfile(ent->id);