mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 20:44:38 +03:00
bug fix
This commit is contained in:
1
.github/workflows/build-qv2ray-cmake.yml
vendored
1
.github/workflows/build-qv2ray-cmake.yml
vendored
@@ -35,7 +35,6 @@ jobs:
|
|||||||
if: steps.cache-common.outputs.cache-hit != 'true'
|
if: steps.cache-common.outputs.cache-hit != 'true'
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
stable: false
|
|
||||||
go-version: 1.19.2
|
go-version: 1.19.2
|
||||||
- name: Build golang parts
|
- name: Build golang parts
|
||||||
if: steps.cache-common.outputs.cache-hit != 'true'
|
if: steps.cache-common.outputs.cache-hit != 'true'
|
||||||
|
|||||||
@@ -771,7 +771,7 @@ namespace NekoRay {
|
|||||||
cidr_rule = "," + QJsonObject2QString(rule, false);
|
cidr_rule = "," + QJsonObject2QString(rule, false);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
auto tun_name = "nekoray_tun";
|
auto tun_name = "nekoray-tun";
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
tun_name = "utun9";
|
tun_name = "utun9";
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -69,7 +69,13 @@ namespace NekoRay::fmt {
|
|||||||
config = config.replace("%mapping_port%", Int2String(mapping_port));
|
config = config.replace("%mapping_port%", Int2String(mapping_port));
|
||||||
config = config.replace("%socks_port%", Int2String(socks_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++) {
|
for (int i = 0; i < result.arguments.count(); i++) {
|
||||||
result.arguments[i] = result.arguments[i].replace("%config%", TempFile);
|
result.arguments[i] = result.arguments[i].replace("%config%", TempFile);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -363,7 +363,6 @@ namespace NekoRay::sub {
|
|||||||
for (const auto &profile: in) {
|
for (const auto &profile: in) {
|
||||||
profileManager->DeleteProfile(profile->id);
|
profileManager->DeleteProfile(profile->id);
|
||||||
}
|
}
|
||||||
in = {};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -378,6 +377,7 @@ namespace NekoRay::sub {
|
|||||||
ProfileFilter::OnlyInSrc(out, in, only_out);
|
ProfileFilter::OnlyInSrc(out, in, only_out);
|
||||||
ProfileFilter::Common(in, out, update_del, false, true);
|
ProfileFilter::Common(in, out, update_del, false, true);
|
||||||
update_del += only_in;
|
update_del += only_in;
|
||||||
|
if (dataStore->sub_clear) update_del = {};
|
||||||
|
|
||||||
for (const auto &ent: update_del) {
|
for (const auto &ent: update_del) {
|
||||||
profileManager->DeleteProfile(ent->id);
|
profileManager->DeleteProfile(ent->id);
|
||||||
|
|||||||
Reference in New Issue
Block a user