Skip to content

Commit

Permalink
v2.12.4
Browse files Browse the repository at this point in the history
  • Loading branch information
bernerdad committed Nov 5, 2024
1 parent 2bfdacc commit f6a061d
Show file tree
Hide file tree
Showing 12 changed files with 63 additions and 22 deletions.
4 changes: 4 additions & 0 deletions backend/linux/helper/firewallcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ void FirewallController::removeInclusiveAppRules()

void FirewallController::setSplitTunnelIngressRules(const std::string &defaultAdapterIp)
{
if (defaultAdapterIp.empty()) {
return;
}

if (!connected_ || !splitTunnelEnabled_ || splitTunnelExclude_) {
Utils::executeCommand("iptables", {"-D", "PREROUTING", "-t", "mangle", "-d", defaultAdapterIp.c_str(), "-j", "CONNMARK", "--set-mark", CGroups::instance().mark(), "-m", "comment", "--comment", kTag});
Utils::executeCommand("iptables", {"-D", "OUTPUT", "-t", "mangle", "-j", "CONNMARK", "--restore-mark", "-m", "comment", "--comment", kTag});
Expand Down
13 changes: 13 additions & 0 deletions client/base/backend/preferences/preferenceshelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,16 @@ bool PreferencesHelper::getIpv6StateInOS() const
return bIpv6StateInOS_;
}
#endif

void PreferencesHelper::setCurrentProtocol(const types::Protocol &protocol)
{
if (currentProtocol_ != protocol) {
currentProtocol_ = protocol;
emit currentProtocolChanged(currentProtocol_);
}
}

types::Protocol PreferencesHelper::currentProtocol() const
{
return currentProtocol_;
}
7 changes: 7 additions & 0 deletions client/base/backend/preferences/preferenceshelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <QVector>
#include "api_responses/portmap.h"
#include "types/enums.h"
#include "types/protocol.h"

class PreferencesHelper : public QObject
{
Expand Down Expand Up @@ -32,6 +33,9 @@ class PreferencesHelper : public QObject
void setIsExternalConfigMode(bool b);
bool isExternalConfigMode() const;

void setCurrentProtocol(const types::Protocol &protocol);
types::Protocol currentProtocol() const;

#ifdef Q_OS_WIN
void setIpv6StateInOS(bool bEnabled);
bool getIpv6StateInOS() const;
Expand All @@ -45,6 +49,7 @@ class PreferencesHelper : public QObject
void installedTapAdapterChanged(TAP_ADAPTER_TYPE tapAdapter);
void isDockedModeChanged(bool bIsDockedToTray);
void isExternalConfigModeChanged(bool bIsExternalConfigMode);
void currentProtocolChanged(const types::Protocol &protocol);

private:
QStringList availableLanguageCodes_;
Expand All @@ -57,4 +62,6 @@ class PreferencesHelper : public QObject

bool isDockedToTray_;
bool isExternalConfigMode_;

types::Protocol currentProtocol_;
};
9 changes: 9 additions & 0 deletions client/common/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2.12.4 (05/11/2024)
Windows:
* Fixed UDP protocol still failing to connect for some users when Circumvent Censorship is enabled. #1153
* Fixed "Secure Hotspot" feature not being disabled properly when using IKEv2. #1178
Linux:
* Fixed possible delay when setting firewall rules. #1177
* Fixed update not working in Silverblue while connected. #1180


2.12.3 (30/10/2024)
All:
* Added link to website for "Circumvent Censorship". #1175
Expand Down
6 changes: 3 additions & 3 deletions client/common/version/windscribe_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

#define WINDSCRIBE_MAJOR_VERSION 2
#define WINDSCRIBE_MINOR_VERSION 12
#define WINDSCRIBE_BUILD_VERSION 3
#define WINDSCRIBE_BUILD_VERSION 4

// only one of these should be enabled; neither -> stable
//#define WINDSCRIBE_IS_BETA
#define WINDSCRIBE_IS_GUINEA_PIG
#define WINDSCRIBE_IS_BETA
//#define WINDSCRIBE_IS_GUINEA_PIG

#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)
Expand Down
1 change: 1 addition & 0 deletions client/gui/connectwindow/connectwindowitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ void ConnectWindowItem::setInternetConnectivity(bool connectivity)
void ConnectWindowItem::setProtocolPort(const types::Protocol &protocol, const uint port)
{
connectStateProtocolPort_->setProtocolPort(protocol, port);
preferencesHelper_->setCurrentProtocol(protocol);
}

void ConnectWindowItem::onNetworkHoverEnter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ ConnectionWindowItem::ConnectionWindowItem(ScalableGraphicsObject *parent, Prefe
connect(preferences, &Preferences::connectedDnsInfoChanged, this, &ConnectionWindowItem::onConnectedDnsPreferencesChanged);
connect(preferences_, &Preferences::shareSecureHotspotChanged, this, &ConnectionWindowItem::onSecureHotspotPreferencesChanged);
connect(preferences_, &Preferences::shareProxyGatewayChanged, this, &ConnectionWindowItem::onProxyGatewayPreferencesChanged);
connect(preferences_, &Preferences::connectionSettingsChanged, this, &ConnectionWindowItem::onConnectionSettingsPreferencesChanged);
connect(preferencesHelper, &PreferencesHelper::wifiSharingSupportedChanged, this, &ConnectionWindowItem::onPreferencesHelperWifiSharingSupportedChanged);
connect(preferencesHelper, &PreferencesHelper::isExternalConfigModeChanged, this, &ConnectionWindowItem::onIsExternalConfigModeChanged);
connect(preferencesHelper, &PreferencesHelper::proxyGatewayAddressChanged, this, &ConnectionWindowItem::onProxyGatewayAddressChanged);
connect(preferencesHelper, &PreferencesHelper::currentProtocolChanged, this, &ConnectionWindowItem::onPreferencesHelperCurrentProtocolChanged);
connect(preferences, &Preferences::isTerminateSocketsChanged, this, &ConnectionWindowItem::onTerminateSocketsPreferencesChanged);
connect(preferences, &Preferences::isAntiCensorshipChanged, this, &ConnectionWindowItem::onAntiCensorshipPreferencesChanged);
connect(preferences, &Preferences::isAutoConnectChanged, this, &ConnectionWindowItem::onIsAutoConnectPreferencesChanged);
Expand Down Expand Up @@ -143,7 +143,7 @@ ConnectionWindowItem::ConnectionWindowItem(ScalableGraphicsObject *parent, Prefe
QString("https://%1/features/secure-hotspot").arg(HardcodedSettings::instance().windscribeServerUrl()));
connect(secureHotspotGroup_, &SecureHotspotGroup::secureHotspotPreferencesChanged, this, &ConnectionWindowItem::onSecureHotspotPreferencesChangedByUser);
secureHotspotGroup_->setSecureHotspotSettings(preferences->shareSecureHotspot());
updateIsSupported(preferencesHelper_->isWifiSharingSupported(), isIkev2(preferences_->connectionSettings()));
updateIsSecureHotspotSupported();
addItem(secureHotspotGroup_);
#endif

Expand Down Expand Up @@ -433,11 +433,6 @@ void ConnectionWindowItem::onSecureHotspotPreferencesChanged(const types::ShareS
#endif
}

void ConnectionWindowItem::onConnectionSettingsPreferencesChanged(const types::ConnectionSettings &cs)
{
updateIsSupported(preferencesHelper_->isWifiSharingSupported(), isIkev2(cs));
}

void ConnectionWindowItem::onProxyGatewayPreferencesChangedByUser(const types::ShareProxyGateway &sp)
{
preferences_->setShareProxyGateway(sp);
Expand All @@ -464,21 +459,26 @@ void ConnectionWindowItem::onProxyGatewayPreferencesChanged(const types::SharePr

void ConnectionWindowItem::onPreferencesHelperWifiSharingSupportedChanged(bool bSupported)
{
updateIsSupported(bSupported, isIkev2(preferences_->connectionSettings()));
updateIsSecureHotspotSupported();
}

void ConnectionWindowItem::onPreferencesHelperCurrentProtocolChanged(const types::Protocol &protocol)
{
updateIsSecureHotspotSupported();
}

bool ConnectionWindowItem::isIkev2(const types::ConnectionSettings &cs) const
{
return cs.protocol() == types::Protocol::IKEV2;
}

void ConnectionWindowItem::updateIsSupported(bool isWifiSharingSupported, bool isIkev2)
void ConnectionWindowItem::updateIsSecureHotspotSupported()
{
#if defined(Q_OS_WIN)
if (secureHotspotGroup_) {
if (!isWifiSharingSupported) {
if (!preferencesHelper_->isWifiSharingSupported()) {
secureHotspotGroup_->setSupported(SecureHotspotGroup::HOTSPOT_NOT_SUPPORTED);
} else if (isIkev2) {
} else if (preferencesHelper_->currentProtocol().isIkev2Protocol()) {
secureHotspotGroup_->setSupported(SecureHotspotGroup::HOTSPOT_NOT_SUPPORTED_BY_IKEV2);
} else {
secureHotspotGroup_->setSupported(SecureHotspotGroup::HOTSPOT_SUPPORTED);
Expand All @@ -496,5 +496,4 @@ void ConnectionWindowItem::onIsAutoConnectPreferencesChanged(bool b)
{
checkBoxAutoConnect_->setState(b);
}

} // namespace PreferencesWindow
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ private slots:
void onAllowLanTrafficButtonHoverLeave();
void onConnectedDnsPreferencesChanged(const types::ConnectedDnsInfo &dns);
void onSecureHotspotPreferencesChanged(const types::ShareSecureHotspot &ss);
void onConnectionSettingsPreferencesChanged(const types::ConnectionSettings &cs);
void onProxyGatewayAddressChanged(const QString &address);
void onProxyGatewayPreferencesChanged(const types::ShareProxyGateway &sp);
void onPreferencesHelperWifiSharingSupportedChanged(bool bSupported);
void onPreferencesHelperCurrentProtocolChanged(const types::Protocol &protocol);
void onIsExternalConfigModeChanged(bool bIsExternalConfigMode);
void onTerminateSocketsPreferencesChanged(bool b);
void onAntiCensorshipPreferencesChanged(bool b);
Expand Down Expand Up @@ -107,7 +107,7 @@ private slots:
ProxyGatewayGroup *proxyGatewayGroup_;

bool isIkev2(const types::ConnectionSettings &cs) const;
void updateIsSupported(bool isWifiSharingSupported, bool isIkev2);
void updateIsSecureHotspotSupported();

CONNECTION_SCREEN_TYPE currentScreen_;
};
Expand Down
2 changes: 1 addition & 1 deletion installer/linux/cli/overlay/etc/windscribe/install-update
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [ $platform = "linux_deb_x64_cli" ]; then
elif [ $platform = "linux_rpm_x64_cli" ]; then
if command -v rpm-ostree; then
cmd=""
killall -q -w Windscribe && rpm-ostree upgrade --reboot --uninstall windscribe --install "$1"
killall -q -w Windscribe && rpm-ostree upgrade --cache-only --reboot --uninstall windscribe --install "$1"
else
cmd="killall -q -w Windscribe && dnf upgrade -y \"$1\""
fi
Expand Down
2 changes: 1 addition & 1 deletion installer/linux/gui/overlay/etc/windscribe/install-update
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if [ $platform == "linux_deb_x64" -o $platform == "linux_deb_arm64" ]; then
pkexec sh -c "killall -q -w Windscribe && APT_LISTBUGS_FRONTEND=none apt install -y --reinstall \"$1\""
elif [ $platform == "linux_rpm_x64" ]; then
if command -v rpm-ostree; then
killall -q -w Windscribe && rpm-ostree upgrade --reboot --uninstall windscribe --install "$1"
killall -q -w Windscribe && rpm-ostree upgrade --cache-only --reboot --uninstall windscribe --install "$1"
else
pkexec sh -c "killall -q -w Windscribe && dnf upgrade -y \"$1\""
fi
Expand Down
12 changes: 10 additions & 2 deletions tools/vcpkg/ports/openvpn/anti-censorship.patch
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ index bfc1253b..da66ca16 100644
unsigned int sockflags;
int mark;
const char *bind_dev;
@@ -1173,6 +1175,61 @@ link_socket_write_udp(struct link_socket *sock,
@@ -1173,6 +1175,66 @@ link_socket_write_udp(struct link_socket *sock,
struct buffer *buf,
struct link_socket_actual *to)
{
Expand Down Expand Up @@ -172,8 +172,16 @@ index bfc1253b..da66ca16 100644
+ }
+
#ifdef _WIN32
return link_socket_write_win32(sock, buf, to);
- return link_socket_write_win32(sock, buf, to);
+ for (int k=0; k<30; k++) {
+ int ret = link_socket_write_win32(sock, buf, to);
+ if (ret != -1) return ret;
+ Sleep(10);
+ }
+ return link_socket_write_win32(sock, buf, to);
#else
return link_socket_write_udp_posix(sock, buf, to);
#endif
diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c
index 12bc85f9..c33a801a 100644
--- a/src/openvpn/ssl.c
Expand Down
2 changes: 1 addition & 1 deletion tools/vcpkg/ports/openvpn/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "openvpn",
"version": "2.6.12",
"port-version": 2,
"port-version": 4,
"description": "OpenVPN is an open source VPN daemon",
"homepage": "https://github.com/OpenVPN/openvpn",
"dependencies": [
Expand Down

0 comments on commit f6a061d

Please sign in to comment.