mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 12:34:37 +03:00
update
This commit is contained in:
14
README.md
14
README.md
@@ -1,17 +1,13 @@
|
|||||||
# NekoRay
|
# NekoRay
|
||||||
|
|
||||||
基于 Qt/C++ 的跨平台 GUI 代理配置管理器
|
Qt based cross-platform GUI proxy configuration manager (backend: v2ray / sing-box)
|
||||||
|
|
||||||
后端 1. v2ray 2. sing-box
|
|
||||||
|
|
||||||
目前支持 Windows / Linux amd64 开箱即用
|
|
||||||
|
|
||||||
Qt/C++ based cross-platform GUI proxy configuration manager
|
|
||||||
|
|
||||||
backend: 1. v2ray 2.sing-box
|
|
||||||
|
|
||||||
Support Windows / Linux amd64 out of the box now.
|
Support Windows / Linux amd64 out of the box now.
|
||||||
|
|
||||||
|
基于 Qt 的跨平台代理配置管理器 (后端 v2ray / sing-box)
|
||||||
|
|
||||||
|
目前支持 Windows / Linux / macOS amd64 开箱即用
|
||||||
|
|
||||||
## 下载 Download
|
## 下载 Download
|
||||||
|
|
||||||
便携格式,无安装器。转到 Releases 下载预编译的二进制文件,解压后即可使用。
|
便携格式,无安装器。转到 Releases 下载预编译的二进制文件,解压后即可使用。
|
||||||
|
|||||||
@@ -532,9 +532,7 @@ namespace NekoRay {
|
|||||||
status->result = result;
|
status->result = result;
|
||||||
|
|
||||||
// Log
|
// Log
|
||||||
auto level = dataStore->log_level;
|
result->coreConfig["log"] = QJsonObject{{"level", dataStore->log_level}};
|
||||||
level = level.replace("warning", "warn");
|
|
||||||
result->coreConfig["log"] = QJsonObject{{"level", level}};
|
|
||||||
|
|
||||||
// Inbounds
|
// Inbounds
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ namespace NekoRay {
|
|||||||
|
|
||||||
// DNS
|
// DNS
|
||||||
QString remote_dns = "https://8.8.8.8/dns-query";
|
QString remote_dns = "https://8.8.8.8/dns-query";
|
||||||
QString direct_dns = "https+local://223.5.5.5/dns-query";
|
QString direct_dns = "localhost";
|
||||||
bool dns_routing = true;
|
bool dns_routing = true;
|
||||||
bool enhance_resolve_server_domain = false;
|
bool enhance_resolve_server_domain = false;
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ int main(int argc, char *argv[]) {
|
|||||||
QApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton);
|
QApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton);
|
||||||
#endif
|
#endif
|
||||||
QApplication::setAttribute(Qt::AA_DontUseNativeDialogs);
|
QApplication::setAttribute(Qt::AA_DontUseNativeDialogs);
|
||||||
|
QApplication::setQuitOnLastWindowClosed(false);
|
||||||
|
|
||||||
// Clean
|
// Clean
|
||||||
QDir::setCurrent(QApplication::applicationDirPath());
|
QDir::setCurrent(QApplication::applicationDirPath());
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
46ba6137206cb0e0fc3433b3459237c55132aabe
|
cec14872528e7a6a0e7a902069c1b62a324911f9
|
||||||
|
|||||||
@@ -112,11 +112,13 @@ namespace NekoRay::sys {
|
|||||||
|
|
||||||
void CoreProcess::Start() {
|
void CoreProcess::Start() {
|
||||||
show_stderr = false;
|
show_stderr = false;
|
||||||
|
env = QStringList();
|
||||||
auto v2ray_asset_dir = FindCoreAsset("geoip.dat");
|
auto v2ray_asset_dir = FindCoreAsset("geoip.dat");
|
||||||
if (!v2ray_asset_dir.isEmpty()) {
|
if (!v2ray_asset_dir.isEmpty()) {
|
||||||
v2ray_asset_dir = QFileInfo(v2ray_asset_dir).absolutePath();
|
v2ray_asset_dir = QFileInfo(v2ray_asset_dir).absolutePath();
|
||||||
env = QStringList{"V2RAY_LOCATION_ASSET=" + v2ray_asset_dir};
|
env << "V2RAY_LOCATION_ASSET=" + v2ray_asset_dir;
|
||||||
}
|
}
|
||||||
|
env << "GODEBUG=netdns=go";
|
||||||
ExternalProcess::Start();
|
ExternalProcess::Start();
|
||||||
write((dataStore->core_token + "\n").toUtf8());
|
write((dataStore->core_token + "\n").toUtf8());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,6 +97,9 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
if (IS_NEKO_BOX) {
|
if (IS_NEKO_BOX) {
|
||||||
software_name = "NekoBox";
|
software_name = "NekoBox";
|
||||||
software_core_name = "sing-box";
|
software_core_name = "sing-box";
|
||||||
|
if (NekoRay::dataStore->log_level == "warning") {
|
||||||
|
NekoRay::dataStore->log_level = "info";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// top bar
|
// top bar
|
||||||
@@ -329,6 +332,9 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
connect(ui->checkBox_VPN, &QCheckBox::clicked, this, [=](bool checked) {
|
connect(ui->checkBox_VPN, &QCheckBox::clicked, this, [=](bool checked) {
|
||||||
neko_set_spmode(checked ? NekoRay::SystemProxyMode::VPN : NekoRay::SystemProxyMode::DISABLE);
|
neko_set_spmode(checked ? NekoRay::SystemProxyMode::VPN : NekoRay::SystemProxyMode::DISABLE);
|
||||||
});
|
});
|
||||||
|
connect(ui->checkBox_SystemProxy, &QCheckBox::clicked, this, [=](bool checked) {
|
||||||
|
neko_set_spmode(checked ? NekoRay::SystemProxyMode::SYSTEM_PROXY : NekoRay::SystemProxyMode::DISABLE);
|
||||||
|
});
|
||||||
connect(ui->menu_spmode, &QMenu::aboutToShow, this, [=]() {
|
connect(ui->menu_spmode, &QMenu::aboutToShow, this, [=]() {
|
||||||
ui->menu_spmode_disabled->setChecked(title_spmode == NekoRay::SystemProxyMode::DISABLE);
|
ui->menu_spmode_disabled->setChecked(title_spmode == NekoRay::SystemProxyMode::DISABLE);
|
||||||
ui->menu_spmode_system_proxy->setChecked(title_spmode == NekoRay::SystemProxyMode::SYSTEM_PROXY);
|
ui->menu_spmode_system_proxy->setChecked(title_spmode == NekoRay::SystemProxyMode::SYSTEM_PROXY);
|
||||||
@@ -648,6 +654,7 @@ void MainWindow::refresh_status(const QString &traffic_update) {
|
|||||||
ui->label_inbound->setText(inbound_txt);
|
ui->label_inbound->setText(inbound_txt);
|
||||||
//
|
//
|
||||||
ui->checkBox_VPN->setChecked(title_spmode == NekoRay::SystemProxyMode::VPN);
|
ui->checkBox_VPN->setChecked(title_spmode == NekoRay::SystemProxyMode::VPN);
|
||||||
|
ui->checkBox_SystemProxy->setChecked(title_spmode == NekoRay::SystemProxyMode::SYSTEM_PROXY);
|
||||||
if (select_mode) ui->label_running->setText("[" + tr("Select") + "]");
|
if (select_mode) ui->label_running->setText("[" + tr("Select") + "]");
|
||||||
|
|
||||||
auto make_title = [=](bool isTray) {
|
auto make_title = [=](bool isTray) {
|
||||||
|
|||||||
@@ -162,17 +162,28 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBox_VPN">
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
<property name="sizePolicy">
|
<item>
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
<widget class="QCheckBox" name="checkBox_VPN">
|
||||||
<horstretch>0</horstretch>
|
<property name="sizePolicy">
|
||||||
<verstretch>0</verstretch>
|
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||||
</sizepolicy>
|
<horstretch>0</horstretch>
|
||||||
</property>
|
<verstretch>0</verstretch>
|
||||||
<property name="text">
|
</sizepolicy>
|
||||||
<string>VPN Mode</string>
|
</property>
|
||||||
</property>
|
<property name="text">
|
||||||
</widget>
|
<string>VPN Mode</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_SystemProxy">
|
||||||
|
<property name="text">
|
||||||
|
<string>System Proxy</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
|
|||||||
Reference in New Issue
Block a user