mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 13:50:12 +08:00
always enable auto redirect on linux
This commit is contained in:
parent
3dac241380
commit
5895f9f590
@ -113,7 +113,6 @@ namespace NekoGui {
|
||||
|
||||
// VPN
|
||||
bool fake_dns = false;
|
||||
bool auto_redirect = true;
|
||||
#ifdef Q_OS_MACOS
|
||||
QString vpn_implementation = "gvisor";
|
||||
#else
|
||||
|
||||
@ -93,20 +93,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="auto_redir">
|
||||
<property name="text">
|
||||
<string>Auto Redirect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@ -498,7 +498,7 @@ namespace NekoGui {
|
||||
inboundObj["stack"] = dataStore->vpn_implementation;
|
||||
inboundObj["strict_route"] = dataStore->vpn_strict_route;
|
||||
#ifdef Q_OS_LINUX
|
||||
inboundObj["auto_redirect"] = dataStore->auto_redirect;
|
||||
inboundObj["auto_redirect"] = true;
|
||||
#endif
|
||||
auto tunAddress = QJsonArray{"172.19.0.1/24"};
|
||||
if (dataStore->vpn_ipv6) tunAddress += "fdfe:dcba:9876::1/96";
|
||||
|
||||
@ -274,7 +274,6 @@ namespace NekoGui {
|
||||
_add(new configItem("vpn_mtu", &vpn_mtu, itemType::integer));
|
||||
_add(new configItem("vpn_ipv6", &vpn_ipv6, itemType::boolean));
|
||||
_add(new configItem("vpn_strict_route", &vpn_strict_route, itemType::boolean));
|
||||
_add(new configItem("auto_redirect", &auto_redirect, itemType::boolean));
|
||||
_add(new configItem("sub_clear", &sub_clear, itemType::boolean));
|
||||
_add(new configItem("sub_insecure", &sub_insecure, itemType::boolean));
|
||||
_add(new configItem("sub_auto_update", &sub_auto_update, itemType::integer));
|
||||
|
||||
@ -15,10 +15,6 @@ DialogVPNSettings::DialogVPNSettings(QWidget *parent) : QDialog(parent), ui(new
|
||||
ui->vpn_implementation->setCurrentText(NekoGui::dataStore->vpn_implementation);
|
||||
ui->vpn_mtu->setCurrentText(Int2String(NekoGui::dataStore->vpn_mtu));
|
||||
ui->vpn_ipv6->setChecked(NekoGui::dataStore->vpn_ipv6);
|
||||
ui->auto_redir->setChecked(NekoGui::dataStore->auto_redirect);
|
||||
#ifndef __linux__
|
||||
ui->auto_redir->setVisible(false);
|
||||
#endif
|
||||
ui->strict_route->setChecked(NekoGui::dataStore->vpn_strict_route);
|
||||
ADJUST_SIZE
|
||||
}
|
||||
@ -35,7 +31,6 @@ void DialogVPNSettings::accept() {
|
||||
NekoGui::dataStore->vpn_mtu = mtu;
|
||||
NekoGui::dataStore->vpn_ipv6 = ui->vpn_ipv6->isChecked();
|
||||
NekoGui::dataStore->vpn_strict_route = ui->strict_route->isChecked();
|
||||
NekoGui::dataStore->auto_redirect = ui->auto_redir->isChecked();
|
||||
//
|
||||
QStringList msg{"UpdateDataStore"};
|
||||
msg << "VPNChanged";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user