mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-19 10:20:49 +08:00
change: PreferencesWindow refactor and added custom Qv2ray proxy
This commit is contained in:
parent
e88413d42d
commit
796ada817d
@ -214,6 +214,17 @@ namespace Qv2ray::base::config
|
|||||||
XTOSTRUCT(O(ignoredVersion, updateChannel))
|
XTOSTRUCT(O(ignoredVersion, updateChannel))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct Qv2rayNetworkConfig
|
||||||
|
{
|
||||||
|
bool useCustomProxy;
|
||||||
|
QString address;
|
||||||
|
QString type;
|
||||||
|
int port;
|
||||||
|
QString userAgent;
|
||||||
|
Qv2rayNetworkConfig() : address(""), type("http"), port(8000), userAgent("Qv2ray/" QV2RAY_VERSION_STRING " WebRequestHelper"){};
|
||||||
|
XTOSTRUCT(O(useCustomProxy, type, address, port, userAgent))
|
||||||
|
};
|
||||||
|
|
||||||
struct Qv2rayConfig
|
struct Qv2rayConfig
|
||||||
{
|
{
|
||||||
int config_version;
|
int config_version;
|
||||||
@ -233,18 +244,47 @@ namespace Qv2ray::base::config
|
|||||||
Qv2rayPluginConfig pluginConfig;
|
Qv2rayPluginConfig pluginConfig;
|
||||||
Qv2rayKernelConfig kernelConfig;
|
Qv2rayKernelConfig kernelConfig;
|
||||||
Qv2rayUpdateConfig updateConfig;
|
Qv2rayUpdateConfig updateConfig;
|
||||||
|
Qv2rayNetworkConfig networkConfig;
|
||||||
Qv2rayToolBarConfig toolBarConfig;
|
Qv2rayToolBarConfig toolBarConfig;
|
||||||
Qv2rayInboundsConfig inboundConfig;
|
Qv2rayInboundsConfig inboundConfig;
|
||||||
Qv2rayConnectionConfig connectionConfig;
|
Qv2rayConnectionConfig connectionConfig;
|
||||||
|
|
||||||
Qv2rayConfig()
|
Qv2rayConfig()
|
||||||
: config_version(QV2RAY_CONFIG_VERSION), tProxySupport(false), logLevel(), autoStartId("null"), groups(), subscriptions(),
|
: config_version(QV2RAY_CONFIG_VERSION), //
|
||||||
connections(), uiConfig(), apiConfig(), pluginConfig(), kernelConfig(), updateConfig(), toolBarConfig(), inboundConfig(),
|
tProxySupport(false), //
|
||||||
|
logLevel(), //
|
||||||
|
autoStartId("null"), //
|
||||||
|
groups(), //
|
||||||
|
subscriptions(), //
|
||||||
|
connections(), //
|
||||||
|
uiConfig(), //
|
||||||
|
apiConfig(), //
|
||||||
|
pluginConfig(), //
|
||||||
|
kernelConfig(), //
|
||||||
|
updateConfig(), //
|
||||||
|
networkConfig(), //
|
||||||
|
toolBarConfig(), //
|
||||||
|
inboundConfig(), //
|
||||||
connectionConfig()
|
connectionConfig()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
XTOSTRUCT(O(config_version, tProxySupport, logLevel, uiConfig, pluginConfig, updateConfig, kernelConfig, groups, connections,
|
XTOSTRUCT(O(config_version, //
|
||||||
subscriptions, autoStartId, inboundConfig, connectionConfig, toolBarConfig, apiConfig))
|
tProxySupport, //
|
||||||
|
logLevel, //
|
||||||
|
uiConfig, //
|
||||||
|
pluginConfig, //
|
||||||
|
updateConfig, //
|
||||||
|
kernelConfig, //
|
||||||
|
networkConfig, //
|
||||||
|
groups, //
|
||||||
|
connections, //
|
||||||
|
subscriptions, //
|
||||||
|
autoStartId, //
|
||||||
|
inboundConfig, //
|
||||||
|
connectionConfig, //
|
||||||
|
toolBarConfig, //
|
||||||
|
apiConfig //
|
||||||
|
))
|
||||||
};
|
};
|
||||||
} // namespace Qv2ray::base::config
|
} // namespace Qv2ray::base::config
|
||||||
|
@ -16,112 +16,71 @@ namespace Qv2ray::common
|
|||||||
accessManager.disconnect();
|
accessManager.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QvHttpRequestHelper::setUrl(const QString &url)
|
|
||||||
{
|
|
||||||
QUrl qUrl = QUrl(url);
|
|
||||||
|
|
||||||
if (!qUrl.isValid())
|
|
||||||
{
|
|
||||||
LOG(MODULE_NETWORK, "Provided URL is invalid: " + url)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
request.setUrl(qUrl);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void QvHttpRequestHelper::setHeader(const QByteArray &key, const QByteArray &value)
|
void QvHttpRequestHelper::setHeader(const QByteArray &key, const QByteArray &value)
|
||||||
{
|
{
|
||||||
DEBUG(MODULE_NETWORK, "Adding HTTP request header: " + key + ":" + value)
|
DEBUG(MODULE_NETWORK, "Adding HTTP request header: " + key + ":" + value)
|
||||||
request.setRawHeader(key, value);
|
request.setRawHeader(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray QvHttpRequestHelper::syncget(const QString &url, bool useProxy)
|
QByteArray QvHttpRequestHelper::Get(const QString &url, bool useProxy)
|
||||||
{
|
{
|
||||||
this->setUrl(url);
|
request.setUrl({ url });
|
||||||
|
|
||||||
if (useProxy)
|
if (useProxy)
|
||||||
{
|
{
|
||||||
auto proxy = QNetworkProxyFactory::systemProxyForQuery();
|
auto p = GlobalConfig.networkConfig.useCustomProxy ?
|
||||||
accessManager.setProxy(proxy.first());
|
QNetworkProxy{
|
||||||
LOG(MODULE_NETWORK, "Sync get is using system proxy settings")
|
GlobalConfig.networkConfig.type == "http" ? QNetworkProxy::HttpProxy : QNetworkProxy::Socks5Proxy, //
|
||||||
|
GlobalConfig.networkConfig.address, //
|
||||||
|
quint16(GlobalConfig.networkConfig.port) //
|
||||||
|
} :
|
||||||
|
QNetworkProxyFactory::systemProxyForQuery().first();
|
||||||
|
accessManager.setProxy(p);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
LOG(MODULE_NETWORK, "Get without proxy.")
|
||||||
accessManager.setProxy(QNetworkProxy(QNetworkProxy::ProxyType::NoProxy));
|
accessManager.setProxy(QNetworkProxy(QNetworkProxy::ProxyType::NoProxy));
|
||||||
}
|
}
|
||||||
|
|
||||||
request.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy);
|
request.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy);
|
||||||
request.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, true);
|
request.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, true);
|
||||||
request.setHeader(QNetworkRequest::KnownHeaders::UserAgentHeader, "Mozilla/5.0 (rv:71.0) Gecko/20100101 Firefox/71.0");
|
request.setHeader(QNetworkRequest::KnownHeaders::UserAgentHeader, GlobalConfig.networkConfig.userAgent);
|
||||||
reply = accessManager.get(request);
|
reply = accessManager.get(request);
|
||||||
connect(reply, &QNetworkReply::finished, this, &QvHttpRequestHelper::onRequestFinished_p);
|
|
||||||
//
|
//
|
||||||
QEventLoop loop;
|
QEventLoop loop;
|
||||||
connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit);
|
connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit);
|
||||||
loop.exec();
|
loop.exec();
|
||||||
|
//
|
||||||
// Data or timeout?
|
// Data or timeout?
|
||||||
auto data = reply->readAll();
|
auto data = reply->readAll();
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QvHttpRequestHelper::get(const QString &url)
|
void QvHttpRequestHelper::AsyncGet(const QString &url)
|
||||||
{
|
{
|
||||||
this->setUrl(url);
|
request.setUrl({ url });
|
||||||
// request.setRawHeader("Content-Type",
|
if (GlobalConfig.networkConfig.useCustomProxy)
|
||||||
// "application/x-www-form-urlencoded");
|
{
|
||||||
|
QNetworkProxy p{
|
||||||
|
GlobalConfig.networkConfig.type == "http" ? QNetworkProxy::HttpProxy : QNetworkProxy::Socks5Proxy, //
|
||||||
|
GlobalConfig.networkConfig.address, //
|
||||||
|
quint16(GlobalConfig.networkConfig.port) //
|
||||||
|
};
|
||||||
|
accessManager.setProxy(p);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOG(MODULE_NETWORK, "Get without proxy.")
|
||||||
|
accessManager.setProxy(QNetworkProxy(QNetworkProxy::ProxyType::NoProxy));
|
||||||
|
}
|
||||||
|
request.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy);
|
||||||
|
request.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, true);
|
||||||
|
request.setHeader(QNetworkRequest::KnownHeaders::UserAgentHeader, GlobalConfig.networkConfig.userAgent);
|
||||||
reply = accessManager.get(request);
|
reply = accessManager.get(request);
|
||||||
connect(reply, &QNetworkReply::finished, this, &QvHttpRequestHelper::onRequestFinished_p);
|
connect(reply, &QNetworkReply::finished, this, &QvHttpRequestHelper::onRequestFinished_p);
|
||||||
connect(reply, &QNetworkReply::readyRead, this, &QvHttpRequestHelper::onReadyRead);
|
connect(reply, &QNetworkReply::readyRead, this, &QvHttpRequestHelper::onReadyRead_p);
|
||||||
}
|
}
|
||||||
|
|
||||||
// void QvHttpRequestHelper::post(const QString &url, const QByteArray
|
|
||||||
// &data)
|
|
||||||
//{
|
|
||||||
// this->setUrl(url);
|
|
||||||
// request.setRawHeader("Content-Type", "application/json");
|
|
||||||
// reply = accessManager.post(request, data);
|
|
||||||
// connect(reply, &QNetworkReply::finished, this,
|
|
||||||
// &QvHttpRequestHelper::onRequestFinished); connect(reply,
|
|
||||||
// &QNetworkReply::readyRead, this, &QvHttpRequestHelper::onReadyRead);
|
|
||||||
//}
|
|
||||||
|
|
||||||
// void QvHttpRequestHelper::put(const QString &url, const QByteArray
|
|
||||||
// &data)
|
|
||||||
// {
|
|
||||||
// this->setUrl(url);
|
|
||||||
// request.setRawHeader("Content-Type", "application/json");
|
|
||||||
// reply = accessManager.put(request, data);
|
|
||||||
// connect(reply, &QNetworkReply::finished, this,
|
|
||||||
// &QvHttpRequestHelper::onRequestFinished); connect(reply,
|
|
||||||
// &QNetworkReply::readyRead, this,
|
|
||||||
// &QvHttpRequestHelper::onReadyRead);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// void QvHttpRequestHelper::del(const QString &url)
|
|
||||||
// {
|
|
||||||
// this->setUrl(url);
|
|
||||||
// request.setRawHeader("Content-Type", "application/json");
|
|
||||||
// reply = accessManager.deleteResource(request);
|
|
||||||
// connect(reply, &QNetworkReply::finished, this,
|
|
||||||
// &QvHttpRequestHelper::onRequestFinished); connect(reply,
|
|
||||||
// &QNetworkReply::readyRead, this,
|
|
||||||
// &QvHttpRequestHelper::onReadyRead);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// void QvHttpRequestHelper::login(const QString &url, const QByteArray
|
|
||||||
// &data)
|
|
||||||
// {
|
|
||||||
// this->setUrl(url);
|
|
||||||
// request.setRawHeader("Content-Type",
|
|
||||||
// "application/x-www-form-urlencoded"); reply =
|
|
||||||
// accessManager.post(request, data); connect(reply,
|
|
||||||
// &QNetworkReply::finished, this,
|
|
||||||
// &QvHttpRequestHelper::onRequestFinished); connect(reply,
|
|
||||||
// &QNetworkReply::readyRead, this,
|
|
||||||
// &QvHttpRequestHelper::onReadyRead);
|
|
||||||
// }
|
|
||||||
|
|
||||||
void QvHttpRequestHelper::onRequestFinished_p()
|
void QvHttpRequestHelper::onRequestFinished_p()
|
||||||
{
|
{
|
||||||
if (reply->attribute(QNetworkRequest::HTTP2WasUsedAttribute).toBool())
|
if (reply->attribute(QNetworkRequest::HTTP2WasUsedAttribute).toBool())
|
||||||
@ -134,15 +93,15 @@ namespace Qv2ray::common
|
|||||||
QString error = QMetaEnum::fromType<QNetworkReply::NetworkError>().key(reply->error());
|
QString error = QMetaEnum::fromType<QNetworkReply::NetworkError>().key(reply->error());
|
||||||
LOG(MODULE_NETWORK, "Network request error string: " + error)
|
LOG(MODULE_NETWORK, "Network request error string: " + error)
|
||||||
QByteArray empty;
|
QByteArray empty;
|
||||||
emit httpRequestFinished(empty);
|
emit OnRequestFinished(empty);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
emit httpRequestFinished(this->data);
|
emit OnRequestFinished(this->data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void QvHttpRequestHelper::onReadyRead()
|
void QvHttpRequestHelper::onReadyRead_p()
|
||||||
{
|
{
|
||||||
DEBUG(MODULE_NETWORK, "A request is now ready read")
|
DEBUG(MODULE_NETWORK, "A request is now ready read")
|
||||||
this->data += reply->readAll();
|
this->data += reply->readAll();
|
||||||
|
@ -31,26 +31,18 @@ namespace Qv2ray::common
|
|||||||
public:
|
public:
|
||||||
explicit QvHttpRequestHelper(QObject *parent = nullptr);
|
explicit QvHttpRequestHelper(QObject *parent = nullptr);
|
||||||
~QvHttpRequestHelper();
|
~QvHttpRequestHelper();
|
||||||
bool setUrl(const QString &url);
|
|
||||||
void setHeader(const QByteArray &key, const QByteArray &value);
|
|
||||||
// get
|
// get
|
||||||
QByteArray syncget(const QString &url, bool useProxy);
|
void AsyncGet(const QString &url);
|
||||||
void get(const QString &url);
|
QByteArray Get(const QString &url, bool useProxy);
|
||||||
//// insert
|
|
||||||
// void post(const QString &url, const QByteArray &data);
|
|
||||||
//// update
|
|
||||||
// void put(const QString &url, const QByteArray &data);
|
|
||||||
//// delete
|
|
||||||
// void del(const QString &url);
|
|
||||||
// void login(const QString &url, const QByteArray &data);
|
|
||||||
signals:
|
signals:
|
||||||
void httpRequestFinished(QByteArray &data);
|
void OnRequestFinished(QByteArray &data);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onRequestFinished_p();
|
void onRequestFinished_p();
|
||||||
void onReadyRead();
|
void onReadyRead_p();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void setHeader(const QByteArray &key, const QByteArray &value);
|
||||||
QByteArray data;
|
QByteArray data;
|
||||||
QUrl url;
|
QUrl url;
|
||||||
QNetworkReply *reply;
|
QNetworkReply *reply;
|
||||||
|
@ -19,7 +19,7 @@ namespace Qv2ray::components
|
|||||||
QvUpdateChecker::QvUpdateChecker(QObject *parent) : QObject(parent)
|
QvUpdateChecker::QvUpdateChecker(QObject *parent) : QObject(parent)
|
||||||
{
|
{
|
||||||
requestHelper = new QvHttpRequestHelper(this);
|
requestHelper = new QvHttpRequestHelper(this);
|
||||||
connect(requestHelper, &QvHttpRequestHelper::httpRequestFinished, this, &QvUpdateChecker::VersionUpdate);
|
connect(requestHelper, &QvHttpRequestHelper::OnRequestFinished, this, &QvUpdateChecker::VersionUpdate);
|
||||||
}
|
}
|
||||||
QvUpdateChecker::~QvUpdateChecker()
|
QvUpdateChecker::~QvUpdateChecker()
|
||||||
{
|
{
|
||||||
@ -29,7 +29,7 @@ namespace Qv2ray::components
|
|||||||
#ifndef DISABLE_AUTO_UPDATE
|
#ifndef DISABLE_AUTO_UPDATE
|
||||||
auto updateChannel = GlobalConfig.updateConfig.updateChannel;
|
auto updateChannel = GlobalConfig.updateConfig.updateChannel;
|
||||||
LOG(MODULE_NETWORK, "Start checking update for channel ID: " + QSTRN(updateChannel))
|
LOG(MODULE_NETWORK, "Start checking update for channel ID: " + QSTRN(updateChannel))
|
||||||
requestHelper->get(UpdateChannelLink[updateChannel]);
|
requestHelper->AsyncGet(UpdateChannelLink[updateChannel]);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
void QvUpdateChecker::VersionUpdate(QByteArray &data)
|
void QvUpdateChecker::VersionUpdate(QByteArray &data)
|
||||||
|
@ -467,7 +467,7 @@ namespace Qv2ray::core::handlers
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
isHttpRequestInProgress = true;
|
isHttpRequestInProgress = true;
|
||||||
auto data = httpHelper->syncget(groups[id].address, useSystemProxy);
|
auto data = httpHelper->Get(groups[id].address, useSystemProxy);
|
||||||
isHttpRequestInProgress = false;
|
isHttpRequestInProgress = false;
|
||||||
return CHUpdateSubscription_p(id, data);
|
return CHUpdateSubscription_p(id, data);
|
||||||
}
|
}
|
||||||
|
@ -131,6 +131,11 @@ PreferencesWindow::PreferencesWindow(QWidget *parent) : QDialog(parent), Current
|
|||||||
pluginKernelV2rayIntegrationCB->setChecked(CurrentConfig.pluginConfig.v2rayIntegration);
|
pluginKernelV2rayIntegrationCB->setChecked(CurrentConfig.pluginConfig.v2rayIntegration);
|
||||||
pluginKernelPortAllocateCB->setValue(CurrentConfig.pluginConfig.portAllocationStart);
|
pluginKernelPortAllocateCB->setValue(CurrentConfig.pluginConfig.portAllocationStart);
|
||||||
//
|
//
|
||||||
|
qvProxyPortCB->setValue(CurrentConfig.networkConfig.port);
|
||||||
|
qvProxyAddressTxt->setText(CurrentConfig.networkConfig.address);
|
||||||
|
qvProxyTypeCombo->setCurrentText(CurrentConfig.networkConfig.type);
|
||||||
|
qvNetworkUATxt->setText(CurrentConfig.networkConfig.userAgent);
|
||||||
|
qvUseProxyCB->setChecked(CurrentConfig.networkConfig.useCustomProxy);
|
||||||
//
|
//
|
||||||
DNSListTxt->clear();
|
DNSListTxt->clear();
|
||||||
for (auto dnsStr : CurrentConfig.connectionConfig.dnsList)
|
for (auto dnsStr : CurrentConfig.connectionConfig.dnsList)
|
||||||
@ -1113,3 +1118,34 @@ void PreferencesWindow::on_pluginKernelPortAllocateCB_valueChanged(int arg1)
|
|||||||
LOADINGCHECK
|
LOADINGCHECK
|
||||||
CurrentConfig.pluginConfig.portAllocationStart = arg1;
|
CurrentConfig.pluginConfig.portAllocationStart = arg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PreferencesWindow::on_qvProxyAddressTxt_textEdited(const QString &arg1)
|
||||||
|
{
|
||||||
|
LOADINGCHECK
|
||||||
|
CurrentConfig.networkConfig.address = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PreferencesWindow::on_qvProxyTypeCombo_currentTextChanged(const QString &arg1)
|
||||||
|
{
|
||||||
|
LOADINGCHECK
|
||||||
|
CurrentConfig.networkConfig.type = arg1.toLower();
|
||||||
|
}
|
||||||
|
|
||||||
|
void PreferencesWindow::on_qvProxyPortCB_valueChanged(int arg1)
|
||||||
|
{
|
||||||
|
LOADINGCHECK
|
||||||
|
CurrentConfig.networkConfig.port = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PreferencesWindow::on_qvNetworkUATxt_textEdited(const QString &arg1)
|
||||||
|
{
|
||||||
|
LOADINGCHECK
|
||||||
|
CurrentConfig.networkConfig.userAgent = arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PreferencesWindow::on_qvUseProxyCB_stateChanged(int arg1)
|
||||||
|
{
|
||||||
|
|
||||||
|
LOADINGCHECK
|
||||||
|
CurrentConfig.networkConfig.useCustomProxy = arg1 == Qt::Checked;
|
||||||
|
}
|
||||||
|
@ -160,6 +160,16 @@ class PreferencesWindow
|
|||||||
|
|
||||||
void on_pluginKernelPortAllocateCB_valueChanged(int arg1);
|
void on_pluginKernelPortAllocateCB_valueChanged(int arg1);
|
||||||
|
|
||||||
|
void on_qvProxyAddressTxt_textEdited(const QString &arg1);
|
||||||
|
|
||||||
|
void on_qvProxyTypeCombo_currentTextChanged(const QString &arg1);
|
||||||
|
|
||||||
|
void on_qvProxyPortCB_valueChanged(int arg1);
|
||||||
|
|
||||||
|
void on_qvNetworkUATxt_textEdited(const QString &arg1);
|
||||||
|
|
||||||
|
void on_qvUseProxyCB_stateChanged(int arg1);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//
|
//
|
||||||
RouteSettingsMatrixWidget *routeSettingsWidget;
|
RouteSettingsMatrixWidget *routeSettingsWidget;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>600</width>
|
<width>582</width>
|
||||||
<height>409</height>
|
<height>404</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -45,93 +45,84 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="title">
|
<property name="text">
|
||||||
<string>Route Settings</string>
|
<string>Lines start with "geoip:" or "geosite:" will have its autocompletion from geoip.dat and geosite.dat</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Lines start with "geoip:" or "geosite:" will have its autocompletion from geoip.dat and geosite.dat</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QGridLayout" name="gridLayout" rowstretch="0,1,1" columnstretch="0,1,1,1">
|
|
||||||
<item row="0" column="3">
|
|
||||||
<widget class="QLabel" name="label_82">
|
|
||||||
<property name="text">
|
|
||||||
<string>Block</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="3">
|
|
||||||
<layout class="QGridLayout" name="blockTxtLayout"/>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="label_80">
|
|
||||||
<property name="text">
|
|
||||||
<string>Direct</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Domain</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<layout class="QGridLayout" name="directTxtLayout"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<layout class="QGridLayout" name="proxyIPLayout"/>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QLabel" name="label_81">
|
|
||||||
<property name="text">
|
|
||||||
<string>Proxy</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="2">
|
|
||||||
<layout class="QGridLayout" name="proxyTxtLayout"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="3">
|
|
||||||
<layout class="QGridLayout" name="blockIPLayout"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>IP</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<layout class="QGridLayout" name="directIPLayout"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QGridLayout" name="gridLayout" rowstretch="0,1,1" columnstretch="0,1,1,1">
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QLabel" name="label_82">
|
||||||
|
<property name="text">
|
||||||
|
<string>Block</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="3">
|
||||||
|
<layout class="QGridLayout" name="blockTxtLayout"/>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLabel" name="label_80">
|
||||||
|
<property name="text">
|
||||||
|
<string>Direct</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Domain</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<layout class="QGridLayout" name="directTxtLayout"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<layout class="QGridLayout" name="proxyIPLayout"/>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QLabel" name="label_81">
|
||||||
|
<property name="text">
|
||||||
|
<string>Proxy</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<layout class="QGridLayout" name="proxyTxtLayout"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3">
|
||||||
|
<layout class="QGridLayout" name="blockIPLayout"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>IP</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<layout class="QGridLayout" name="directIPLayout"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
|
Loading…
Reference in New Issue
Block a user