Some pretty fixes
This commit is contained in:
parent
2206b4a2dd
commit
a120f3d5bd
7 changed files with 12 additions and 13 deletions
|
|
@ -192,7 +192,7 @@ bool WindowsFirewall::enableInterface(int vpnAdapterIndex) {
|
||||||
}
|
}
|
||||||
IPAddress allv6("::/0");
|
IPAddress allv6("::/0");
|
||||||
if (!blockTrafficTo(allv6, MED_WEIGHT,
|
if (!blockTrafficTo(allv6, MED_WEIGHT,
|
||||||
"Block Internet", "killswitch")) {
|
"Block Internet", "killswitch")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
|
|
@ -203,8 +203,8 @@ bool WindowsFirewall::enableInterface(int vpnAdapterIndex) {
|
||||||
FW_OK(allowTrafficForAppOnAll(getCurrentPath(), MAX_WEIGHT,
|
FW_OK(allowTrafficForAppOnAll(getCurrentPath(), MAX_WEIGHT,
|
||||||
"Allow all for AmneziaVPN.exe"));
|
"Allow all for AmneziaVPN.exe"));
|
||||||
FW_OK(blockTrafficOnPort(53, MED_WEIGHT, "Block all DNS"));
|
FW_OK(blockTrafficOnPort(53, MED_WEIGHT, "Block all DNS"));
|
||||||
FW_OK(
|
FW_OK(allowLoopbackTraffic(MED_WEIGHT,
|
||||||
allowLoopbackTraffic(MED_WEIGHT, "Allow Loopback traffic on device %1"));
|
"Allow Loopback traffic on device %1"));
|
||||||
|
|
||||||
logger.debug() << "Killswitch on! Rules:" << m_activeRules.length();
|
logger.debug() << "Killswitch on! Rules:" << m_activeRules.length();
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -290,7 +290,7 @@ bool WindowsFirewall::enablePeerTraffic(const InterfaceConfig& config) {
|
||||||
logger.debug() << "excludedAddresses range: " << i;
|
logger.debug() << "excludedAddresses range: " << i;
|
||||||
|
|
||||||
if (!allowTrafficTo(i, HIGH_WEIGHT,
|
if (!allowTrafficTo(i, HIGH_WEIGHT,
|
||||||
"Allow Ecxlude route", config.m_serverPublicKey)) {
|
"Allow Ecxlude route", config.m_serverPublicKey)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,6 @@ void SettingsController::toggleKillSwitch(bool enable)
|
||||||
} else {
|
} else {
|
||||||
emit strictKillSwitchEnabledChanged(isStrictKillSwitchEnabled());
|
emit strictKillSwitchEnabledChanged(isStrictKillSwitchEnabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SettingsController::isStrictKillSwitchEnabled()
|
bool SettingsController::isStrictKillSwitchEnabled()
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ PageType {
|
||||||
Layout.leftMargin: 16
|
Layout.leftMargin: 16
|
||||||
Layout.rightMargin: 16
|
Layout.rightMargin: 16
|
||||||
|
|
||||||
headerText: qsTr("Kill Switch")
|
headerText: qsTr("KillSwitch")
|
||||||
descriptionText: qsTr("Enable to ensure network traffic goes through a secure VPN tunnel, preventing accidental exposure of your IP and DNS queries if the connection drops")
|
descriptionText: qsTr("Enable to ensure network traffic goes through a secure VPN tunnel, preventing accidental exposure of your IP and DNS queries if the connection drops")
|
||||||
|
|
||||||
showSwitcher: true
|
showSwitcher: true
|
||||||
|
|
@ -65,7 +65,7 @@ PageType {
|
||||||
enabled: SettingsController.isKillSwitchEnabled && !ConnectionController.isConnected
|
enabled: SettingsController.isKillSwitchEnabled && !ConnectionController.isConnected
|
||||||
checked: !SettingsController.strictKillSwitchEnabled
|
checked: !SettingsController.strictKillSwitchEnabled
|
||||||
|
|
||||||
text: qsTr("Soft Kill Switch")
|
text: qsTr("Soft KillSwitch")
|
||||||
descriptionText: qsTr("Internet connection is blocked if VPN connection drops accidentally")
|
descriptionText: qsTr("Internet connection is blocked if VPN connection drops accidentally")
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
@ -84,7 +84,7 @@ PageType {
|
||||||
enabled: SettingsController.isKillSwitchEnabled && !ConnectionController.isConnected
|
enabled: SettingsController.isKillSwitchEnabled && !ConnectionController.isConnected
|
||||||
checked: SettingsController.strictKillSwitchEnabled
|
checked: SettingsController.strictKillSwitchEnabled
|
||||||
|
|
||||||
text: qsTr("Strict Kill Switch")
|
text: qsTr("Strict KillSwitch")
|
||||||
descriptionText: qsTr("Internet connection is blocked even if VPN was turned off manually or not started")
|
descriptionText: qsTr("Internet connection is blocked even if VPN was turned off manually or not started")
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ public:
|
||||||
bool refresh(bool enabled);
|
bool refresh(bool enabled);
|
||||||
bool disableKillSwitch();
|
bool disableKillSwitch();
|
||||||
bool disableAllTraffic();
|
bool disableAllTraffic();
|
||||||
bool enablePeerTraffic( const QJsonObject &configStr);
|
bool enablePeerTraffic(const QJsonObject &configStr);
|
||||||
bool enableKillSwitch( const QJsonObject &configStr, int vpnAdapterIndex);
|
bool enableKillSwitch(const QJsonObject &configStr, int vpnAdapterIndex);
|
||||||
bool allowTrafficTo(const QStringList &ranges);
|
bool allowTrafficTo(const QStringList &ranges);
|
||||||
bool isStrictKillSwitchEnabled();
|
bool isStrictKillSwitchEnabled();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue