Closed Stone-D closed 8 years ago
Filter processing order is as the arrow.
[HTTP headers]
Key = "Server: gws -> gws1"
In = TRUE
Out = FALSE
Version = ""
Author = ""
Comment = ""
Active = TRUE
Multi = FALSE
URL = "www.google.co.jp/"
Bounds = ""
Limit = 256
Match = "gws"
Replace = "gws1"
[HTTP headers]
Key = "Server: gws1 -> gws2"
In = TRUE
Out = FALSE
Version = ""
Author = ""
Comment = ""
Active = TRUE
Multi = FALSE
URL = "www.google.co.jp/"
Bounds = ""
Limit = 256
Match = "gws1"
Replace = "gws2"
[HTTP headers]
Key = "Server: gws2 -> gws3"
In = TRUE
Out = FALSE
Version = ""
Author = ""
Comment = ""
Active = TRUE
Multi = FALSE
URL = "www.google.co.jp/"
Bounds = ""
Limit = 256
Match = "gws2"
Replace = "gws3"
This video should clarify what I mean. I expect the "Disable ALL" to hit first, but it doesn't. Looking at the filter xml, there doesn't seem to be anything wrong. Here's a stripped down copy so you can test it:
<?xml version="1.0" encoding="UTF-8"?>
<ProxydomoFilter>
<folder name="Headers" active="true">
<folder name="Blocks" active="true">
<filter>
<Active>true</Active>
<title>Disable ALL (out)</title>
<version/>
<author/>
<comment/>
<filterType>1</filterType>
<headerName>URL</headerName>
<multipleMatches>false</multipleMatches>
<windowWidth>256</windowWidth>
<boundsPattern/>
<urlPattern>\0</urlPattern>
<matchPattern>(http(s|)://)\1\2</matchPattern>
<replacePattern>$RDIR(\1local.ptron/Disabled.htm)$LOG(R[HDR:URL] Block 0 - ALL)</replacePattern>
</filter>
<filter>
<Active>true</Active>
<title>Disabled: Net Failure (out)</title>
<version/>
<author/>
<comment/>
<filterType>1</filterType>
<headerName>URL</headerName>
<multipleMatches>false</multipleMatches>
<windowWidth>256</windowWidth>
<boundsPattern/>
<urlPattern>\0</urlPattern>
<matchPattern>\0</matchPattern>
<replacePattern>$RDIR(http://local.ptron/NetFail.htm)$LOG(R[HDR:URL] Block 0 - NET)</replacePattern>
</filter>
<folder name="Fun" active="true">
<filter>
<Active>true</Active>
<title>Block 3 - Social Networking (out)</title>
<version/>
<author/>
<comment/>
<filterType>1</filterType>
<headerName>URL</headerName>
<multipleMatches>false</multipleMatches>
<windowWidth>256</windowWidth>
<boundsPattern/>
<urlPattern>(*$LST(Block-Social))\0</urlPattern>
<matchPattern>\1</matchPattern>
<replacePattern>$RDIR(http://local.ptron/Blocked-S.htm)$LOG(R[HDR:URL] Block 5 - Social \1)</replacePattern>
</filter>
</folder>
</folder>
</folder>
</ProxydomoFilter>
It seems that "Disable ALL" is no doubt the first match. After the match, does $RDIR has been overwritten is a problem?
Wow. That never occurred to me! I'm now using $SET(BLOCKED=True) in Disable ALL, and & (^$TST(BLOCKED=True)) in all subsequent block filters. Works as expected.
Thanks, sorry for the confusion!
In the filter manager, do the filters get processed from the bottom to the top, rather than top to bottom?
If you refer to the attached screenshot, the "Block 3" filters, followed by 2 then 1, seem to get processed before "Disable ALL".
It's counter-intuitive for me. Is there a way to reverse this behaviour, if true?