Post Reply 
Header filters: "! :" and "url: "
Jan. 22, 2009, 05:01 PM
Post: #1
Header filters: "! :" and "url: "
Hi all, i was doing some research with my header filters and didn't found any documentation here so these are the results i had:

Four filters, test them with the following link: http://addtolist//proxomitron//aa~reload~bbbb
Code:
[HTTP headers]
In = FALSE
Out = FALSE
Key = "! : 9. Add to Protect-LinksTo {jd,ln}090122 (out) Needs \w. Cancel works bad"
URL = "\waddtolist//proxomitron//\1~reload~(\w)\2 $STOP()$ADDLSTBOX(Protect-LinksTo,Add to Protect-LinksTo list?,$WESC(\1))$JUMP(\2)"

In = FALSE
Out = FALSE
Key = "!: 9. Add to Protect-LinksTo {jd,ln}090122 (out) Needs \w. Cancel works bad"
URL = "\waddtolist//proxomitron//\1~reload~(\w)\2 $STOP()$ADDLSTBOX(Protect-LinksTo,Add to Protect-LinksTo list?,$WESC(\1))$JUMP(\2)"

In = FALSE
Out = FALSE
Key = "URL: 9. Add to Protect-LinksTo {jd,ln}090122 (out) Needs \w. Cancel works bad"
URL = "\waddtolist//proxomitron//\1~reload~(\w)\2$ADDLSTBOX(Protect-LinksTo,Add to Protect-LinksTo list?,$WESC(\1))$JUMP(\2)"

In = FALSE
Out = FALSE
Key = "URL: 9. Add to Protect-LinksTo {jd,ln}090122b (out) Doesn't needs \w. Cancel works"
Match = "http://addtolist//proxomitron//\1~reload~\2"
Replace = "$ADDLSTBOX(Protect-LinksTo,Add to Protect-LinksTo list?,$WESC(\1))$JUMP(\2)"

Facts (correct me if something is wrong):
-When a filter uses the "!:" format it needs the matching/replacing code to be written in the URL matching section.
-When this code is written in the URL match it will need \w for setting the \2 variable or will ask us to confirm a lot of times. One time for every character in the address taken by \2. In some filters we wont notice it, so we wont't fix it and will consume more cpu than needed.
-The order proxomitron follows for using filters, is the order followed in the config file, not in the Header filter window.
-The only reason i know to use !: is to ordering the filters because "url:" will be ordered different, but we can use "url :"

How proxomitron order the filters in the config file, not in the header filters window:
[ 0-9:aAbBcC...xXyYzZ]

How proxomitron order the filters in the header filters window:
[ :0-9aAbBcC...xXyYzZ]

Example of ordering in the config file:
Code:
[HTTP headers]
In = TRUE
Out = FALSE
Key = "URL :  TEST1"

In = TRUE
Out = FALSE
Key = "URL :0 TEST2"

In = FALSE
Out = FALSE
Key = "URL :18 TEST3"

In = FALSE
Out = FALSE
Key = "URL :9 TEST4"

In = FALSE
Out = FALSE
Key = "URL :99 TEST5"

In = TRUE
Out = FALSE
Key = "URL ::Z TEST6 Bad order in filters window"

In = FALSE
Out = FALSE
Key = "URL :a TEST7"

In = FALSE
Out = TRUE
Key = "URL :A TEST8"

In = FALSE
Out = TRUE
Key = "URL :z TEST9"

In = FALSE
Out = TRUE
Key = "URL :Z TESTa"

More problems using the "!:" format:
Does the command \k works in the url section?
I cant get this filter to block http://rad.msn.com/ADSAdClient31.dll?
You will see a blank page, but when it works you have to see "Connection killed" as title
Code:
[HTTP headers]
In = FALSE
Out = FALSE
Key = "! :2. Block hosts {ln}090122 (out) NO FUNCIONA \K"
URL = "*(config.messenger|rad.msn.com|c.msn.com/c.gif|searchportal.information.com|googlesyndication)\9\w $LOG(R***BLOCK $DTM(c)*** \u)\k"
I think the easier way is using "URL :x" being x a number from 0-9 or a non capital char from a to z, or simple using categories like 1.1, 1.2, 1.3 etc

How i order them without using an external text editor? I select all the header filters, export them to clipboard, delete all. At this point we want to paste all of them again, but proxomitron don't let us, so we create a new empty filter, now we import all the filters from clipboard, we delete the new empty filter, and save the config.
We will see the URL filters at the end of the list, but we can see in the config file, they are the first filters proxomitrom parses

