mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-20 19:00:22 +08:00
Feature: Option to disable latency test on connected
This commit is contained in:
parent
5c6072cdc1
commit
3e47e3c6ca
@ -118,7 +118,8 @@ namespace Qv2ray::base::config
|
||||
bool setSessionResumption = false;
|
||||
bool testLatencyPeriodcally = false;
|
||||
bool disableSystemRoot = false;
|
||||
JSONSTRUCT_REGISTER(Qv2rayConfig_Advanced, F(setAllowInsecure, setSessionResumption, testLatencyPeriodcally, disableSystemRoot))
|
||||
bool testLatencyOnConnected = false;
|
||||
JSONSTRUCT_REGISTER(Qv2rayConfig_Advanced, F(setAllowInsecure, setSessionResumption, testLatencyPeriodcally, disableSystemRoot, testLatencyOnConnected))
|
||||
};
|
||||
|
||||
enum Qv2rayLatencyTestingMethod
|
||||
|
@ -657,7 +657,10 @@ void MainWindow::OnConnected(const ConnectionGroupPair &id)
|
||||
//
|
||||
QTimer::singleShot(1000, ConnectionManager, [id]() {
|
||||
// After the kernel initialization is complete, we can test the delay without worry
|
||||
ConnectionManager->StartLatencyTest(id.connectionId);
|
||||
if (GlobalConfig.advancedConfig.testLatencyOnConnected)
|
||||
{
|
||||
ConnectionManager->StartLatencyTest(id.connectionId);
|
||||
}
|
||||
});
|
||||
if (GlobalConfig.inboundConfig.systemProxySettings.setSystemProxy)
|
||||
{
|
||||
|
@ -194,6 +194,7 @@ PreferencesWindow::PreferencesWindow(QWidget *parent) : QvDialog("PreferenceWind
|
||||
setAllowInsecureCB->setChecked(CurrentConfig.advancedConfig.setAllowInsecure);
|
||||
setSessionResumptionCB->setChecked(CurrentConfig.advancedConfig.setSessionResumption);
|
||||
setTestLatenctCB->setChecked(CurrentConfig.advancedConfig.testLatencyPeriodcally);
|
||||
setTestLatenctOnConnectedCB->setChecked(CurrentConfig.advancedConfig.testLatencyOnConnected);
|
||||
disableSystemRootCB->setChecked(CurrentConfig.advancedConfig.disableSystemRoot);
|
||||
}
|
||||
//
|
||||
@ -854,6 +855,16 @@ void PreferencesWindow::on_setTestLatenctCB_stateChanged(int arg1)
|
||||
CurrentConfig.advancedConfig.testLatencyPeriodcally = arg1 == Qt::Checked;
|
||||
}
|
||||
|
||||
void PreferencesWindow::on_setTestLatenctOnConnectedCB_stateChanged(int arg1)
|
||||
{
|
||||
LOADINGCHECK
|
||||
if (arg1 == Qt::Checked)
|
||||
{
|
||||
QvMessageBoxWarn(this, tr("Dangerous Operation"), tr("This will (probably) make it easy to fingerprint your connection."));
|
||||
}
|
||||
CurrentConfig.advancedConfig.testLatencyOnConnected = arg1 == Qt::Checked;
|
||||
}
|
||||
|
||||
void PreferencesWindow::on_setSessionResumptionCB_stateChanged(int arg1)
|
||||
{
|
||||
LOADINGCHECK
|
||||
|
@ -96,6 +96,7 @@ class PreferencesWindow
|
||||
void on_qvProxyPortCB_valueChanged(int arg1);
|
||||
void on_setAllowInsecureCB_stateChanged(int arg1);
|
||||
void on_setTestLatenctCB_stateChanged(int arg1);
|
||||
void on_setTestLatenctOnConnectedCB_stateChanged(int arg1);
|
||||
void on_setSessionResumptionCB_stateChanged(int arg1);
|
||||
void on_quietModeCB_stateChanged(int arg1);
|
||||
void on_tproxGroupBox_toggled(bool arg1);
|
||||
|
@ -647,6 +647,20 @@ But could damage your server if improperly used.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_44">
|
||||
<property name="text">
|
||||
<string>Test Latency On Connected</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QCheckBox" name="setTestLatenctOnConnectedCB">
|
||||
<property name="text">
|
||||
<string>Enabled</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -1335,6 +1335,10 @@ This could resolve the certificate issues, but also could let one performing TLS
|
||||
<source>Test Latency Periodcally</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Test Latency On Connected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Run TCPing or ICMPing periodcally after connecting to a server.
|
||||
Qv2ray will give a more accurate latency value if Enabled, but makes it easy to fingerprint the connection.</source>
|
||||
|
@ -1342,6 +1342,10 @@ This could resolve the certificate issues, but also could let one performing TLS
|
||||
<source>Test Latency Periodcally</source>
|
||||
<translation>定时测试延迟</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Test Latency On Connected</source>
|
||||
<translation>连接后测试延迟</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Run TCPing or ICMPing periodcally after connecting to a server.
|
||||
Qv2ray will give a more accurate latency value if Enabled, but makes it easy to fingerprint the connection.</source>
|
||||
|
Loading…
Reference in New Issue
Block a user