Skip to content

Commit bca1850

Browse files
committed
v2.11.5
1 parent 0281aed commit bca1850

File tree

200 files changed

+4291
-2932
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+4291
-2932
lines changed

Dockerfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
FROM ubuntu:22.04
2-
1+
FROM ubuntu:20.04
32
COPY ./tools/requirements.txt /r/
3+
ENV PATH=/opt/cmake/bin:$PATH
44
ENV DEBIAN_FRONTEND=noninteractive
5-
RUN apt update && apt install -y build-essential cmake git curl patchelf libpam0g-dev software-properties-common libgl1-mesa-dev fakeroot python3-pip zip unzip libnl-genl-3-dev pkg-config libcap-ng-dev wget autoconf libtool libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev golang \
6-
&& python3 -m pip install -r /r/requirements.txt
5+
RUN apt update && apt install -y build-essential cmake git curl patchelf libpam0g-dev software-properties-common libgl1-mesa-dev fakeroot python3-pip zip unzip libnl-genl-3-dev pkg-config libcap-ng-dev wget autoconf libtool libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev
6+
RUN python3 -m pip install -r /r/requirements.txt
7+
8+
RUN wget https://go.dev/dl/go1.22.5.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.5.linux-amd64.tar.gz
9+
RUN ln -sf /usr/local/go/bin/go /usr/local/bin/go
10+
11+
RUN wget https://cmake.org/files/v3.29/cmake-3.29.6-linux-x86_64.sh && mkdir -p /opt/cmake && yes | sh cmake-3.29.6-linux-x86_64.sh --prefix=/opt/cmake
12+
RUN ln -sf /opt/cmake/cmake-3.29.6-linux-x86_64/bin/cmake /usr/bin/cmake
713

