feat: support of drivers for windows

This commit is contained in:
Yaroslav Gurov
2026-03-28 02:40:45 +01:00
parent 98915b3cf2
commit 7efb532bc9
3 changed files with 22 additions and 7 deletions

View File

@@ -20,6 +20,9 @@ class AmneziaVPN(ConanFile):
if has_service:
if os == "Windows":
self.requires("awg-windows/0.1.8")
self.requires("tap-windows6/9.27.0")
self.requires("win-split-tunnel/1.2.5.0")
self.requires("wintun/0.14.1")
else:
self.requires("awg-go/0.2.16")

View File

@@ -42,3 +42,6 @@ class TapWindows6(ConanFile):
def package_info(self):
self.cpp_info.set_property("cmake_target_name", "openvpn::tap-windows6")
self.cpp_info.set_property("cmake_extra_variables", {
"TAP_WINDOWS6_BIN": os.path.join(self.package_folder, "bin").replace("\\", "/")
})

View File

@@ -8,7 +8,7 @@ import os
class WinSplitTunnel(ConanFile):
name = "win-split-tunnel"
version = "1.2.5.0"
settings = "os", "build_type", "compiler"
settings = "os", "arch", "build_type", "compiler"
@property
def _arch(self):
@@ -30,15 +30,24 @@ class WinSplitTunnel(ConanFile):
f"{self.name} v{self.version} supports only Windows"
)
def source(self):
def build(self):
url = f"https://raw.githubusercontent.com/mullvad/mullvadvpn-app-binaries/ff0e3746c89a04314377cffeb52faaa976413a69/{self._target}/split-tunnel"
download(self, url, "mullvad-split-tunnel.cat", sha256="")
download(self, url, "mullvad-split-tunnel.inf", sha256="")
download(self, url, "mullvad-split-tunnel.pdb", sha256="")
download(self, url, "mullvad-split-tunnel.sys", sha256="")
files = [
("mullvad-split-tunnel.cat", "9bbd10b95a2cf2226b266a52077300c280f7782def69ebbeb892bb60505d9a5f"),
("mullvad-split-tunnel.inf", "4ec3c2bdefc2a1df9e4e19cd4301b5774624ea07e61add588067b16f8925f5d7"),
("mullvad-split-tunnel.pdb", "ee0e246b18a3bfecfc27104b40f9492ffd2b735582870fbd572f93d55e8e9eaa"),
("mullvad-split-tunnel.sys", "4056b22d08115c1a83bc2cafa17de0bb17db3705eac382de77fd7935eeff7edb"),
]
for name, sha256 in files:
download(self, f"{url}/{name}", os.path.join("prebuilt", name), sha256=sha256)
def package(self):
copy(self, "*", src=self.source_folder, dst=os.path.join(self.package_folder, "bin"))
copy(self, "*", src="prebuilt", dst=os.path.join(self.package_folder, "bin"))
def package_info(self):
self.cpp_info.set_property("cmake_target_name", "mullvad::win-split-tunnel")
self.cpp_info.set_property("cmake_extra_variables", {
"WIN_SPLIT_TUNNEL_BIN": os.path.join(self.package_folder, "bin").replace("\\", "/")
})