mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-18 21:14:37 +03:00
update
This commit is contained in:
@@ -36,7 +36,7 @@ namespace NekoRay::fmt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString AbstractBean::DisplayTypeAndName() {
|
QString AbstractBean::DisplayTypeAndName() {
|
||||||
return QString(" [%1] %2").arg(DisplayType(), DisplayName());
|
return QString("[%1] %2").arg(DisplayType(), DisplayName());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractBean::ResolveDomainToIP(const std::function<void()> &onFinished) {
|
void AbstractBean::ResolveDomainToIP(const std::function<void()> &onFinished) {
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
updateRoutes()
|
||||||
iphlpapi.RegisterNotifyRouteChange2(func(callerContext uintptr, row uintptr, notificationType uint32) uintptr {
|
iphlpapi.RegisterNotifyRouteChange2(func(callerContext uintptr, row uintptr, notificationType uint32) uintptr {
|
||||||
updateRoutes()
|
updateRoutes()
|
||||||
return 0
|
return 0
|
||||||
@@ -77,10 +78,6 @@ func getBindInterfaceIndex(address string) uint32 {
|
|||||||
lock.Lock()
|
lock.Lock()
|
||||||
defer lock.Unlock()
|
defer lock.Unlock()
|
||||||
|
|
||||||
if routes == nil {
|
|
||||||
log.Println("warning: no routes info")
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
if interfaces == nil {
|
if interfaces == nil {
|
||||||
log.Println("warning: no interfaces info")
|
log.Println("warning: no interfaces info")
|
||||||
return 0
|
return 0
|
||||||
@@ -101,6 +98,11 @@ func getBindInterfaceIndex(address string) uint32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if routes == nil {
|
||||||
|
log.Println("warning: no routes info")
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
for _, route := range routes {
|
for _, route := range routes {
|
||||||
// MIB_IPROUTE_TYPE_INDIRECT
|
// MIB_IPROUTE_TYPE_INDIRECT
|
||||||
if route.ForwardType == 4 {
|
if route.ForwardType == 4 {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ if [ "$GOOS" != "windows" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#### Go ext: sing-box ####
|
#### Go ext: sing-box ####
|
||||||
curl -Lso sing-box.zip https://github.com/SagerNet/sing-box/releases/download/v1.1-beta2/sing-box-1.1-beta2-windows-amd64.zip
|
curl -Lso sing-box.zip https://github.com/SagerNet/sing-box/releases/download/v1.1-beta7/sing-box-1.1-beta7-windows-amd64.zip
|
||||||
unzip sing-box.zip
|
unzip sing-box.zip
|
||||||
mv sing-box-*/sing-box.exe $DEST
|
mv sing-box-*/sing-box.exe $DEST
|
||||||
rm -rf sing-box.zip sing-box-*
|
rm -rf sing-box.zip sing-box-*
|
||||||
|
|||||||
@@ -459,7 +459,7 @@ void MainWindow::dialog_message_impl(const QString &sender, const QString &info)
|
|||||||
// 订阅完毕
|
// 订阅完毕
|
||||||
refresh_proxy_list();
|
refresh_proxy_list();
|
||||||
if (!info.contains("dingyue")) {
|
if (!info.contains("dingyue")) {
|
||||||
MessageBoxInfo("NekoRay", tr("Imported %1 profile(s)").arg(NekoRay::dataStore->imported_count));
|
showLog(tr("Imported %1 profile(s)").arg(NekoRay::dataStore->imported_count));
|
||||||
}
|
}
|
||||||
} else if (sender == "ExternalProcess") {
|
} else if (sender == "ExternalProcess") {
|
||||||
if (info == "Crashed") {
|
if (info == "Crashed") {
|
||||||
@@ -956,7 +956,7 @@ void MainWindow::on_menu_copy_links_triggered() {
|
|||||||
}
|
}
|
||||||
if (links.length() == 0) return;
|
if (links.length() == 0) return;
|
||||||
QApplication::clipboard()->setText(links.join("\n"));
|
QApplication::clipboard()->setText(links.join("\n"));
|
||||||
MessageBoxInfo("NekoRay", tr("Copied %1 item(s)").arg(links.length()));
|
showLog(tr("Copied %1 item(s)").arg(links.length()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_menu_copy_links_nkr_triggered() {
|
void MainWindow::on_menu_copy_links_nkr_triggered() {
|
||||||
@@ -967,7 +967,7 @@ void MainWindow::on_menu_copy_links_nkr_triggered() {
|
|||||||
}
|
}
|
||||||
if (links.length() == 0) return;
|
if (links.length() == 0) return;
|
||||||
QApplication::clipboard()->setText(links.join("\n"));
|
QApplication::clipboard()->setText(links.join("\n"));
|
||||||
MessageBoxInfo("NekoRay", tr("Copied %1 item(s)").arg(links.length()));
|
showLog(tr("Copied %1 item(s)").arg(links.length()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_menu_export_config_triggered() {
|
void MainWindow::on_menu_export_config_triggered() {
|
||||||
|
|||||||
Reference in New Issue
Block a user