Article delegate-en/1286 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: Gd-7.4.3/W2K: multiple cfi filters?
07 Aug 2001 23:52:12 GMT (Yutaka Sato)


On 08/08/01(07:31) you unSpawn <> wrote
in <>
 |Im trying to get a grip on multiple UA filtering on a Windows 2000 box
 |with DeleGate-7.4.3's CFI. Single FFROM's in the config work well, but
 |working with multiple FFROM's or combining filter statements won't work. Im
 | sure by now it ain't in the filter statements themselves anymore :-]

I checked the implementation of CFI in filters/cfi.c and found that
matching by User-Agent field in FFROMCL and FTOSV is not implemented
yet.  So I made a patch like enclosed which will be applied to the
next release of DeleGate.

 |the UA.cfi:
 |User-Agent: Mozilla/4.5 [en] (WinNT; I)
 |Header-Filter: sed "s/Mozilla\/4.5 \[en\] (WinNT; I)/Mozilla\/1.0
 |User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
 |Header-Filter: sed "s/Mozilla\/4.0 (compatible; MSIE 5.5; Windows NT
 |5.0)/Mozilla\/1.0 (compatible))/g"
 |*The other 2 cfi's have the above as a single statement ofcourse,
 |everything else seems ok'ed, like paths & running Dg in general.

I suppose that you did not have "User-Agent:" field for matching 
in the separated version, otherwise it will failed because matching
by User-Agent has not been supported for FFROMCL and FTOSV.
By the way, filtering request toward servers is better to be done
in FTOSV than FFROMCL, for efficiency of execution.

 |Other than this I've got no problems at all, it runs smooth as a
 |service, though I'd *really* like to see the japanese CFI docs translated
 |to english, the manual is a lil bit spartan too me :-]

The document about CFI in Japanese is obsolete and almost nothing
better than the description in Manual.htm#CFIscript.

  @ @ Yutaka Sato <>
 ( - ) National Institute of Advanced Industrial Science and Technology (AIST)
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan

*** ../../delegate7.4.1/filters/cfi.c	Thu Jun 28 14:48:32 2001
--- cfi.c	Wed Aug  8 08:19:44 2001
*** 175,180 ****
--- 175,182 ----
  	dp = wordScan(dp,iver);
+ 	if( iagent[0] == 0 )
+ 		getFV(head,"User-Agent",iagent);
  	dp = wordScan(statline,rver);
  	dp = wordScan(dp,rcode);

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]