This commit is contained in:
arm64v8a
2023-04-10 21:47:27 +09:00
parent 1f25b07162
commit 77b9815ef8
5 changed files with 20 additions and 10 deletions

View File

@@ -860,7 +860,7 @@ namespace NekoRay {
// experimental
QJsonObject experimentalObj;
if (NekoRay::dataStore->core_box_clash_api > 0) {
if (!status->forTest && NekoRay::dataStore->core_box_clash_api > 0) {
QJsonObject clash_api = {
{"external_controller", "127.0.0.1:" + Int2String(NekoRay::dataStore->core_box_clash_api)},
{"secret", NekoRay::dataStore->core_box_clash_api_secret},

View File

@@ -147,18 +147,19 @@ int main(int argc, char* argv[]) {
// Load coreType
auto coreLoaded = ReadFileText("groups/coreType");
if (coreLoaded.isEmpty()) {
NekoRay::coreType = -1;
loadTranslate(QLocale().name());
auto dialogFirstSetup = new DialogFirstSetup;
auto coreSelected = dialogFirstSetup->exec();
dialogFirstSetup->exec();
dialogFirstSetup->deleteLater();
if (coreSelected < 0) {
if (NekoRay::coreType < 0) {
return 0;
} else {
NekoRay::coreType = coreSelected;
QDir().mkdir("groups");
QFile file;
file.setFileName("groups/coreType");
file.open(QIODevice::ReadWrite | QIODevice::Truncate);
file.write(Int2String(coreSelected).toUtf8());
file.write(Int2String(NekoRay::coreType).toUtf8());
file.close();
}
} else {

View File

@@ -14,10 +14,9 @@ DialogFirstSetup::~DialogFirstSetup() {
void DialogFirstSetup::onButtonClicked() {
auto s = sender();
if (s == ui->v2ray) {
done(NekoRay::CoreType::V2RAY);
NekoRay::coreType = NekoRay::CoreType::V2RAY;
} else if (s == ui->singbox) {
done(NekoRay::CoreType::SING_BOX);
} else {
done(-1);
NekoRay::coreType = NekoRay::CoreType::SING_BOX;
}
done(0);
}

View File

@@ -26,6 +26,16 @@ These settings can be changed later.</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://matsuridayo.github.io/n-configuration/#nekobox&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#2980b9;&quot;&gt;Help&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="v2ray">
<property name="text">

View File

@@ -509,7 +509,7 @@ security (QUIC)</string>
<string>Reality public key. If not empty, turn TLS into REALITY.</string>
</property>
<property name="text">
<string notr="true">Realty Pbk</string>
<string notr="true">Reality Pbk</string>
</property>
</widget>
</item>