mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 12:34:37 +03:00
fix
This commit is contained in:
@@ -860,7 +860,7 @@ namespace NekoRay {
|
|||||||
// experimental
|
// experimental
|
||||||
QJsonObject experimentalObj;
|
QJsonObject experimentalObj;
|
||||||
|
|
||||||
if (NekoRay::dataStore->core_box_clash_api > 0) {
|
if (!status->forTest && NekoRay::dataStore->core_box_clash_api > 0) {
|
||||||
QJsonObject clash_api = {
|
QJsonObject clash_api = {
|
||||||
{"external_controller", "127.0.0.1:" + Int2String(NekoRay::dataStore->core_box_clash_api)},
|
{"external_controller", "127.0.0.1:" + Int2String(NekoRay::dataStore->core_box_clash_api)},
|
||||||
{"secret", NekoRay::dataStore->core_box_clash_api_secret},
|
{"secret", NekoRay::dataStore->core_box_clash_api_secret},
|
||||||
|
|||||||
@@ -147,18 +147,19 @@ int main(int argc, char* argv[]) {
|
|||||||
// Load coreType
|
// Load coreType
|
||||||
auto coreLoaded = ReadFileText("groups/coreType");
|
auto coreLoaded = ReadFileText("groups/coreType");
|
||||||
if (coreLoaded.isEmpty()) {
|
if (coreLoaded.isEmpty()) {
|
||||||
|
NekoRay::coreType = -1;
|
||||||
loadTranslate(QLocale().name());
|
loadTranslate(QLocale().name());
|
||||||
auto dialogFirstSetup = new DialogFirstSetup;
|
auto dialogFirstSetup = new DialogFirstSetup;
|
||||||
auto coreSelected = dialogFirstSetup->exec();
|
dialogFirstSetup->exec();
|
||||||
dialogFirstSetup->deleteLater();
|
dialogFirstSetup->deleteLater();
|
||||||
if (coreSelected < 0) {
|
if (NekoRay::coreType < 0) {
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
NekoRay::coreType = coreSelected;
|
QDir().mkdir("groups");
|
||||||
QFile file;
|
QFile file;
|
||||||
file.setFileName("groups/coreType");
|
file.setFileName("groups/coreType");
|
||||||
file.open(QIODevice::ReadWrite | QIODevice::Truncate);
|
file.open(QIODevice::ReadWrite | QIODevice::Truncate);
|
||||||
file.write(Int2String(coreSelected).toUtf8());
|
file.write(Int2String(NekoRay::coreType).toUtf8());
|
||||||
file.close();
|
file.close();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -14,10 +14,9 @@ DialogFirstSetup::~DialogFirstSetup() {
|
|||||||
void DialogFirstSetup::onButtonClicked() {
|
void DialogFirstSetup::onButtonClicked() {
|
||||||
auto s = sender();
|
auto s = sender();
|
||||||
if (s == ui->v2ray) {
|
if (s == ui->v2ray) {
|
||||||
done(NekoRay::CoreType::V2RAY);
|
NekoRay::coreType = NekoRay::CoreType::V2RAY;
|
||||||
} else if (s == ui->singbox) {
|
} else if (s == ui->singbox) {
|
||||||
done(NekoRay::CoreType::SING_BOX);
|
NekoRay::coreType = NekoRay::CoreType::SING_BOX;
|
||||||
} else {
|
|
||||||
done(-1);
|
|
||||||
}
|
}
|
||||||
|
done(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,16 @@ These settings can be changed later.</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true"><html><head/><body><p><a href="https://matsuridayo.github.io/n-configuration/#nekobox"><span style=" text-decoration: underline; color:#2980b9;">Help</span></a></p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="v2ray">
|
<widget class="QPushButton" name="v2ray">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|||||||
@@ -509,7 +509,7 @@ security (QUIC)</string>
|
|||||||
<string>Reality public key. If not empty, turn TLS into REALITY.</string>
|
<string>Reality public key. If not empty, turn TLS into REALITY.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">Realty Pbk</string>
|
<string notr="true">Reality Pbk</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user