diff --git a/db/ConfigBuilder.cpp b/db/ConfigBuilder.cpp index 3e25f04..ad37b82 100644 --- a/db/ConfigBuilder.cpp +++ b/db/ConfigBuilder.cpp @@ -1056,9 +1056,9 @@ namespace NekoGui { auto source = qjs::ReadHookJS(); if (!source.isEmpty()) { qjs::QJS js(source); - auto js_result = js.EvalFunction("hook.hook_vpn_config", config); + auto js_result = js.EvalFunction("hook.hook_tun_config", config); if (config != js_result) { - MW_show_log("hook.js modified your VPN config."); + MW_show_log("hook.js modified your Tun config."); config = js_result; } } @@ -1087,9 +1087,9 @@ namespace NekoGui { auto source = qjs::ReadHookJS(); if (!source.isEmpty()) { qjs::QJS js(source); - auto js_result = js.EvalFunction("hook.hook_vpn_script", script); + auto js_result = js.EvalFunction("hook.hook_tun_script", script); if (script != js_result) { - MW_show_log("hook.js modified your VPN script."); + MW_show_log("hook.js modified your Tun script."); script = js_result; } } diff --git a/docs/HookJS.md b/docs/HookJS.md index 7d0c9e5..dbc2301 100644 --- a/docs/HookJS.md +++ b/docs/HookJS.md @@ -22,8 +22,8 @@ interface nekoray_in { // 目前提供的 hook 点 interface nekoray_hook { hook_core_config(config: string): string - hook_vpn_config(config: string): string - hook_vpn_script(script: string): string + hook_tun_config(config: string): string + hook_tun_script(script: string): string hook_import(content: string): string } @@ -41,11 +41,11 @@ class my_hook implements nekoray_hook { return JSON.stringify(json) } - hook_vpn_config(config: string): string { + hook_tun_config(config: string): string { return config // 返回输入,表示不修改 } - hook_vpn_script(script: string): string { + hook_tun_script(script: string): string { console.log("Script") // 输出到 stdout this.nekoray.log("Script:", script) // 输出到日志 return script @@ -83,10 +83,10 @@ var my_hook = /** @class */ (function () { json["dns"]["rules"].push(my_rule); return JSON.stringify(json); }; - my_hook.prototype.hook_vpn_config = function (config) { + my_hook.prototype.hook_tun_config = function (config) { return config; // 返回输入,表示不修改 }; - my_hook.prototype.hook_vpn_script = function (script) { + my_hook.prototype.hook_tun_script = function (script) { console.log("Script"); // 输出到 stdout this.nekoray.log("Script:", script); // 输出到日志 return script; diff --git a/go/cmd/nekoray_core/core_ray.go b/go/cmd/nekoray_core/core_ray.go index 6e56c3e..7956ecb 100644 --- a/go/cmd/nekoray_core/core_ray.go +++ b/go/cmd/nekoray_core/core_ray.go @@ -64,7 +64,7 @@ func setupCore() { if getNekorayTunIndex() == 0 { return resolver_def.LookupIP(context.Background(), "ip", host) } - // Windows VPN mode use Go resolver + // Windows Tun Mode use Go resolver return resolver_go.LookupIP(context.Background(), "ip", host) } neko_common.GetCurrentInstance = func() interface{} { diff --git a/go/cmd/nekoray_core/protect_bindinterface_windows.go b/go/cmd/nekoray_core/protect_bindinterface_windows.go index da463fa..05a35ec 100644 --- a/go/cmd/nekoray_core/protect_bindinterface_windows.go +++ b/go/cmd/nekoray_core/protect_bindinterface_windows.go @@ -141,7 +141,7 @@ func getBindInterfaceIndex(address string) uint32 { } } - // Not in VPN mode + // Not in Tun Mode if nextInterface == 0 { return 0 } diff --git a/go/cmd/nekoray_core/protect_fwmark_linux.go b/go/cmd/nekoray_core/protect_fwmark_linux.go index 671275d..0da36bb 100644 --- a/go/cmd/nekoray_core/protect_fwmark_linux.go +++ b/go/cmd/nekoray_core/protect_fwmark_linux.go @@ -25,7 +25,7 @@ func nekorayLinuxProtect(fd int) bool { } } - // check is in VPN mode + // check is in Tun Mode if is_fwmark_exist(514) { if cap_net_admin == 1 { // have permission diff --git a/libs/download_qtsdk_win.sh b/libs/download_qtsdk_win.sh index 7f5ab9a..989579b 100644 --- a/libs/download_qtsdk_win.sh +++ b/libs/download_qtsdk_win.sh @@ -3,7 +3,7 @@ cd qtsdk if [ "$DL_QT_VER" == "5.15" ]; then curl -LSO https://github.com/MatsuriDayo/nekoray_qt_runtime/releases/download/20220503/Qt5.15.7-Windows-x86_64-VS2019-16.11.20-20221103.7z else - curl -LSO https://github.com/MatsuriDayo/nekoray_qt_runtime/releases/download/20220503/Qt6.5.0-Windows-x86_64-VS2022-17.5.5-20230507.7z + curl -LSO https://github.com/MatsuriDayo/nekoray_qt_runtime/releases/download/20220503/Qt6.5.1-Windows-x86_64-VS2022-17.6.2-20230601.7z fi 7z x *.7z rm *.7z diff --git a/libs/package_debian.sh b/libs/package_debian.sh index 84bb7ef..7728913 100644 --- a/libs/package_debian.sh +++ b/libs/package_debian.sh @@ -19,7 +19,7 @@ Depends: libxcb-xinerama0, libqt5core5a, libqt5gui5, libqt5network5, libqt5widge Description: Qt based cross-platform GUI proxy configuration manager (backend: v2ray / sing-box) EOF -# Start VPN mode without password +# Start Tun Mode without password cat >nekoray/opt/nekoray/pkexec <<-EOF #!/bin/sh diff --git a/res/vpn/vpn-run-root.sh b/res/vpn/vpn-run-root.sh index 9564611..7608f6f 100755 --- a/res/vpn/vpn-run-root.sh +++ b/res/vpn/vpn-run-root.sh @@ -3,7 +3,7 @@ set -e set -x if [ "$EUID" -ne 0 ]; then - echo "[Warning] vpn script not running as root" + echo "[Warning] Tun script not running as root" fi if [ "$(uname)" == "Darwin" ]; then diff --git a/translations/fa_IR.ts b/translations/fa_IR.ts index 4c304c1..05e3217 100644 --- a/translations/fa_IR.ts +++ b/translations/fa_IR.ts @@ -219,12 +219,12 @@ It is recommended to leave it blank, but it sometimes does not work, at this time you can set this option. -For NekoRay, this rewrites the underlying(localhost) DNS in VPN mode. -For NekoBox, this rewrites the underlying(localhost) DNS in VPN mode, normal mode, and also URL Test. +For NekoRay, this rewrites the underlying(localhost) DNS in Tun Mode. +For NekoBox, this rewrites the underlying(localhost) DNS in Tun Mode, normal mode, and also URL Test. - If you VPN mode is not working, try to change this option. + If you Tun Mode is not working, try to change this option. @@ -695,7 +695,7 @@ These settings can be changed later. DialogVPNSettings - VPN Settings + Tun Settings تنظیمات vpn @@ -703,7 +703,7 @@ These settings can be changed later. مخفی کردن کنسول - VPN Enable IPv6 + Tun Enable IPv6 @@ -1084,7 +1084,7 @@ This needs to be run NekoBox with administrator privileges. بروزرسانی - VPN Mode + Tun Mode حالتvpn @@ -1284,7 +1284,7 @@ This needs to be run NekoBox with administrator privileges. دامنه را حل کنید - VPN Settings + Tun Settings تنظیمات vpn @@ -1308,12 +1308,12 @@ This needs to be run NekoBox with administrator privileges. خطا - VPN settings changed - تنظیمات VPN تغییر کرد + Tun Settings changed + تنظیمات Tun تغییر کرد - Restart VPN to take effect. - VPN را مجدداً راه اندازی کنید تا اعمال شود. + Restart Tun to take effect. + Tun را مجدداً راه اندازی کنید تا اعمال شود. Confirmation @@ -1336,7 +1336,7 @@ This needs to be run NekoBox with administrator privileges. تنظیمات - Current server is incompatible with VPN. Please stop the server first, enable VPN mode, and then restart. + Current server is incompatible with Tun. Please stop the server first, enable Tun Mode, and then restart. @@ -1415,8 +1415,8 @@ End: %2 - Failed to stop VPN process - فرآیند VPN متوقف نشد + Failed to stop Tun process + فرآیند Tun متوقف نشد Input diff --git a/translations/zh_CN.ts b/translations/zh_CN.ts index bf7a0a2..b118a2c 100644 --- a/translations/zh_CN.ts +++ b/translations/zh_CN.ts @@ -213,15 +213,15 @@ It is recommended to leave it blank, but it sometimes does not work, at this time you can set this option. -For NekoRay, this rewrites the underlying(localhost) DNS in VPN mode. -For NekoBox, this rewrites the underlying(localhost) DNS in VPN mode, normal mode, and also URL Test. +For NekoRay, this rewrites the underlying(localhost) DNS in Tun Mode. +For NekoBox, this rewrites the underlying(localhost) DNS in Tun Mode, normal mode, and also URL Test. 建议留空,但有时会出现问题,这时可以设置这个选项。 -对于 NekoRay 来说,在 VPN 模式下会重写 underlying(localhost) DNS。 -对于 NekoBox 来说,在 VPN 模式、正常模式和 URL 测试中会重写 underlying(localhost) DNS。 +对于 NekoRay 来说,在 Tun 模式下会重写 underlying(localhost) DNS。 +对于 NekoBox 来说,在 Tun 模式、正常模式和 URL 测试中会重写 underlying(localhost) DNS。 - If you VPN mode is not working, try to change this option. - 如果您的VPN模式有问题,请尝试更改此选项。 + If you Tun Mode is not working, try to change this option. + 如果您的 Tun 模式有问题,请尝试更改此选项。 Default On @@ -689,16 +689,16 @@ These settings can be changed later. DialogVPNSettings - VPN Settings - VPN 设置 + Tun Settings + Tun 设置 Hide Console 隐藏控制台 - VPN Enable IPv6 - 启用 VPN IPv6 + Tun Enable IPv6 + 启用 Tun IPv6 Bypass CIDR @@ -733,7 +733,7 @@ These settings can be changed later. If still not working, see documentation for more information. https://matsuridayo.github.io/n-configuration/#vpn-tun - 如果您在启动 VPN 时遇到问题,您可以在此处强制重置 nekobox_core 进程。 + 如果您在启动 Tun 时遇到问题,您可以在此处强制重置 nekobox_core 进程。 如果仍然无法正常工作,请参阅文档以获取更多信息。 https://matsuridayo.github.io/n-configuration/#vpn-tun @@ -1324,12 +1324,12 @@ End: %2 全选 - VPN Mode - VPN 模式 + Tun Mode + Tun 模式 - Failed to stop VPN process - 停止 VPN 失败 + Failed to stop Tun process + 停止 Tun 失败 Enable System Proxy @@ -1340,12 +1340,12 @@ End: %2 启用 VPN - VPN settings changed - VPN 设置改变 + Tun Settings changed + Tun 设置改变 - Restart VPN to take effect. - 重启 VPN 生效。 + Restart Tun to take effect. + 重启 Tun 生效。 Start @@ -1396,8 +1396,8 @@ End: %2 路由设置 - VPN Settings - VPN 设置 + Tun Settings + Tun 设置 Restart Program @@ -1408,8 +1408,8 @@ End: %2 未启动 - Current server is incompatible with VPN. Please stop the server first, enable VPN mode, and then restart. - 当前服务器与 VPN 不兼容。请先停止服务器,打开 VPN 模式后再启动。 + Current server is incompatible with Tun. Please stop the server first, enable Tun Mode, and then restart. + 当前服务器与 Tun 不兼容。请先停止服务器,打开 Tun 模式后再启动。 Open Config Folder diff --git a/ui/dialog_basic_settings.cpp b/ui/dialog_basic_settings.cpp index a23c152..fe70417 100644 --- a/ui/dialog_basic_settings.cpp +++ b/ui/dialog_basic_settings.cpp @@ -411,8 +411,8 @@ void DialogBasicSettings::on_core_settings_clicked() { auto core_box_underlying_dns_l = new QLabel(tr("Override underlying DNS")); core_box_underlying_dns_l->setToolTip(tr( "It is recommended to leave it blank, but it sometimes does not work, at this time you can set this option.\n" - "For NekoRay, this rewrites the underlying(localhost) DNS in VPN mode.\n" - "For NekoBox, this rewrites the underlying(localhost) DNS in VPN mode, normal mode, and also URL Test.")); + "For NekoRay, this rewrites the underlying(localhost) DNS in Tun Mode.\n" + "For NekoBox, this rewrites the underlying(localhost) DNS in Tun Mode, normal mode, and also URL Test.")); core_box_underlying_dns = new MyLineEdit; core_box_underlying_dns->setText(NekoGui::dataStore->core_box_underlying_dns); core_box_underlying_dns->setMinimumWidth(300); @@ -439,7 +439,7 @@ void DialogBasicSettings::on_core_settings_clicked() { layout->addWidget(core_box_clash_api_secret, line, 1); } else { auto core_ray_direct_dns_l = new QLabel("NKR_CORE_RAY_DIRECT_DNS"); - core_ray_direct_dns_l->setToolTip(tr("If you VPN mode is not working, try to change this option.")); + core_ray_direct_dns_l->setToolTip(tr("If you Tun Mode is not working, try to change this option.")); core_ray_direct_dns = new QCheckBox; core_ray_direct_dns->setChecked(NekoGui::dataStore->core_ray_direct_dns); connect(core_ray_direct_dns, &QCheckBox::clicked, this, [&] { CACHE.needRestart = true; }); @@ -454,7 +454,7 @@ void DialogBasicSettings::on_core_settings_clicked() { layout->addWidget(core_ray_freedom_domainStrategy, line, 1); #ifdef Q_OS_WIN auto core_ray_windows_disable_auto_interface_l = new QLabel("NKR_CORE_RAY_WINDOWS_DISABLE_AUTO_INTERFACE"); - core_ray_windows_disable_auto_interface_l->setToolTip(tr("If you VPN mode is not working, try to change this option.")); + core_ray_windows_disable_auto_interface_l->setToolTip(tr("If you Tun Mode is not working, try to change this option.")); core_ray_windows_disable_auto_interface = new QCheckBox; core_ray_windows_disable_auto_interface->setChecked(NekoGui::dataStore->core_ray_windows_disable_auto_interface); connect(core_ray_windows_disable_auto_interface, &QCheckBox::clicked, this, [&] { CACHE.needRestart = true; }); diff --git a/ui/dialog_vpn_settings.ui b/ui/dialog_vpn_settings.ui index 33a2e87..b214f49 100644 --- a/ui/dialog_vpn_settings.ui +++ b/ui/dialog_vpn_settings.ui @@ -11,7 +11,7 @@ - VPN Settings + Tun Settings @@ -89,7 +89,7 @@ - VPN Enable IPv6 + Tun Enable IPv6 diff --git a/ui/mainwindow.cpp b/ui/mainwindow.cpp index 02d2e29..c0e81e1 100644 --- a/ui/mainwindow.cpp +++ b/ui/mainwindow.cpp @@ -534,7 +534,7 @@ void MainWindow::dialog_message_impl(const QString &sender, const QString &info) } refresh_proxy_list(); if (info.contains("VPNChanged") && NekoGui::dataStore->spmode_vpn) { - MessageBoxWarning(tr("VPN settings changed"), tr("Restart VPN to take effect.")); + MessageBoxWarning(tr("Tun Settings changed"), tr("Restart Tun to take effect.")); } if (suggestRestartProxy && NekoGui::dataStore->started_id >= 0 && QMessageBox::question(GetMessageBoxParent(), tr("Confirmation"), tr("Settings changed, restart proxy?")) == QMessageBox::StandardButton::Yes) { @@ -768,7 +768,7 @@ void MainWindow::neko_set_spmode_vpn(bool enable, bool save) { } } else { if (NekoGui::dataStore->need_keep_vpn_off) { - MessageBoxWarning(software_name, tr("Current server is incompatible with VPN. Please stop the server first, enable VPN mode, and then restart.")); + MessageBoxWarning(software_name, tr("Current server is incompatible with Tun. Please stop the server first, enable Tun Mode, and then restart.")); neko_set_spmode_FAILED } if (!StartVPNProcess()) { @@ -1850,7 +1850,7 @@ bool MainWindow::StopVPNProcess(bool unconditional) { ok = p.exitCode() == 0; #endif if (!unconditional) { - ok ? vpn_pid = 0 : MessageBoxWarning(tr("Error"), tr("Failed to stop VPN process")); + ok ? vpn_pid = 0 : MessageBoxWarning(tr("Error"), tr("Failed to stop Tun process")); } return ok; } diff --git a/ui/mainwindow.ui b/ui/mainwindow.ui index 43947a9..c3f59b2 100644 --- a/ui/mainwindow.ui +++ b/ui/mainwindow.ui @@ -172,7 +172,7 @@ - VPN Mode + Tun Mode @@ -860,7 +860,7 @@ - VPN Settings + Tun Settings