设置和保护管理
Available commands
要查看所有可用的 AdGuard 命令列表,请输入以下命令:
adguard-cli --help-all
启用和禁用保护
Enable protection
启用保护,请输入以下命令:
adguard-cli start
This command attempts to configure a redirection to the proxy.
Disable protection
禁用保护,请输入以下命令:
adguard-cli stop
This command not only stops the proxy but also stops the trafic from redirecting to it.
Check protection status
要查看保护状态,请输入以下命令:
adguard-cli status
Updates
检查更新
要检查更新,请输入以下命令:
adguard-cli check-update
Update AdGuard for Linux
要更新 Linux 版 AdGuard,请输入以下命令:
adguard-cli update
Update script output
要查看更新脚本的输出,请输入以下命令:
adguard-cli update -v
配置 AdGuard Linux 版
使用 config
命令配置 Linux 版 AdGuard。 子命令:
show
:显示proxy.yaml
中的当前配置set
:在proxy.yaml
中配置选项listen_ports.http_proxy
:HTTP 协议监听端口proxy_mode
:代理模式(manual
或auto
)
get
:获取上述选项的当前状态
管理过滤器
使用 filters
命令配置 Linux 版 AdGuard。 子命令:
list
:列出已安装的过滤器--all
:查看所有过滤器
install
:安装过滤器。 请输入您要安装的过滤器 URLenable
:启用过滤器。 输入过滤器的名称或 IDdisable
:禁用过滤器。 输入过滤器的名称或 IDupdate
:更新过滤器
Changing the proxy server listen address in manual proxy mode
By default, the proxy server listens on 127.0.0.1
— the address of the loopback network interface.
There are two ways to make the proxy server listen on a different interface:
- Run
adguard-cli config set listen_address <address>
where<address>
is the address to listen on. - Edit the config file directly:
- To determine the location of the config file, run
adguard-cli config show | grep "Config location"
. - Look for the
listen_address
key and set its value accordingly. To listen on all available network interfaces, set the listen address to0.0.0.0
or::
.
- To determine the location of the config file, run
If the listen address is set to anything other than 127.0.0.1
, then proxy client authentication is required. AdGuard CLI will not start unless proxy authentication is configured:
- When running
adguard-cli config set listen_address <address>
where<address>
is not127.0.0.1
, AdGuard CLI will prompt for a username and password if proxy authentication is not already configured. - When editing the config file directly, look for the
listen_auth
key. Set theenabled
sub-key totrue
, andusername
andpassword
to non-empty values.