Skip to content

Commit

Permalink
Docs: fix some mistakes (#2761)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akariln authored May 21, 2023
1 parent 46bb6c3 commit 1ab6158
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions docs/configuration/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,32 @@ Clash do offer support on matching different levels of wildcard domains in the D

::: tip
Any domain with these characters should be wrapped with single quotes (`'`). For example, `'*.google.com'`.
Static domain has a higher priority than wildcard domain (foo.example.com > *.example.com > .example.com).
:::

Use an astrisk (`*`) to match against a single-level wildcard subdomain.
Use an asterisk (`*`) to match against a single-level wildcard subdomain.

| Expression | Matches | Does Not Match |
| ---------- | ------- | -------------- |
| `*.google.com` | `www.google.com` | `google.com` |
| `*.bar.google.com` | `foo.bar.google.com` | `bar.google.com` |
| `*.*.google.com` | `thoughtful.sandbox.google.com` | `one.two.three.google.com` |

Use a plus sign (`+`) to match against multi-level wildcard subdomains.
Use a dot sign (`.`) to match against multi-level wildcard subdomains.

| Expression | Matches | Does Not Match |
| ---------- | ------- | -------------- |
| `+.google.com` | `www.google.com` | `www.google.com` |
| `+.google.com` | `thoughtful.sandbox.google.com` | `www.google.com` |
| `+.google.com` | `one.two.three.google.com` | `www.google.com` |
| `.google.com` | `www.google.com` | `google.com` |
| `.google.com` | `thoughtful.sandbox.google.com` | `google.com` |
| `.google.com` | `one.two.three.google.com` | `google.com` |

Use a plus sign (`+`) to match against multi-level wildcard subdomains.

`+` wildcard works like DOMAIN-SUFFIX, you can quickly match multi level at a time.

| Expression | Matches |
| ---------- | ------- |
| `+.google.com` | `google.com` |
| `+.google.com` | `www.google.com` |
| `+.google.com` | `thoughtful.sandbox.google.com` |
| `+.google.com` | `one.two.three.google.com` |

0 comments on commit 1ab6158

Please sign in to comment.