Skip to content

Commit 1e9fa7e

Browse files
committed
fix
1 parent 1b63771 commit 1e9fa7e

File tree

9 files changed

+21
-26
lines changed

9 files changed

+21
-26
lines changed

go/cmd/nekoray_core/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ require (
6767
golang.org/x/sync v0.1.0 // indirect
6868
golang.org/x/sys v0.3.0 // indirect
6969
golang.org/x/text v0.5.0 // indirect
70-
golang.org/x/time v0.3.0 // indirect
7170
golang.org/x/tools v0.2.0 // indirect
7271
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
7372
google.golang.org/appengine v1.6.7 // indirect

go/cmd/nekoray_core/go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,6 @@ golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
572572
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
573573
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
574574
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
575-
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
576-
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
577575
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
578576
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
579577
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=

go/grpc_server/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ go 1.19
55
require (
66
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
77
github.com/matsuridayo/libneko v1.0.0 // replaced
8-
golang.org/x/time v0.3.0
98
google.golang.org/grpc v1.49.0
109
google.golang.org/protobuf v1.28.1
1110
)

go/grpc_server/go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
124124
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
125125
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
126126
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
127-
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
128-
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
129127
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
130128
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
131129
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=

translations/fa_IR.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,10 +1051,6 @@ This needs to be run NekoBox with administrator privileges.</source>
10511051
</context>
10521052
<context>
10531053
<name>MainWindow</name>
1054-
<message>
1055-
<source>NekoRay</source>
1056-
<translation type="unfinished"></translation>
1057-
</message>
10581054
<message>
10591055
<source>Program</source>
10601056
<translation>برنامه</translation>
@@ -1454,10 +1450,6 @@ End: %2</source>
14541450
<source>Settings changed</source>
14551451
<translation type="unfinished">تنظیمات تغییر کرد</translation>
14561452
</message>
1457-
<message>
1458-
<source>Restart nekoray to take effect.</source>
1459-
<translation type="unfinished">برای اعمال تغییرات nekoray را مجددا راه اندازی کنید.</translation>
1460-
</message>
14611453
<message>
14621454
<source>Please run NekoBox as admin</source>
14631455
<translation type="unfinished"></translation>
@@ -1502,6 +1494,10 @@ End: %2</source>
15021494
<source>Test Options</source>
15031495
<translation type="unfinished"></translation>
15041496
</message>
1497+
<message>
1498+
<source>Restart the program to take effect.</source>
1499+
<translation type="unfinished"></translation>
1500+
</message>
15051501
</context>
15061502
<context>
15071503
<name>ProxyItem</name>

translations/zh_CN.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,10 +1185,6 @@ This needs to be run NekoBox with administrator privileges.</source>
11851185
<source>Clear</source>
11861186
<translation>清除</translation>
11871187
</message>
1188-
<message>
1189-
<source>NekoRay</source>
1190-
<translation></translation>
1191-
</message>
11921188
<message>
11931189
<source>fake</source>
11941190
<translation></translation>
@@ -1450,8 +1446,8 @@ Split by line.</source>
14501446
<translation>设置改变</translation>
14511447
</message>
14521448
<message>
1453-
<source>Restart nekoray to take effect.</source>
1454-
<translation>重启 nekoray 生效。</translation>
1449+
<source>Restart the program to take effect.</source>
1450+
<translation>重启程序生效。</translation>
14551451
</message>
14561452
<message>
14571453
<source>Please run NekoBox as admin</source>

ui/dialog_vpn_settings.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,19 @@ void DialogVPNSettings::accept() {
5555
NekoGui::dataStore->vpn_hide_console = ui->hide_console->isChecked();
5656
NekoGui::dataStore->vpn_strict_route = ui->strict_route->isChecked();
5757
NekoGui::dataStore->vpn_rule_white = ui->whitelist_mode->isChecked();
58+
bool isInternalChanged = NekoGui::dataStore->vpn_internal_tun != ui->single_core->isChecked();
5859
NekoGui::dataStore->vpn_internal_tun = ui->single_core->isChecked();
5960
//
6061
D_SAVE_STRING_PLAIN(vpn_rule_cidr)
6162
D_SAVE_STRING_PLAIN(vpn_rule_process)
6263
//
63-
MW_dialog_message("", "UpdateDataStore,VPNChanged");
64+
QStringList msg{"UpdateDataStore"};
65+
if (isInternalChanged) {
66+
msg << "NeedRestart";
67+
} else {
68+
msg << "VPNChanged";
69+
}
70+
MW_dialog_message("", msg.join(","));
6471
QDialog::accept();
6572
}
6673

ui/mainwindow.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ void MainWindow::dialog_message_impl(const QString &sender, const QString &info)
541541
refresh_status();
542542
}
543543
if (info.contains("NeedRestart")) {
544-
auto n = QMessageBox::warning(GetMessageBoxParent(), tr("Settings changed"), tr("Restart nekoray to take effect."), QMessageBox::Yes | QMessageBox::No);
544+
auto n = QMessageBox::warning(GetMessageBoxParent(), tr("Settings changed"), tr("Restart the program to take effect."), QMessageBox::Yes | QMessageBox::No);
545545
if (n == QMessageBox::Yes) {
546546
this->exit_reason = 2;
547547
on_menu_exit_triggered();
@@ -795,7 +795,7 @@ void MainWindow::neko_set_spmode_vpn(bool enable, bool save) {
795795
NekoGui::dataStore->spmode_vpn = enable;
796796
refresh_status();
797797

798-
if (NekoGui::dataStore->started_id >= 0) neko_start(NekoGui::dataStore->started_id);
798+
if (IS_NEKO_BOX_INTERNAL_TUN && NekoGui::dataStore->started_id >= 0) neko_start(NekoGui::dataStore->started_id);
799799
}
800800

801801
void MainWindow::refresh_status(const QString &traffic_update) {
@@ -1107,8 +1107,10 @@ void MainWindow::on_menu_move_triggered() {
11071107
if (ents.isEmpty()) return;
11081108

11091109
auto items = QStringList{};
1110-
for (auto &&group: NekoGui::profileManager->groups) {
1111-
items += Int2String(group->id) + " " + group->name;
1110+
for (auto gid: NekoGui::profileManager->_groups) {
1111+
auto group = NekoGui::profileManager->GetGroup(gid);
1112+
if (group == nullptr) continue;
1113+
items += Int2String(gid) + " " + group->name;
11121114
}
11131115

11141116
bool ok;

ui/mainwindow.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</size>
1818
</property>
1919
<property name="windowTitle">
20-
<string>NekoRay</string>
20+
<string notr="true">nya</string>
2121
</property>
2222
<widget class="QWidget" name="centralwidget">
2323
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="0,0,0">

0 commit comments

Comments
 (0)