mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 20:44:38 +03:00
update
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
{
|
{
|
||||||
"type": "tun",
|
"type": "tun",
|
||||||
"interface_name": "nekoray-tun",
|
"interface_name": "nekoray-tun",
|
||||||
"inet4_address": "172.19.0.1/30",
|
"inet4_address": "172.19.0.1/28",
|
||||||
%IPV6_ADDRESS%
|
%IPV6_ADDRESS%
|
||||||
"mtu": %MTU%,
|
"mtu": %MTU%,
|
||||||
"auto_route": true,
|
"auto_route": true,
|
||||||
|
|||||||
@@ -1409,7 +1409,7 @@ bool MainWindow::StartVPNProcess() {
|
|||||||
auto configFn = ":/nekoray/vpn/sing-box-vpn.json";
|
auto configFn = ":/nekoray/vpn/sing-box-vpn.json";
|
||||||
if (QFile::exists("vpn/sing-box-vpn.json")) configFn = "vpn/sing-box-vpn.json";
|
if (QFile::exists("vpn/sing-box-vpn.json")) configFn = "vpn/sing-box-vpn.json";
|
||||||
auto config = ReadFileText(configFn)
|
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("%MTU%", Int2String(NekoRay::dataStore->vpn_mtu))
|
||||||
.replace("%STACK%", Preset::SingBox::VpnImplementation[NekoRay::dataStore->vpn_implementation])
|
.replace("%STACK%", Preset::SingBox::VpnImplementation[NekoRay::dataStore->vpn_implementation])
|
||||||
.replace("%PORT%", Int2String(NekoRay::dataStore->inbound_socks_port));
|
.replace("%PORT%", Int2String(NekoRay::dataStore->inbound_socks_port));
|
||||||
@@ -1441,7 +1441,7 @@ bool MainWindow::StartVPNProcess() {
|
|||||||
runOnNewThread([=] {
|
runOnNewThread([=] {
|
||||||
vpn_pid = 1; //TODO get pid?
|
vpn_pid = 1; //TODO get pid?
|
||||||
WinCommander::runProcessElevated(QApplication::applicationDirPath() + "/sing-box.exe",
|
WinCommander::runProcessElevated(QApplication::applicationDirPath() + "/sing-box.exe",
|
||||||
{"run", "-c", configPath}); // blocking
|
{"--disable-color", "run", "-c", configPath}); // blocking
|
||||||
vpn_pid = 0;
|
vpn_pid = 0;
|
||||||
runOnUiThread([=] {
|
runOnUiThread([=] {
|
||||||
neko_set_spmode(NekoRay::SystemProxyMode::DISABLE);
|
neko_set_spmode(NekoRay::SystemProxyMode::DISABLE);
|
||||||
|
|||||||
Reference in New Issue
Block a user