# Dependencies for Amnezia VPN Client: Complete Build and Runtime Guide

> Discover Amnezia VPN client dependencies. Learn how Conan, CMake, Qt, and platform-specific packages like OpenVPN, WireGuard, and XRay enable cross-platform builds and runtime.

- Repository: [Amnezia VPN/amnezia-client](https://github.com/amnezia-vpn/amnezia-client)
- Tags: how-to-guide
- Published: 2026-07-29

---

**The Amnezia VPN client manages all third-party libraries through Conan and requires CMake, Qt 6.10+, and platform-specific packages like OpenVPN, WireGuard implementations, and XRay bindings to build and run across desktop and mobile platforms.**

The amnezia-client repository uses a sophisticated dependency management system to support multiple VPN protocols simultaneously. Understanding these dependencies is essential for developers building from source or contributing protocol implementations. The project centralizes all runtime library declarations in [`dev/conanfile.py`](https://github.com/amnezia-vpn/amnezia-client/blob/main/dev/conanfile.py) and orchestrates builds through CMake.

## Runtime Dependencies by Platform

The Conan package manager handles all third-party libraries, with platform-specific subsets defined in [`dev/conanfile.py`](https://github.com/amnezia-vpn/amnezia-client/blob/main/dev/conanfile.py).

### Cross-Platform Core Libraries

Every target platform requires these foundational packages:

- **`libssh@amnezia`** – SSH protocol implementation for management channels
- **`openssl`** – Cryptographic primitives and TLS support
- **`zlib`** – Compression for network traffic and payload optimization

### Desktop Service Dependencies

Windows, Linux, and macOS builds include specialized tunnel drivers and VPN protocol implementations:

- **`awg-windows`** / **`awg-go`** – Amnezia WireGuard implementation (Windows binary vs. Go implementation for Unix)
- **`tap-windows6`** – Legacy TAP driver for Windows OpenVPN
- **`win-split-tunnel`** – Windows kernel driver for selective traffic routing
- **`wintun`** – Modern Wintun driver for WireGuard on Windows
- **`amnezia-xray-bindings`** – XRay protocol integration for censorship resistance
- **`tun2socks`** – Layer-3 SOCKS proxy tunneling
- **`openvpn`** – Standard OpenVPN protocol support
- **`v2ray-rules-dat`** – GeoIP and domain routing rules database

### iOS and macOS Network Extensions

Network Extension (NE) targets use framework-based dependencies:

- **`awg-apple`** – WireGuard implementation packaged as Apple frameworks
- **`hev-socks5-tunnel`** – SOCKS5 tunnel implementation embedded as a framework
- **`openvpnadapter`** – OpenVPN adapter specifically for Network Extensions

### Android Runtime Libraries

Android builds rely on mobile-optimized packages:

- **`amnezia-libxray`** – XRay core compiled for Android NDK
- **`awg-android`** – WireGuard implementation for Android
- **`openvpn-pt-android`** – Pluggable transport OpenVPN for Android

## Build System Prerequisites

According to [`dev/README.md`](https://github.com/amnezia-vpn/amnezia-client/blob/main/dev/README.md), the build environment requires specific tools before Conan can fetch dependencies.

### Essential Development Tools

- **CMake** – Generates native build systems (Ninja, Make, or MSVC projects)
- **C/C++ compiler** – GCC, Clang, or Microsoft Visual C++ depending on host platform
- **Conan** – Package manager that resolves and downloads the runtime libraries listed above
- **Qt 6.10 or later** – UI framework requiring Core, Qt 5 Compatibility, and Remote Objects modules

### Optional Packaging Tools

For creating distributable installers:

- **Qt Installer Framework** – Cross-platform installer generation
- **WiX Toolset** – Windows Installer XML toolchain for `.msi` creation

## Installing and Managing Dependencies

The build workflow separates dependency acquisition from compilation.

### Fetching Conan Packages

From the repository root, install all platform-specific dependencies:

```bash
conan install . --output-folder=build --build=missing

```

This command processes [`dev/conanfile.py`](https://github.com/amnezia-vpn/amnezia-client/blob/main/dev/conanfile.py), downloading binaries for `awg-windows`, `openvpn`, `amnezia-xray-bindings`, and other declared packages into the `build` folder.

### Configuring with CMake

After Conan installation, link the fetched libraries:

```bash
mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --parallel

```

The [`dev/CMakeLists.txt`](https://github.com/amnezia-vpn/amnezia-client/blob/main/dev/CMakeLists.txt) configuration automatically locates Qt, OpenSSL, and Conan-provided packages during the configuration phase.

### Adding New Third-Party Libraries

To integrate a new dependency like `spdlog`:

1.  Edit [`dev/conanfile.py`](https://github.com/amnezia-vpn/amnezia-client/blob/main/dev/conanfile.py) to add the requirement:

    ```python
    def requirements(self):
        # existing dependencies...

        self.requires("spdlog/1.12.0")
    ```

2.  Re-run the install command to fetch the new package:

    ```bash
    conan install . --output-folder=build --build=missing
    ```

3.  Link in [`dev/CMakeLists.txt`](https://github.com/amnezia-vpn/amnezia-client/blob/main/dev/CMakeLists.txt):

    ```cmake
    find_package(spdlog REQUIRED)
    target_link_libraries(amnezia-client PRIVATE spdlog::spdlog)
    ```

## Key Configuration Files

These files define how dependencies flow through the amnezia-client build system:

- **[`dev/conanfile.py`](https://github.com/amnezia-vpn/amnezia-client/blob/main/dev/conanfile.py)** – Central manifest declaring all Conan packages by platform and feature set
- **[`dev/CMakeLists.txt`](https://github.com/amnezia-vpn/amnezia-client/blob/main/dev/CMakeLists.txt)** – Root build configuration that finds Qt, OpenSSL, and Conan libraries
- **`dev/recipes/`** – Directory containing custom Conan recipes for specialized packages like `tap-windows6` and `awg-android`
- **[`dev/THIRD_PARTY_LICENSES.md`](https://github.com/amnezia-vpn/amnezia-client/blob/main/dev/THIRD_PARTY_LICENSES.md)** – Comprehensive license attributions for all bundled components

## Summary

- The amnezia-client uses **Conan** as its package manager, with all runtime libraries declared in [`dev/conanfile.py`](https://github.com/amnezia-vpn/amnezia-client/blob/main/dev/conanfile.py).
- **Platform-specific dependencies** include `awg-windows`/`awg-apple`/`awg-android` for WireGuard, `openvpn` for OpenVPN support, and `amnezia-xray-bindings` for XRay protocols.
- **Universal dependencies** `libssh@amnezia`, `openssl`, and `zlib` are required on every supported platform.
- The **build toolchain** requires CMake 3.16+, Qt 6.10+, a C++17 compiler, and Conan 2.0+ to compile successfully.
- Custom Conan recipes in `dev/recipes/` handle specialized VPN drivers and platform-specific tunnel implementations.

## Frequently Asked Questions

### What package manager does the Amnezia VPN client use?

The amnezia-client project uses **Conan** exclusively to manage C++ dependencies. The [`dev/conanfile.py`](https://github.com/amnezia-vpn/amnezia-client/blob/main/dev/conanfile.py) file defines requirements for WireGuard implementations, OpenVPN, XRay bindings, and cryptographic libraries, which Conan downloads and caches before CMake configures the build.

### Does Amnezia VPN client require Qt to compile?

Yes, **Qt 6.10 or later is mandatory**. The build specifically requires the Core module, Qt 5 Compatibility layer, and Remote Objects for cross-platform UI and inter-process communication. Qt paths must be discoverable by CMake during the configuration phase.

### How do I add a new third-party library to the Amnezia VPN build?

Add `self.requires("package/version")` to the `requirements()` method in [`dev/conanfile.py`](https://github.com/amnezia-vpn/amnezia-client/blob/main/dev/conanfile.py), then re-run `conan install . --output-folder=build --build=missing`. Finally, update [`dev/CMakeLists.txt`](https://github.com/amnezia-vpn/amnezia-client/blob/main/dev/CMakeLists.txt) to locate the package using `find_package()` and link it to the `amnezia-client` target.

### What are the Windows-specific dependencies for Amnezia VPN?

Windows builds require **`awg-windows`** (WireGuard), **`tap-windows6`** and **`wintun`** (TUN/TAP drivers), and **`win-split-tunnel`** for selective routing. These are managed as Conan packages alongside universal dependencies like `openssl` and `zlib` defined in the root [`conanfile.py`](https://github.com/amnezia-vpn/amnezia-client/blob/main/conanfile.py).