|
| 1 | +--- |
| 2 | +title: How to set app exclusions and custom filters |
| 3 | +sidebar_position: 5 |
| 4 | +--- |
| 5 | + |
| 6 | +In AdGuard CLI, it’s not possible to import app exclusions from other versions of the program. You can, however, manually create the required exclusions and filters by editing several configuration files in the app’s working directory. |
| 7 | + |
| 8 | +## How to add exclusions |
| 9 | + |
| 10 | +AdGuard CLI working directory: |
| 11 | + |
| 12 | +- Linux: `~/.local/share/adguard-cli/` |
| 13 | +- macOS: `~/Library/Application Support/adguard-cli/` |
| 14 | + |
| 15 | +Several key files are located in this folder: |
| 16 | + |
| 17 | +1. `browsers.yaml` — a list of browsers (Safari, Chrome, Firefox, etc.). Here you can enable or disable HTTPS filtering for individual browsers, or completely exclude them from filtering. |
| 18 | + |
| 19 | +Example `browsers.yaml` (for macOS): |
| 20 | + |
| 21 | +```sh |
| 22 | +- name: com.apple.Safari |
| 23 | + action: default |
| 24 | +- name: com.google.Chrome |
| 25 | + action: default |
| 26 | +- name: org.mozilla.firefox |
| 27 | + action: default |
| 28 | +- name: com.brave.Browser |
| 29 | + action: default |
| 30 | +``` |
| 31 | + |
| 32 | +**Example browsers.yaml (for macOS)**: |
| 33 | + |
| 34 | +```sh |
| 35 | +- name: com.apple.Safari |
| 36 | + action: default |
| 37 | +- name: com.google.Chrome |
| 38 | + action: default |
| 39 | +- name: org.mozilla.firefox |
| 40 | + action: default |
| 41 | +- name: com.brave.Browser |
| 42 | + action: default |
| 43 | +``` |
| 44 | + |
| 45 | +If you want to: |
| 46 | + |
| 47 | +- disable HTTPS filtering — replace `default` with `bypass_https` |
| 48 | +- completely exclude the app from filtering — replace `default with`bypass` |
| 49 | + |
| 50 | +1. `proxy.yaml` — the main configuration file. It has an apps section where exclusions for any other apps are set. |
| 51 | + |
| 52 | +**Example `proxy.yaml`**: |
| 53 | + |
| 54 | +```sh |
| 55 | + - include-list: browsers.yaml |
| 56 | + - name: '*vpn*' |
| 57 | + action: 'bypass' |
| 58 | + skip_outbound_proxy: true |
| 59 | + - name: '*' |
| 60 | + action: 'bypass_https' |
| 61 | +``` |
| 62 | + |
| 63 | +**Important**: On **Linux**, specify the app name (Chrome, Firefox, etc.). On **macOS**, specify the bundle ID, e.g., `com.google.Chrome`, `org.mozilla.firefox`. |
| 64 | + |
| 65 | +## How to add custom filters |
| 66 | + |
| 67 | +The working directory contains the `user.txt` file — you can add your own blocking or allowing rules for websites here. If you have your own list of rules in `.txt` format, connect it via `proxy.yaml`: |
| 68 | + |
| 69 | +```sh |
| 70 | +filters: |
| 71 | + - 'flm://' |
| 72 | + - 'user.txt' |
| 73 | + - 'my_filter.txt' # connecting your own file |
| 74 | +``` |
0 commit comments