mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 12:34:37 +03:00
fix
This commit is contained in:
@@ -873,7 +873,7 @@ namespace NekoRay {
|
||||
// built-in rules
|
||||
status->routingRules += QJsonObject{
|
||||
{"network", "udp"},
|
||||
{"port", QJsonArray{135, 137, 138, 5353}},
|
||||
{"port", QJsonArray{135, 137, 138, 139, 5353}},
|
||||
{"outbound", "block"},
|
||||
};
|
||||
status->routingRules += QJsonObject{
|
||||
|
||||
@@ -21,6 +21,15 @@ namespace NekoRay::fmt {
|
||||
if (!path.isEmpty()) transport["service_name"] = path;
|
||||
}
|
||||
outbound->insert("transport", transport);
|
||||
} else if (header_type == "http") {
|
||||
// TCP + headerType
|
||||
QJsonObject transport{
|
||||
{"type", "http"},
|
||||
{"method", "GET"},
|
||||
{"path", path},
|
||||
{"headers", QJsonObject{{"Host", QList2QJsonArray(host.split(","))}}},
|
||||
};
|
||||
outbound->insert("transport", transport);
|
||||
}
|
||||
|
||||
// 对应字段 tls
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace NekoRay::sys {
|
||||
|
||||
QProcess::setEnvironment(env);
|
||||
|
||||
if (NekoRay::dataStore->flag_linux_run_core_as_admin && dynamic_cast<CoreProcess *>(this)) {
|
||||
if (NekoRay::dataStore->flag_linux_run_core_as_admin && dynamic_cast<CoreProcess *>(this) && program != "pkexec") {
|
||||
arguments.prepend(program);
|
||||
arguments.prepend("--keep-cwd");
|
||||
program = "pkexec";
|
||||
|
||||
@@ -79,6 +79,8 @@ DialogManageRoutes::DialogManageRoutes(QWidget *parent) : QDialog(parent), ui(ne
|
||||
ui->blockIPLayout->addWidget(blockIPTxt, 0, 0);
|
||||
//
|
||||
REFRESH_ACTIVE_ROUTING(NekoRay::dataStore->active_routing, NekoRay::dataStore->routing)
|
||||
|
||||
ADD_ASTERISK(this)
|
||||
}
|
||||
|
||||
DialogManageRoutes::~DialogManageRoutes() {
|
||||
|
||||
@@ -75,8 +75,6 @@ DialogEditProfile::DialogEditProfile(const QString &_type, int profileOrGroupId,
|
||||
}
|
||||
// 传输设置 for NekoBox
|
||||
if (IS_NEKO_BOX) {
|
||||
ui->header_type->setVisible(false);
|
||||
ui->header_type_l->setVisible(false);
|
||||
if (!ui->utlsFingerprint->count()) ui->utlsFingerprint->addItems(Preset::SingBox::UtlsFingerPrint);
|
||||
} else {
|
||||
if (!ui->utlsFingerprint->count()) ui->utlsFingerprint->addItems(Preset::V2Ray::UtlsFingerPrint);
|
||||
|
||||
@@ -691,7 +691,7 @@ void MainWindow::neko_set_spmode_system_proxy(bool enable, bool save) {
|
||||
|
||||
if (save) {
|
||||
NekoRay::dataStore->remember_spmode.removeAll("system_proxy");
|
||||
if (enable) {
|
||||
if (enable && NekoRay::dataStore->remember_enable) {
|
||||
NekoRay::dataStore->remember_spmode.append("system_proxy");
|
||||
}
|
||||
NekoRay::dataStore->Save();
|
||||
@@ -743,7 +743,7 @@ void MainWindow::neko_set_spmode_vpn(bool enable, bool save) {
|
||||
|
||||
if (save) {
|
||||
NekoRay::dataStore->remember_spmode.removeAll("vpn");
|
||||
if (enable) {
|
||||
if (enable && NekoRay::dataStore->remember_enable) {
|
||||
NekoRay::dataStore->remember_spmode.append("vpn");
|
||||
}
|
||||
NekoRay::dataStore->Save();
|
||||
|
||||
Reference in New Issue
Block a user