Proxomitron will use the URL filters first as you can see by their order in the config file, but not as it is seen in the Header filters window.
Add Thank You Quote this message in a reply
Jan. 22, 2009, 06:18 PM
Post: #2
RE: Header filters: "! :" and "url: "
Here's what i seem to remember from our tests. Years ago, so...:

\k doesn't work in the URL Match. $RDIR works. \k is just a content-type dependent $RDIR.

The header filter shoot order follows the config file (vs. Header window) sort order.

With even a single "URL:" style header filter you'll never get a constant sort order. Latter will swap between two distinct states.

Without any "URL:" style header filter, you'll get a constant config file sort order after hitting "Configure -> OK -> Save -> Reload" a couple of times.
Add Thank You Quote this message in a reply
Jan. 22, 2009, 06:27 PM
Post: #3
RE: Header filters: "! :" and "url: "
(Jan. 22, 2009 06:18 PM)sidki3003 Wrote:  \k doesn't work in the URL Match. $RDIR works. \k is just a content-type dependent $RDIR.
But this other is outgoing, so no content-type and it is working Sidki
Code:
[HTTP headers]
In = FALSE
Out = TRUE
Key = "URL :2. Block hosts {ln}090122 (out) WIP"
Match = "*(config.messenger|rad.msn.com|c.msn.com/c.gif|searchportal.information.com|googlesyndication)\9\w "
Replace = "$LOG(R***BLOCK $DTM(c): ($GET(uExt))*** \u)\k"


sidki3003 Wrote:The header filter shoot order follows the config file (vs. Header window) sort order.
With even a single "URL:" style header filter you'll never get a constant sort order. Latter will swap between two distinct states.
Without any "URL:" style header filter, you'll get a constant config file sort order after hitting "Configure -> OK -> Save -> Reload" a couple of times.
Agree. But i don't use "URL:" instead i use "URL :x" and my config gets a constant sort order. Note the space before the ":x"
Add Thank You Quote this message in a reply
Jan. 22, 2009, 06:42 PM
Post: #4
RE: Header filters: "! :" and "url: "
(Jan. 22, 2009 06:27 PM)lnminente Wrote:  But this other is outgoing, so no content-type and it is working Sidki

That wasn't proper wording on my part. Better "expected content". text/* -> killed.html -- image/* -> killed.gif. I guess it looks at the extension.


Quote:Agree. But i don't use "URL:" instead i use "URL :x" and my config gets a constant sort order. Note the space before the ":x"

Well, if it works for you... Smile!
Add Thank You Quote this message in a reply
Jan. 22, 2009, 06:50 PM
Post: #5
RE: Header filters: "! :" and "url: "
Now i understand about content. By now it's working, i saved it some times and make comparisons with Notepad++. Thanks for your help Sidki! Wink

Anyway i changed many filters to the "!:" format and i think i will left them as they are. Only documenting what i learned these days Wink
Add Thank You Quote this message in a reply
Jan. 22, 2009, 07:27 PM
Post: #6
RE: Header filters: "! :" and "url: "
(Jan. 22, 2009 06:50 PM)lnminente Wrote:  Only documenting what i learned these days Wink

That's cool!
Add Thank You Quote this message in a reply
Feb. 11, 2009, 03:57 PM
Post: #7
RE: Header filters: "! :" and "url: "
Quote:After investigating with header filters, i decided to use a special "URL:" title format:
URL(space):(Zero for outcoming, I por incoming)_(#section).(#filter).(#subfilter/related filter) (Title) {autors}(ISO 8601 Calendar date: YYMMDD)

Example:
URL :0_3.1 Outcoming example {sd,th}040526
URL :I_2.2 Incoming example {ln}090125

In that way we will see easier the outcoming filters above the incoming. Proxomitron will autoorder these filters after saving reloading the config.

My header filters here
Add Thank You Quote this message in a reply
Jul. 12, 2009, 03:21 AM
Post: #8
RE: Header filters: "! :" and "url: "
(Jan. 22, 2009 06:18 PM)sidki3003 Wrote:  The header filter shoot order follows the config file (vs. Header window) sort order.

Since header filter order does matter, the below words in the official help file may need to be corrected.

http://www.proxomitron.info/45/help/Web%...lters.html Wrote:With web page filters, order is important! This is not the case with HTTP header filters.
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: