Skip to content

Commit

Permalink
fix: replace old ineffective check ip
Browse files Browse the repository at this point in the history
  • Loading branch information
Mythologyli committed Jul 20, 2024
1 parent 6f75575 commit 846be05
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion l2tpmode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void MainWindow::setModeToL2tp()
QStringList()
<< "-n"
<< "1"
<< settings->value("L2TP/CheckIp", "39.156.66.10").toString()
<< settings->value("L2TP/CheckIp", "223.5.5.5").toString()
);
});

Expand Down
7 changes: 7 additions & 0 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,13 @@ void MainWindow::upgradeSettings()
}
}

// Replace old ineffective check ip
if (settings->value("L2TP/CheckIp", "223.5.5.5").toString() == "39.156.66.10")
{
settings->setValue("L2TP/CheckIp", "223.5.5.5");
settings->sync();
}

return;
}

Expand Down
2 changes: 1 addition & 1 deletion networkdetector/networkdetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void NetworkDetector::checkInternet()
checkProxy();
});

process->start("ping", QStringList() << "39.156.66.10" << "-n" << "1");
process->start("ping", QStringList() << "223.5.5.5" << "-n" << "1");
}

void NetworkDetector::checkProxy()
Expand Down
2 changes: 1 addition & 1 deletion settingwindow/settingwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ SettingWindow::SettingWindow(QWidget *parent, QSettings *inputSettings) :
ui->l2tpAutoCheckComboBox->setCurrentText("");
}

ui->l2tpCheckIpLineEdit->setText(settings->value("L2TP/CheckIp", "39.156.66.10").toString());
ui->l2tpCheckIpLineEdit->setText(settings->value("L2TP/CheckIp", "223.5.5.5").toString());
ui->l2tpCheckTimeSpinBox->setValue(settings->value("L2TP/CheckTime", 600).toInt());

if (settings->value("WebLogin/IntlUrl", false).toBool())
Expand Down
2 changes: 1 addition & 1 deletion settingwindow/settingwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
<item row="2" column="1">
<widget class="QLineEdit" name="l2tpCheckIpLineEdit">
<property name="text">
<string>39.156.66.10</string>
<string>223.5.5.5</string>
</property>
</widget>
</item>
Expand Down

0 comments on commit 846be05

Please sign in to comment.