AdGuard VPN CLI within a Docker container
Report Bug
·
Request Feature
This project allows you to use AdguardVPN-CLI within a Docker container. It provides a simple and efficient way to manage AdguardVPN through the command line in a containerized environment.
Before proceeding, please review the following content and create your .env file accordingly. You can refer to the .env.sample file provided in this repository for guidance.
Variable | Description | Default value | Allow values |
---|---|---|---|
ADGUARD_USERNAME | Username for login | "username" | |
ADGUARD_PASSWORD | Password for login | "password" | |
ADGUARD_CONNECTION_LOCATION | Defaults to the last used location | "JP" | |
ADGUARD_CONNECTION_TYPE | Set VPN operating mode | "TUN" | TUN / SOCKS5 |
ADGUARD_SOCKS5_USERNAME | Set the SOCKS username | "username" | |
ADGUARD_SOCKS5_PASSWORD | Set the SOCKS password | "password" | |
ADGUARD_SOCKS5_HOST | Set the SOCKS listen host. | "127.0.0.1" | |
ADGUARD_SOCKS5_PORT | Set the SOCKS port | 1080 | |
ADGUARD_SEND_REPORTS | Send crash reports to developers | false | |
ADGUARD_SET_SYSTEM_DNS | Set the system DNS servers | false | |
ADGUARD_USE_CUSTOM_DNS | Use the custom DNS servers | true | |
ADGUARD_CUSTOM_DNS | Set the DNS upstream server | "1.1.1.1" | |
ADGUARD_USE_QUIC | Set whether to use QUIC protocol | true |
Important
ADGUARD_SOCKS5_HOST
: For non-localhost addresses, you need to protect the proxy with a username and password.
docker compose up -d
AdguardVPN-CLI + qBittorrent
version: "3"
services:
adguard-vpn-cli:
image: ghcr.io/supersunho/docker-adguardvpn-cli:latest
restart: unless-stopped
container_name: adguard-vpn-cli
env_file: .env
healthcheck:
test: ping -c 1 www.google.com || exit 1
interval: 1m
timeout: 10s
retries: 1
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
ports:
- 6089:6089
- 6881:6881
- 6881:6881/udp
qbittorrent:
image: linuxserver/qbittorrent:latest
labels:
- "com.centurylinklabs.watchtower.enable=false"
container_name: qbittorrent
environment:
- PUID=0
- PGID=0
- TZ=Asia/Seoul
volumes:
- ./config:/config
- ./downloads:/downloads
devices:
- /dev/fuse:/dev/fuse:rwm
cap_add:
- SYS_ADMIN
depends_on:
- adguard-vpn-cli
network_mode: service:adguard-vpn-cli