Skip to main content

설정 및 보호 관리

사용 가능한 명령

사용 가능한 모든 AdGuard 명령 목록을 보려면 다음을 입력합니다.

adguard-cli --help-all

보호 활성화 및 비활성화

보호 사용

보호를 활성화하려면 다음을 입력합니다.

adguard-cli start

이 명령은 프록시로의 리디렉션을 구성하려고 시도합니다.

보호 시작 *border

보호 비활성화

보호를 비활성화하려면 다음을 입력하세요.

adguard-cli stop

이 명령은 프록시를 중지할 뿐만 아니라 트래픽이 프록시로 리디렉션되는 것도 중지합니다.

보호 상태 확인

보호 상태를 보려면 다음을 입력합니다.

adguard-cli status

상태/보호 중지 *border

업데이트

업데이트 확인

업데이트를 확인하려면 다음을 입력합니다.

adguard-cli check-update

Linux용 AdGuard 업데이트

Linux용 AdGuard를 업데이트하려면 다음을 입력합니다.

adguard-cli update

스크립트 출력 업데이트

업데이트 스크립트 출력을 보려면 다음을 입력합니다.

adguard-cli update -v

Linux용 AdGuard 구성

config 명령을 사용하여 Linux용 AdGuard를 구성합니다. 하위 명령:

  • show: proxy.yaml의 현재 설정 표시

    현재 설정 *border

  • set: proxy.yaml에서 옵션 설정

    • listen_ports.http_proxy: HTTP 수신 포트
    • proxy_mode: 프록시 모드(manual 또는 auto)
  • get: 위 옵션의 현재 상태 확인

note

The Automatic mode can only be used if the following requirements are met:

  • iptables is installed and running (either nft or legacy)
  • iptables supports the nat table for both IPv4 and IPv6
  • iptables supports the REDIRECT and QUEUE chains for both IPv4 and IPv6
  • The sudo package is installed

필터 관리

filters 명령을 사용하여 Linux용 AdGuard를 구성합니다. 하위 명령:

  • list: 설치된 필터 목록

    • --all: 모든 필터 보기

    필터 목록 *border

  • install: 필터 설치 설치하려는 필터의 URL을 입력합니다.

  • enable: 필터 활성화 필터의 이름이나 ID를 입력합니다.

    필터 활성화 *border

  • disable: 필터 비활성화 필터의 이름이나 ID를 입력합니다.

  • update: 필터 업데이트

수동 프록시 모드에서 프록시 서버 수신 주소 변경

기본적으로 프록시 서버는 127.0.0.1(루프백 네트워크 인터페이스 주소)를 감시합니다. 프록시 서버가 다른 인터페이스를 감시하도록 설정할 수 있습니다. 두 가지 방법이 있습니다.

  1. adguard-cli config set listen_address <address> 명령어를 실행하세요. 여기서 <address>는 감시할 주소입니다.
  2. 구성 파일을 직접 편집합니다.
    • 구성 파일의 위치를 확인하려면 adguard-cli config show | grep "Config location"를 실행합니다.
    • listen_address 키를 찾아서 그에 맞는 값을 설정합니다. 사용 가능한 모든 네트워크 인터페이스에서 수신하려면 수신 주소를 0.0.0.0 또는 ::으로 설정합니다.

수신 주소가 127.0.0.1이 아닌 다른 주소로 설정된 경우 프록시 클라이언트 인증이 필요합니다. 프록시 인증이 구성되지 않으면 AdGuard CLI가 시작되지 않습니다.

  • adguard-cli config set listen_address <address>를 실행할 때 <address>가 127.0.0.1이 아닌 경우, AdGuard CLI는 프로xy 인증이 아직 설정되지 않았다면 사용자 이름과 비밀번호를 요청합니다.
  • 구성 파일을 직접 편집할 때는 listen_auth 키를 찾습니다. enabled 하위 키를 true로 설정하고, usernamepassword를 비어 있지 않은 값으로 설정합니다.

Configure outbound proxy

You can configure outbound_proxy if you want AdGuard CLI to work through another proxy server.

There are two ways to configure it:

Instead of setting each option step by step, you can set all parameters in a single line using a URL:

adguard-cli config set outbound_proxy https://user:pass@host:port
info

Supported modes are HTTP, HTTPS, SOCKS4, and SOCKS5.

You can also quickly enable or disable outbound_proxy:

adguard-cli config set outbound_proxy false

Or quickly clear the settings:

adguard-cli config set outbound_proxy ""

2. Configure individual parameters

The ability to adjust specific parameters is also available:

adguard-cli config set outbound_proxy.enabled true
adguard-cli config set outbound_proxy.host localhost
adguard-cli config set outbound_proxy.port 3128
adguard-cli config set outbound_proxy.username user
adguard-cli config set outbound_proxy.password pass

Disable certificate verification for HTTPS proxies:

adguard-cli config set outbound_proxy.trust_any_certificate true

Enable SOCKS5 proxy for UDP traffic:

adguard-cli config set outbound_proxy.udp_through_socks5_enabled true
note

If your SOCKS5 proxy does not support UDP, connections may fail.

Per-app AdGuard CLI configuration

Users often need to enable filtering manually for certain browsers. AdGuard for Linux supports per-app configuration, allowing you to apply settings or rules individually to each application instead of system-wide.

For details, refer to the apps section in proxy.yaml.

A set of pre-configured entries for popular web browsers is included by default in browsers.yaml.

Checking the current configuration

To view the current outbound_proxy configuration, enter:

adguard-cli config show outbound_proxy
호환성

Configuring outbound_proxy via URL is available starting from AdGuard for Linux v1.1.26 nightly and v1.1 stable release.

Export and import settings

The export/import functionality allows you to backup your AdGuard CLI configuration and restore it on the same or different system. This includes filters, proxy settings, and other configuration options.

Export settings

To export current AdGuard CLI settings to a ZIP archive, use:

adguard-cli export-settings

You can specify the output path using the -o or --output flag. This can be either a specific file path or a directory:

# Export to a specific file
adguard-cli export-settings -o "/path/to/settings.zip"

# Export to a directory (archive will be created with a standard name)
adguard-cli export-settings -o "/path/to/directory"

If no output path is specified, the settings will be exported to the working directory with a standard name. After successful export, the command will display the full path where the archive was created.

Import settings

To import AdGuard CLI settings from a ZIP archive, use:

adguard-cli import-settings -i "/path/to/settings.zip"

The -i or --input flag is required and specifies the path to the settings archive to import.