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
|
||||
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},
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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"><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>
|
||||
<widget class="QPushButton" name="v2ray">
|
||||
<property name="text">
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user