From dbbd54077b186b1ab616d83a66f39daf916013dc Mon Sep 17 00:00:00 2001 From: arm64v8a <48624112+arm64v8a@users.noreply.github.com> Date: Fri, 9 Sep 2022 19:32:02 +0800 Subject: [PATCH] update --- examples/sing-box-vpn.json | 2 +- ui/mainwindow.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/sing-box-vpn.json b/examples/sing-box-vpn.json index 21b9aef..af6b0a0 100644 --- a/examples/sing-box-vpn.json +++ b/examples/sing-box-vpn.json @@ -3,7 +3,7 @@ { "type": "tun", "interface_name": "nekoray-tun", - "inet4_address": "172.19.0.1/30", + "inet4_address": "172.19.0.1/28", %IPV6_ADDRESS% "mtu": %MTU%, "auto_route": true, diff --git a/ui/mainwindow.cpp b/ui/mainwindow.cpp index d245654..7e51cae 100644 --- a/ui/mainwindow.cpp +++ b/ui/mainwindow.cpp @@ -1409,7 +1409,7 @@ bool MainWindow::StartVPNProcess() { auto configFn = ":/nekoray/vpn/sing-box-vpn.json"; if (QFile::exists("vpn/sing-box-vpn.json")) configFn = "vpn/sing-box-vpn.json"; auto config = ReadFileText(configFn) - .replace("%IPV6_ADDRESS%", NekoRay::dataStore->vpn_ipv6 ? "\"inet6_address\": \"fdfe:dcba:9876::1/128\"," : "") + .replace("%IPV6_ADDRESS%", NekoRay::dataStore->vpn_ipv6 ? "\"inet6_address\": \"fdfe:dcba:9876::1/126\"," : "") .replace("%MTU%", Int2String(NekoRay::dataStore->vpn_mtu)) .replace("%STACK%", Preset::SingBox::VpnImplementation[NekoRay::dataStore->vpn_implementation]) .replace("%PORT%", Int2String(NekoRay::dataStore->inbound_socks_port)); @@ -1441,7 +1441,7 @@ bool MainWindow::StartVPNProcess() { runOnNewThread([=] { vpn_pid = 1; //TODO get pid? WinCommander::runProcessElevated(QApplication::applicationDirPath() + "/sing-box.exe", - {"run", "-c", configPath}); // blocking + {"--disable-color", "run", "-c", configPath}); // blocking vpn_pid = 0; runOnUiThread([=] { neko_set_spmode(NekoRay::SystemProxyMode::DISABLE);