814
WORKDIR /w

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This repo contains the complete source code for the Windscribe 2.0 app. This inc
1515
- Install Ninja v1.10.2 from [here](https://github.com/ninja-build/ninja/releases)
1616
- Install vcpkg from [here]((https://vcpkg.io/en/getting-started.html)
1717
- Create a `VCPKG_ROOT` environment variable referencing the full path to your vcpkg install folder.
18-
- Go to the vcpkg directory and `git checkout a664e41ee50b61adcc90a44a761eca139a4b7dd7~`, since versions beyond this will fail to build with the current baseline.
18+
- Go to the vcpkg directory and `git checkout 576379156e82da642f8d1834220876759f13534d`.
1919
- Do the bootstrap step after the above command.
2020
- Verify the following entries are in your System `PATH` environment variable. If they are not, add them to the System `PATH` environment variable and reboot.
2121
- `C:\Program Files\Git\cmd`
@@ -113,7 +113,7 @@ See `build_all --help` for other build options.
113113
- Install CMake v3.28.x or newer from [here](https://cmake.org/download/) and make sure that the cmake executable is in the path and available for execution. The project will build with older versions of CMake, but you may encounter some warnings.
114114
- Install vcpkg from [here](https://vcpkg.io/en/getting-started.html)
115115
- Create a `VCPKG_ROOT` environment variable referencing the full path to your vcpkg install folder.
116-
- Go to the vcpkg directory and `git checkout a664e41ee50b61adcc90a44a761eca139a4b7dd7~`, since versions beyond this will fail to build with the current baseline.
116+
- Go to the vcpkg directory and `git checkout 576379156e82da642f8d1834220876759f13534d`.
117117
- Do the bootstrap step after the above command.
118118
- Clone the repository.
119119
- Install python deps:
@@ -164,7 +164,7 @@ The repository contains Dockerfile to simplify building process. Skip all the ot
164164
```
165165
- Install vcpkg:
166166
```bash
167-
sudo docker run --rm -v .:/w ws-builder /bin/bash -c "git clone https://github.com/Microsoft/vcpkg.git && ./vcpkg/bootstrap-vcpkg.sh --disableMetrics"
167+
sudo docker run --rm -v .:/w ws-builder /bin/bash -c "git clone https://github.com/Microsoft/vcpkg.git && git checkout 576379156e82da642f8d1834220876759f13534d && ./vcpkg/bootstrap-vcpkg.sh --disableMetrics"
168168
```
169169
- Build all the dependencies:
170170
```bash
@@ -190,7 +190,7 @@ Build process tested on Ubuntu 20.04/ZorinOS 16 (gcc 9.3.0).
190190
```
191191
- Install vcpkg from [here](https://vcpkg.io/en/getting-started.html)
192192
- Create a `VCPKG_ROOT` environment variable referencing the full path to your vcpkg install folder.
193-
- Go to the vcpkg directory and `git checkout a664e41ee50b61adcc90a44a761eca139a4b7dd7~`, since versions beyond this will fail to build with the current baseline.
193+
- Go to the vcpkg directory and `git checkout 576379156e82da642f8d1834220876759f13534d`.
194194
- Do the bootstrap step after the above command.
195195
- Install golang (minimum version 1.18): follow instructions from `https://go.dev/doc/install`
196196
- Clone the repository.

backend/linux/helper/process_command.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ CMD_ANSWER startCtrld(boost::archive::text_iarchive &ia)
360360
Logger::instance().out("Starting ctrld");
361361

362362
// Validate URLs
363-
if (!Utils::isValidUrl(cmd.upstream1) || (!cmd.upstream2.empty() && !Utils::isValidUrl(cmd.upstream2))) {
363+
if (cmd.upstream1.empty() || Utils::normalizeAddress(cmd.upstream1).empty() || (!cmd.upstream2.empty() && Utils::normalizeAddress(cmd.upstream2).empty())) {
364364
Logger::instance().out("Invalid upstream URL(s)");
365365
answer.executed = 0;
366366
return answer;

backend/linux/helper/split_tunneling/hostnames_manager/dns_resolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ DnsResolver::DnsResolver(std::function<void (std::map<std::string, HostInfo>)> r
1212
}, false);
1313

1414

15-
if (!WSNet::initialize("", "", false, "")) {
15+
if (!WSNet::initialize("", "", "", "", "", false, "")) {
1616
Logger::instance().out("WSNet::initialize failed");
1717
}
1818

backend/linux/helper/utils.cpp

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -172,34 +172,38 @@ bool isValidIpAddress(const std::string &address)
172172
return inet_pton(AF_INET, address.c_str(), &(sa.sin_addr)) != 0;
173173
}
174174

175-
bool isValidUrl(const std::string &address)
175+
bool isValidDomain(const std::string &address)
176176
{
177177
if (isValidIpAddress(address)) {
178-
return true;
178+
return false;
179179
}
180180

181-
auto url = skyr::parse(address);
182-
// parsing still "succeeds" if there are invalid characters in the URL e.g. if there are characters which are invalid after the domain.
183-
// check that the serialized URL is the same as the original.
184-
if (!url || skyr::serialize(url.value()) != address) {
181+
auto domain = skyr::parse_host(address);
182+
if (!domain) {
185183
return false;
186184
}
187185

188186
return true;
189187
}
190188

191-
bool isValidDomain(const std::string &address)
189+
std::string normalizeAddress(const std::string &address)
192190
{
191+
std::string addr = address;
192+
193193
if (isValidIpAddress(address)) {
194-
return false;
194+
return addr;
195195
}
196196

197-
auto domain = skyr::parse_host(address);
198-
if (!domain) {
199-
return false;
197+
if (isValidDomain(address)) {
198+
return addr;
200199
}
201200

202-
return true;
201+
auto url = skyr::parse(address);
202+
if (!url) {
203+
return "";
204+
}
205+
206+
return skyr::serialize(url.value());
203207
}
204208

205209
} // namespace Utils

backend/linux/helper/utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ namespace Utils
4040
std::string getExePath();
4141

4242
// check if a string is a valid address
43+
std::string normalizeAddress(const std::string &address);
4344
bool isValidIpAddress(const std::string &address);
44-
bool isValidUrl(const std::string &address);
4545
bool isValidDomain(const std::string &address);
4646
};

backend/mac/helper/helper-info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<key>CFBundleName</key>
1010
<string>WindscribeHelper</string>
1111
<key>CFBundleVersion</key>
12-
<string>69</string>
12+
<string>73</string>
1313
<key>NSHumanReadableCopyright</key>
1414
<string>Copyright © 2024 Windscribe Limited. All rights reserved.</string>
1515
<key>LSMinimumSystemVersion</key>

backend/mac/helper/ip_hostnames/ares_library_init.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ AresLibraryInit::~AresLibraryInit()
1919
void AresLibraryInit::init()
2020
{
2121
if (!init_ && !failedInit_) {
22-
int status = ares_library_init(ARES_LIB_INIT_ALL);
23-
if (status != ARES_SUCCESS) {
24-
Logger::instance().out("ares_library_init failed: %s", ares_strerror(status));
25-
failedInit_ = true;
26-
} else {
27-
init_ = true;
28-
}
22+
int status = ares_library_init(ARES_LIB_INIT_ALL);
23+
if (status != ARES_SUCCESS) {
24+
Logger::instance().out("ares_library_init failed: %s", ares_strerror(status));
25+
failedInit_ = true;
26+
} else {
27+
init_ = true;
28+
}
2929
}
3030
}

0 commit comments

Comments
 (0)