mirror of
https://github.com/chenx-dust/EZ4Connect.git
synced 2026-09-20 02:13:32 +08:00
feat: follow upstream updates, with multiple settings added.
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -44,4 +44,6 @@
|
|||||||
CMakePresets.json
|
CMakePresets.json
|
||||||
CMakeUserPresets.json
|
CMakeUserPresets.json
|
||||||
|
|
||||||
|
/.vscode
|
||||||
|
|
||||||
!wintun.dll
|
!wintun.dll
|
||||||
@@ -52,6 +52,7 @@ SettingWindow::SettingWindow(QWidget *parent, QSettings *inputSettings) :
|
|||||||
settings->setValue("ZJUConnect/ServerAddress", ui->serverAddressLineEdit->text());
|
settings->setValue("ZJUConnect/ServerAddress", ui->serverAddressLineEdit->text());
|
||||||
settings->setValue("ZJUConnect/ServerPort", ui->serverPortSpinBox->value());
|
settings->setValue("ZJUConnect/ServerPort", ui->serverPortSpinBox->value());
|
||||||
settings->setValue("ZJUConnect/DNS", ui->dnsLineEdit->text());
|
settings->setValue("ZJUConnect/DNS", ui->dnsLineEdit->text());
|
||||||
|
settings->setValue("ZJUConnect/DNSAuto", ui->dnsAutoCheckBox->isChecked());
|
||||||
settings->setValue("ZJUConnect/Socks5Port", ui->socks5PortSpinBox->value());
|
settings->setValue("ZJUConnect/Socks5Port", ui->socks5PortSpinBox->value());
|
||||||
settings->setValue("ZJUConnect/HttpPort", ui->httpPortSpinBox->value());
|
settings->setValue("ZJUConnect/HttpPort", ui->httpPortSpinBox->value());
|
||||||
settings->setValue("ZJUConnect/MultiLine", ui->multiLineCheckBox->isChecked());
|
settings->setValue("ZJUConnect/MultiLine", ui->multiLineCheckBox->isChecked());
|
||||||
@@ -70,6 +71,7 @@ SettingWindow::SettingWindow(QWidget *parent, QSettings *inputSettings) :
|
|||||||
settings->setValue("ZJUConnect/TunMode", ui->tunCheckBox->isChecked());
|
settings->setValue("ZJUConnect/TunMode", ui->tunCheckBox->isChecked());
|
||||||
settings->setValue("ZJUConnect/DNSHijack", ui->dnsHijackCheckBox->isChecked());
|
settings->setValue("ZJUConnect/DNSHijack", ui->dnsHijackCheckBox->isChecked());
|
||||||
settings->setValue("ZJUConnect/OutsideAccess", ui->outsideAccessCheckBox->isChecked());
|
settings->setValue("ZJUConnect/OutsideAccess", ui->outsideAccessCheckBox->isChecked());
|
||||||
|
settings->setValue("ZJUConnect/SkipDomainResource", ui->skipDomainResourceCheckBox->isChecked());
|
||||||
|
|
||||||
settings->setValue("Common/ConfigVersion", Utils::CONFIG_VERSION);
|
settings->setValue("Common/ConfigVersion", Utils::CONFIG_VERSION);
|
||||||
|
|
||||||
@@ -143,6 +145,12 @@ SettingWindow::SettingWindow(QWidget *parent, QSettings *inputSettings) :
|
|||||||
ui->dnsHijackCheckBox->setEnabled(checked);
|
ui->dnsHijackCheckBox->setEnabled(checked);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
connect(ui->dnsAutoCheckBox, &QCheckBox::toggled,
|
||||||
|
[&](bool checked)
|
||||||
|
{
|
||||||
|
ui->dnsLineEdit->setEnabled(!checked);
|
||||||
|
});
|
||||||
|
|
||||||
connect(ui->passwordVisibleCheckBox, &QCheckBox::checkStateChanged,
|
connect(ui->passwordVisibleCheckBox, &QCheckBox::checkStateChanged,
|
||||||
[&](Qt::CheckState state)
|
[&](Qt::CheckState state)
|
||||||
{
|
{
|
||||||
@@ -168,7 +176,8 @@ void SettingWindow::loadSettings()
|
|||||||
|
|
||||||
ui->serverAddressLineEdit->setText(settings->value("ZJUConnect/ServerAddress", "vpn.hitsz.edu.cn").toString());
|
ui->serverAddressLineEdit->setText(settings->value("ZJUConnect/ServerAddress", "vpn.hitsz.edu.cn").toString());
|
||||||
ui->serverPortSpinBox->setValue(settings->value("ZJUConnect/ServerPort", 443).toInt());
|
ui->serverPortSpinBox->setValue(settings->value("ZJUConnect/ServerPort", 443).toInt());
|
||||||
ui->dnsLineEdit->setText(settings->value("ZJUConnect/DNS", "10.248.98.30").toString());
|
ui->dnsLineEdit->setText(settings->value("ZJUConnect/DNS").toString());
|
||||||
|
ui->dnsAutoCheckBox->setChecked(settings->value("ZJUConnect/DNSAuto", true).toBool());
|
||||||
ui->socks5PortSpinBox->setValue(settings->value("ZJUConnect/Socks5Port", 11080).toInt());
|
ui->socks5PortSpinBox->setValue(settings->value("ZJUConnect/Socks5Port", 11080).toInt());
|
||||||
ui->httpPortSpinBox->setValue(settings->value("ZJUConnect/HttpPort", 11081).toInt());
|
ui->httpPortSpinBox->setValue(settings->value("ZJUConnect/HttpPort", 11081).toInt());
|
||||||
ui->multiLineCheckBox->setChecked(settings->value("ZJUConnect/MultiLine", false).toBool());
|
ui->multiLineCheckBox->setChecked(settings->value("ZJUConnect/MultiLine", false).toBool());
|
||||||
@@ -187,7 +196,10 @@ void SettingWindow::loadSettings()
|
|||||||
ui->tunCheckBox->setChecked(settings->value("ZJUConnect/TunMode", false).toBool());
|
ui->tunCheckBox->setChecked(settings->value("ZJUConnect/TunMode", false).toBool());
|
||||||
ui->dnsHijackCheckBox->setChecked(settings->value("ZJUConnect/DNSHijack", false).toBool());
|
ui->dnsHijackCheckBox->setChecked(settings->value("ZJUConnect/DNSHijack", false).toBool());
|
||||||
ui->outsideAccessCheckBox->setChecked(settings->value("ZJUConnect/OutsideAccess", false).toBool());
|
ui->outsideAccessCheckBox->setChecked(settings->value("ZJUConnect/OutsideAccess", false).toBool());
|
||||||
|
ui->skipDomainResourceCheckBox->setChecked(settings->value("ZJUConnect/SkipDomainResource", true).toBool());
|
||||||
|
|
||||||
ui->routeCheckBox->setEnabled(ui->tunCheckBox->isChecked());
|
ui->routeCheckBox->setEnabled(ui->tunCheckBox->isChecked());
|
||||||
ui->dnsHijackCheckBox->setEnabled(ui->tunCheckBox->isChecked());
|
ui->dnsHijackCheckBox->setEnabled(ui->tunCheckBox->isChecked());
|
||||||
|
|
||||||
|
ui->dnsLineEdit->setEnabled(!ui->dnsAutoCheckBox->isChecked());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>486</width>
|
<width>486</width>
|
||||||
<height>433</height>
|
<height>456</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -17,6 +17,13 @@
|
|||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::StandardButton::Apply|QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="0" colspan="2">
|
<item row="0" column="0" colspan="2">
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="locale">
|
<property name="locale">
|
||||||
@@ -207,66 +214,8 @@
|
|||||||
<string>高级</string>
|
<string>高级</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<item row="6" column="0">
|
<item row="12" column="0" colspan="4">
|
||||||
<widget class="QLabel" name="zjuConnectTabLabel7">
|
|
||||||
<property name="text">
|
|
||||||
<string>自动重连时间(秒)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1" colspan="3">
|
|
||||||
<widget class="QLineEdit" name="secondaryDnsLineEdit">
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>不填则采用系统 DNS ,使用 DNS 劫持必须填写</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="zjuConnectTabLabel8">
|
|
||||||
<property name="text">
|
|
||||||
<string>DNS 服务器</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="0" colspan="4">
|
|
||||||
<widget class="Line" name="line">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="0" colspan="4">
|
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QCheckBox" name="autoSetProxyCheckBox">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>连接服务器后自动设置代理</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>自动设置系统代理</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QCheckBox" name="multiLineCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>自动选择线路</string>
|
|
||||||
</property>
|
|
||||||
<property name="autoExclusive">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="tristate">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QCheckBox" name="proxyAllCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>代理全部流量</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QCheckBox" name="keepAliveCheckBox">
|
<widget class="QCheckBox" name="keepAliveCheckBox">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
@@ -287,30 +236,40 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QCheckBox" name="multiLineCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>自动选择线路</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="tristate">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="skipDomainResourceCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>忽略域名资源</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QCheckBox" name="autoSetProxyCheckBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>连接服务器后自动设置代理</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>自动设置系统代理</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="1" column="2">
|
||||||
<widget class="QCheckBox" name="debugCheckBox">
|
<widget class="QCheckBox" name="proxyAllCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>核心调试模式</string>
|
<string>代理全部流量</string>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="2">
|
|
||||||
<widget class="QCheckBox" name="dnsHijackCheckBox">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>TUN 模式下有效</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>DNS 劫持(TUN)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QCheckBox" name="routeCheckBox">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>TUN 模式下有效</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>设置路由(TUN)</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -324,26 +283,43 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QCheckBox" name="routeCheckBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>TUN 模式下有效</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>设置路由(TUN)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QCheckBox" name="dnsHijackCheckBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>TUN 模式下有效</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>DNS 劫持(TUN)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="3">
|
||||||
|
<widget class="QCheckBox" name="debugCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>核心调试模式(谨慎开启,日志量过大会导致 UI 崩溃)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="zjuConnectTabLabel6">
|
<widget class="QLineEdit" name="serverAddressLineEdit">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>HTTP 代理端口</string>
|
<string>vpn.hitsz.edu.cn</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1" colspan="2">
|
<item row="6" column="1" colspan="3">
|
||||||
<widget class="QSpinBox" name="reconnectTimeSpinBox">
|
|
||||||
<property name="maximum">
|
|
||||||
<number>86400</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1" colspan="3">
|
|
||||||
<widget class="QSpinBox" name="httpPortSpinBox">
|
<widget class="QSpinBox" name="httpPortSpinBox">
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>65535</number>
|
<number>65535</number>
|
||||||
@@ -353,10 +329,65 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" colspan="3">
|
<item row="11" column="0" colspan="4">
|
||||||
<widget class="QLineEdit" name="dnsLineEdit">
|
<widget class="Line" name="line">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="zjuConnectTabLabel8">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>10.248.98.30</string>
|
<string>DNS 服务器</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="2" colspan="2">
|
||||||
|
<widget class="QCheckBox" name="dnsAutoCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>自动</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="zjuConnectTabLabel9">
|
||||||
|
<property name="text">
|
||||||
|
<string>备用 DNS</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="0">
|
||||||
|
<widget class="QLabel" name="zjuConnectTabLabel11">
|
||||||
|
<property name="text">
|
||||||
|
<string>系统代理排除</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="16" column="0" colspan="4">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0">
|
||||||
|
<widget class="QLabel" name="zjuConnectTabLabel10">
|
||||||
|
<property name="text">
|
||||||
|
<string>Shadowsocks 服务器</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="zjuConnectTabLabel5">
|
||||||
|
<property name="text">
|
||||||
|
<string>SOCKS5 代理端口</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -370,42 +401,17 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="8" column="1">
|
||||||
<widget class="QLabel" name="zjuConnectTabLabel1">
|
<widget class="QSpinBox" name="reconnectTimeSpinBox">
|
||||||
<property name="text">
|
<property name="maximum">
|
||||||
<string>服务器地址</string>
|
<number>86400</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="5" column="1" colspan="3">
|
||||||
<widget class="QLabel" name="zjuConnectTabLabel5">
|
|
||||||
<property name="text">
|
|
||||||
<string>SOCKS5 代理端口</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="serverAddressLineEdit">
|
|
||||||
<property name="text">
|
|
||||||
<string>vpn.hitsz.edu.cn</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="zjuConnectTabLabel9">
|
|
||||||
<property name="text">
|
|
||||||
<string>备用 DNS</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="12" column="0" colspan="4">
|
|
||||||
<widget class="QPushButton" name="portForwardingPushButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>设置端口转发</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1" colspan="3">
|
|
||||||
<widget class="QSpinBox" name="socks5PortSpinBox">
|
<widget class="QSpinBox" name="socks5PortSpinBox">
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>65535</number>
|
<number>65535</number>
|
||||||
@@ -415,27 +421,21 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="9" column="1" colspan="3">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLineEdit" name="systemProxyBypassLineEdit">
|
||||||
<property name="text">
|
<property name="placeholderText">
|
||||||
<string>:</string>
|
<string>与操作系统有关,一般用半角分号;进行分隔</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="0" colspan="4">
|
<item row="0" column="0">
|
||||||
<spacer name="verticalSpacer">
|
<widget class="QLabel" name="zjuConnectTabLabel1">
|
||||||
<property name="orientation">
|
<property name="text">
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
<string>服务器地址</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
</widget>
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="3">
|
<item row="8" column="2" colspan="2">
|
||||||
<widget class="QCheckBox" name="autoReconnectCheckBox">
|
<widget class="QCheckBox" name="autoReconnectCheckBox">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>断线自动重连</string>
|
<string>断线自动重连</string>
|
||||||
@@ -448,31 +448,52 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QLabel" name="zjuConnectTabLabel10">
|
<widget class="QLabel" name="zjuConnectTabLabel6">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Shadowsocks 服务器</string>
|
<string>HTTP 代理端口</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1" colspan="3">
|
<item row="3" column="1">
|
||||||
|
<widget class="QLineEdit" name="dnsLineEdit">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>勾选自动,否则不应留空</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="15" column="0" colspan="4">
|
||||||
|
<widget class="QPushButton" name="portForwardingPushButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>设置端口转发</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0">
|
||||||
|
<widget class="QLabel" name="zjuConnectTabLabel7">
|
||||||
|
<property name="text">
|
||||||
|
<string>自动重连时间(秒)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1" colspan="3">
|
||||||
<widget class="QLineEdit" name="shadowsocksUrlLineEdit">
|
<widget class="QLineEdit" name="shadowsocksUrlLineEdit">
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>不填则不启用,格式:ss://chiper:password@server:port</string>
|
<string>不填则不启用,格式:ss://chiper:password@server:port</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="0">
|
<item row="4" column="1" colspan="3">
|
||||||
<widget class="QLabel" name="zjuConnectTabLabel11">
|
<widget class="QLineEdit" name="secondaryDnsLineEdit">
|
||||||
<property name="text">
|
<property name="placeholderText">
|
||||||
<string>系统代理排除</string>
|
<string>不填则采用系统 DNS ,使用 DNS 劫持必须填写</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1" colspan="3">
|
<item row="0" column="2">
|
||||||
<widget class="QLineEdit" name="systemProxyBypassLineEdit">
|
<widget class="QLabel" name="label">
|
||||||
<property name="placeholderText">
|
<property name="text">
|
||||||
<string>用半角分号;进行分隔</string>
|
<string>:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -480,13 +501,6 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::StandardButton::Apply|QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
@@ -505,12 +519,6 @@
|
|||||||
<tabstop>multiLineCheckBox</tabstop>
|
<tabstop>multiLineCheckBox</tabstop>
|
||||||
<tabstop>keepAliveCheckBox</tabstop>
|
<tabstop>keepAliveCheckBox</tabstop>
|
||||||
<tabstop>outsideAccessCheckBox</tabstop>
|
<tabstop>outsideAccessCheckBox</tabstop>
|
||||||
<tabstop>autoSetProxyCheckBox</tabstop>
|
|
||||||
<tabstop>proxyAllCheckBox</tabstop>
|
|
||||||
<tabstop>debugCheckBox</tabstop>
|
|
||||||
<tabstop>tunCheckBox</tabstop>
|
|
||||||
<tabstop>routeCheckBox</tabstop>
|
|
||||||
<tabstop>dnsHijackCheckBox</tabstop>
|
|
||||||
<tabstop>portForwardingPushButton</tabstop>
|
<tabstop>portForwardingPushButton</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace Utils
|
|||||||
|
|
||||||
const inline QString APP_NAME("EZ4Connect");
|
const inline QString APP_NAME("EZ4Connect");
|
||||||
|
|
||||||
constexpr inline int CONFIG_VERSION = 3;
|
constexpr inline int CONFIG_VERSION = 4;
|
||||||
|
|
||||||
QString ConsoleOutputToQString(const QByteArray &byteArray);
|
QString ConsoleOutputToQString(const QByteArray &byteArray);
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ void ZjuConnectController::start(
|
|||||||
const QString& server,
|
const QString& server,
|
||||||
int port,
|
int port,
|
||||||
const QString& dns,
|
const QString& dns,
|
||||||
|
bool dnsAuto,
|
||||||
const QString& secondaryDns,
|
const QString& secondaryDns,
|
||||||
bool disableMultiLine,
|
bool disableMultiLine,
|
||||||
bool disableKeepAlive,
|
bool disableKeepAlive,
|
||||||
@@ -113,6 +114,7 @@ void ZjuConnectController::start(
|
|||||||
bool tunMode,
|
bool tunMode,
|
||||||
bool addRoute,
|
bool addRoute,
|
||||||
bool dnsHijack,
|
bool dnsHijack,
|
||||||
|
bool skipDomainResource,
|
||||||
bool debugDump,
|
bool debugDump,
|
||||||
const QString& tcpPortForwarding,
|
const QString& tcpPortForwarding,
|
||||||
const QString& udpPortForwarding
|
const QString& udpPortForwarding
|
||||||
@@ -132,10 +134,17 @@ void ZjuConnectController::start(
|
|||||||
args.append(QString::number(port));
|
args.append(QString::number(port));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dns.isEmpty())
|
if (!dns.isEmpty() || dnsAuto)
|
||||||
{
|
{
|
||||||
args.append("-zju-dns-server");
|
args.append("-zju-dns-server");
|
||||||
args.append(dns);
|
if (dnsAuto)
|
||||||
|
{
|
||||||
|
args.append("auto");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
args.append(dns);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!secondaryDns.isEmpty())
|
if (!secondaryDns.isEmpty())
|
||||||
@@ -209,6 +218,11 @@ void ZjuConnectController::start(
|
|||||||
args.append(udpPortForwarding);
|
args.append(udpPortForwarding);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (skipDomainResource)
|
||||||
|
{
|
||||||
|
args.append("-skip-domain-resource");
|
||||||
|
}
|
||||||
|
|
||||||
QString timeString = QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss");
|
QString timeString = QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss");
|
||||||
emit outputRead(timeString + " VPN 启动!参数:" + args.join(' '));
|
emit outputRead(timeString + " VPN 启动!参数:" + args.join(' '));
|
||||||
|
|
||||||
|
|||||||
@@ -32,9 +32,10 @@ public:
|
|||||||
const QString& server = "",
|
const QString& server = "",
|
||||||
int port = 0,
|
int port = 0,
|
||||||
const QString& dns = "",
|
const QString& dns = "",
|
||||||
|
bool dnsAuto = true,
|
||||||
const QString& secondaryDns = "",
|
const QString& secondaryDns = "",
|
||||||
bool disableMultiLine = false,
|
bool disableMultiLine = false,
|
||||||
bool disableKeepAlive = false,
|
bool disableKeepAlive = true,
|
||||||
bool proxyAll = false,
|
bool proxyAll = false,
|
||||||
const QString& socksBind = "",
|
const QString& socksBind = "",
|
||||||
const QString& httpBind = "",
|
const QString& httpBind = "",
|
||||||
@@ -42,6 +43,7 @@ public:
|
|||||||
bool tunMode = false,
|
bool tunMode = false,
|
||||||
bool addRoute = false,
|
bool addRoute = false,
|
||||||
bool dnsHijack = false,
|
bool dnsHijack = false,
|
||||||
|
bool skipDomainResource = true,
|
||||||
bool debugDump = false,
|
bool debugDump = false,
|
||||||
const QString& tcpPortForwarding = "",
|
const QString& tcpPortForwarding = "",
|
||||||
const QString& udpPortForwarding = ""
|
const QString& udpPortForwarding = ""
|
||||||
|
|||||||
@@ -140,22 +140,24 @@ void MainWindow::initZjuConnect()
|
|||||||
program_path,
|
program_path,
|
||||||
username,
|
username,
|
||||||
password,
|
password,
|
||||||
settings->value("ZJUConnect/ServerAddress", "vpn.hitsz.edu.cn").toString(),
|
settings->value("ZJUConnect/ServerAddress").toString(),
|
||||||
settings->value("ZJUConnect/ServerPort", 443).toInt(),
|
settings->value("ZJUConnect/ServerPort").toInt(),
|
||||||
settings->value("ZJUConnect/DNS").toString(),
|
settings->value("ZJUConnect/DNS").toString(),
|
||||||
settings->value("ZJUConnect/SecondaryDNS", "").toString(),
|
settings->value("ZJUConnect/DNSAuto").toBool(),
|
||||||
!settings->value("ZJUConnect/MultiLine", false).toBool(),
|
settings->value("ZJUConnect/SecondaryDNS").toString(),
|
||||||
!settings->value("ZJUConnect/KeepAlive", false).toBool(),
|
!settings->value("ZJUConnect/MultiLine").toBool(),
|
||||||
settings->value("ZJUConnect/ProxyAll", false).toBool(),
|
!settings->value("ZJUConnect/KeepAlive").toBool(),
|
||||||
bind_prefix + QString::number(settings->value("ZJUConnect/Socks5Port", 11080).toInt()),
|
settings->value("ZJUConnect/ProxyAll").toBool(),
|
||||||
bind_prefix + QString::number(settings->value("ZJUConnect/HttpPort", 11081).toInt()),
|
bind_prefix + QString::number(settings->value("ZJUConnect/Socks5Port").toInt()),
|
||||||
settings->value("ZJUConnect/ShadowsocksUrl", "").toString(),
|
bind_prefix + QString::number(settings->value("ZJUConnect/HttpPort").toInt()),
|
||||||
settings->value("ZJUConnect/TunMode", false).toBool(),
|
settings->value("ZJUConnect/ShadowsocksUrl").toString(),
|
||||||
settings->value("ZJUConnect/Route", false).toBool(),
|
settings->value("ZJUConnect/TunMode").toBool(),
|
||||||
settings->value("ZJUConnect/DNSHijack", false).toBool(),
|
settings->value("ZJUConnect/Route").toBool(),
|
||||||
settings->value("ZJUConnect/Debug", false).toBool(),
|
settings->value("ZJUConnect/DNSHijack").toBool(),
|
||||||
settings->value("ZJUConnect/TcpPortForwarding", "").toString(),
|
settings->value("ZJUConnect/SkipDomainResource").toBool(),
|
||||||
settings->value("ZJUConnect/UdpPortForwarding", "").toString()
|
settings->value("ZJUConnect/Debug").toBool(),
|
||||||
|
settings->value("ZJUConnect/TcpPortForwarding").toString(),
|
||||||
|
settings->value("ZJUConnect/UdpPortForwarding").toString()
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user