Update README.md

Clarified wildcard usage and interopability with squid dst_domain acls
This commit is contained in:
James Kinsman 2018-03-06 09:41:06 +00:00 committed by GitHub
parent 6b71108349
commit f4c9329e17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,16 +34,29 @@ There is a cache_domains.json file to define CDNs and additional meta deta with
} }
``` ```
### Host file format
There is a separate file for each cacheable service. Some notes on formatting: There is a separate file for each cacheable service. Some notes on formatting:
- Every line should be a seperate hostname for that service. - Every line should be a seperate hostname for that service.
- Wildcards can be represented with an asterix. - Only one entry is permitted per line.
- Only one wildcard is permitted per line. - Wildcards are permitted as per below
- If a wildcard is used, it should be the first character on the line.
- Wildcards are not treated as matching null, e.g. `*.example.com` will match `a.example.com` but will not match `example.com`
- Lines starting with a # will be treated as a comment. - Lines starting with a # will be treated as a comment.
- Files must end with an empty newline. - Files must end with an empty newline.
#### Wildcards
The wildcard format shall be defined as per the below
- Wildcards should be represented with an asterix.
- If a wildcard is used, it should be the first character on the line.
- Wildcards are not treated as matching null, e.g. `*.example.com` will match `a.example.com` but will not match `example.com`
- Only simple domain wildcards will be accepted eg `*.example.com` not `*ww.example.com`
##### Notes for Squid users
If you are using these files within a squid dst_domain acl you will need to reformat the wildcard entries to be compliant with the squid acl format. The following regex should suffice `s/*\./\./`
## Updates ## Updates
Please fork this repository and submit pull requests if you have any extra hostnames or services to add. We want this list to be definitive and collaborative! Please fork this repository and submit pull requests if you have any extra hostnames or services to add. We want this list to be definitive and collaborative!