add: added disableSystemRoot global option

This commit is contained in:
QxQ 2020-10-04 16:20:58 +08:00
parent a80509a548
commit 7b34ae9b97
5 changed files with 26 additions and 2 deletions

View File

@ -1 +1 @@
5957
5959

View File

@ -117,7 +117,8 @@ namespace Qv2ray::base::config
bool setAllowInsecure = false;
bool setSessionResumption = false;
bool testLatencyPeriodcally = false;
JSONSTRUCT_REGISTER(Qv2rayConfig_Advanced, F(setAllowInsecure, setSessionResumption, testLatencyPeriodcally))
bool disableSystemRoot = false;
JSONSTRUCT_REGISTER(Qv2rayConfig_Advanced, F(setAllowInsecure, setSessionResumption, testLatencyPeriodcally, disableSystemRoot))
};
enum Qv2rayLatencyTestingMethod

View File

@ -180,6 +180,7 @@ PreferencesWindow::PreferencesWindow(QWidget *parent) : QvDialog(parent), Curren
setAllowInsecureCB->setChecked(CurrentConfig.advancedConfig.setAllowInsecure);
setSessionResumptionCB->setChecked(CurrentConfig.advancedConfig.setSessionResumption);
setTestLatenctCB->setChecked(CurrentConfig.advancedConfig.testLatencyPeriodcally);
disableSystemRootCB->setChecked(CurrentConfig.advancedConfig.disableSystemRoot);
}
//
{
@ -1102,3 +1103,9 @@ void PreferencesWindow::on_bypassPrivateCb_clicked(bool checked)
NEEDRESTART
CurrentConfig.defaultRouteConfig.connectionConfig.bypassLAN = checked;
}
void PreferencesWindow::on_disableSystemRootCB_stateChanged(int arg1)
{
LOADINGCHECK
CurrentConfig.advancedConfig.disableSystemRoot = arg1 == Qt::Checked;
}

View File

@ -127,6 +127,8 @@ class PreferencesWindow
void on_bypassPrivateCb_clicked(bool checked);
void on_disableSystemRootCB_stateChanged(int arg1);
private:
//
DnsSettingsWidget *dnsSettingsWidget;

View File

@ -633,6 +633,20 @@ But could damage your server if improperly used.</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Disable System Root Certificates</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="disableSystemRootCB">
<property name="text">
<string>Enabled</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>