From fef7db6764e22d708254f3e500ddaedb61270d7b Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 31 Dec 2014 11:42:46 -0800 Subject: [PATCH] Updated Dynamic filtering: rule syntax (markdown) --- Dynamic-filtering:-rule-syntax.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Dynamic-filtering:-rule-syntax.md b/Dynamic-filtering:-rule-syntax.md index ef9226f..ec34cbc 100644 --- a/Dynamic-filtering:-rule-syntax.md +++ b/Dynamic-filtering:-rule-syntax.md @@ -1,3 +1,11 @@ +### Rule syntax + +A dynamic filtering rule is made of four components: a source hostname, a destination hostname, a request type, and then a keyword which tells what to do with a request which happens to match the three former components. + + source-hostname destination-hostname request-type action + +Source hostname always correspond to the hostname extracted from the URL of the web page in the browser. The destination hostname correspond to the hostname extracted from the URL of a remote resource which the web page is fetching (or trying to). The type is the type of the fetched resource. A request can be blocked, allowed, or ignored. + ### Type-based rules Type-based rules are used to filter specific types of request on a web page. There currently exists five types of request which can be dynamically filtered: @@ -10,7 +18,7 @@ Type-based rules are used to filter specific types of request on a web page. The These rules can apply everywhere, or be specific to a web site. For instance blocking 3rd-party frames is a very good habit security-wise: `* * 3p-frame block`. This rule translates into "block 3rd-party embedded frames everywhere". -Another example: `wired.com * image block`, which means "block all images when visiting a web page on wired.com". +Another example: `wired.com * image block`, which means "block all images when visiting a web page on wired.com". Note that with type-based rules, the destination hostname is **always** `*`, meaning "from anywhere". ### Hostname-based rules