Force proxy for select sites
|
Apr. 10, 2011, 04:56 PM
Post: #1
|
|||
|
|||
Force proxy for select sites
Hi all. Having difficulties figuring out somethings re filters below.
Code: [HTTP headers] 1. Force proxy having problems with keyword. when i do just $SET(keyword=i_proxy:2.) proxy is not activated, with a jump i end up in a loop. 2. Autofill redirect list filter What is the easy way of getting the TLD from \h? the way it is right now http://www.somesite.com/ gets inserted. i would like to have it ([^/]++.|)somesite.com/ The overall logic is as follows. there is a transparent proxy down the line which redirects with 302 on some specific sites. when this happens i want proxo to spot the redirect, add the TLD of the denied site to ForceProxy list (in order to use external proxy straight away in the future), and jump to URL using proxy. would appreciate any suggestions. |
|||
Apr. 10, 2011, 06:05 PM
(This post was last modified: Apr. 10, 2011 07:03 PM by JJoe.)
Post: #2
|
|||
|
|||
RE: Force proxy for select sites
(Apr. 10, 2011 04:56 PM)sh8an Wrote: 1. Force proxy IIRC, a $JUMP() starts a new connection and thus clears all variables. So the "$SET(keyword=i_proxy:2.)" in your filter's replace can't do anything. (Apr. 10, 2011 04:56 PM)sh8an Wrote: 2. Autofill redirect list filter Not easy to always be correct but sidki does provide the "uDom" variable, http://sidki.proxfilter.net/prox/sidki-e...l_Vars.txt . Quote:uDom Domain (e.g. domain.com or domain.co.uk) (Apr. 10, 2011 04:56 PM)sh8an Wrote: The overall logic is as follows. there is a transparent proxy down the line which redirects with 302 on some specific sites. when this happens i want proxo to spot the redirect, add the TLD of the denied site to ForceProxy list (in order to use external proxy straight away in the future), and jump to URL using proxy. Hmmm... 1. Catch the redirect with header filter, add the URL match AND the i_proxy:2 command to to ForceProxy. Probably like (I'm not sure what needs to be escaped) Code: $ADDLST(ForceProxy, \([^/]++.|\)\1 \& \$SET\(keyword=\$GET\(keyword\).i_proxy:2.\)) and then $JUMP() 2. Catch the request with header filter, call ForceProxy. $JUMP() not needed here. Not tested Edit: somesite.com/ to \1 Edit: spelling and clarity, I hope. |
|||
Apr. 11, 2011, 06:12 AM
Post: #3
|
|||
|
|||
RE: Force proxy for select sites
(Apr. 10, 2011 06:05 PM)JJoe Wrote: Not easy to always be correct but sidki does provide the "uDom" variable...thanks. totally missed that one. weird! got concentrated on uHost only Code: [HTTP headers] Code: ([^/]++.|)denied.org/ $SET(keyword=i_proxy:2.) (Apr. 10, 2011 06:05 PM)JJoe Wrote: 2. Catch the request with header filter, call ForceProxy. $JUMP() not needed here.this one i still can not get. Code: [HTTP headers] |
|||
Apr. 12, 2011, 02:56 AM
Post: #4
|
|||
|
|||
RE: Force proxy for select sites
First open the cfg in notepad and make sure the header filter's order is as expected. They need to be listed as shown in the Proxomitron's dialog.
To get the proper order I: exit the Proxomitron, restart, click "Config" on, "OK", and save the config. (Apr. 11, 2011 06:12 AM)sh8an Wrote: "(^$URL($LST(*ForceProxy*)))" ?? I don't think that does anything? The $LST argument doesn't allow wildcards. If $URL(*$LST(ForceProxy)), it is probably not the best way. $URL is slow. "*$LST(ForceProxy)" would cause the list to be called after every character of the url. "$SET(keyword=i_proxy:2.)" will cause the current keyword to be lost or be overwritten, depending on filter order. (Apr. 11, 2011 06:12 AM)sh8an Wrote: this one i still can not get. I think this is a filter order problem. This filter needs to act before "! |||||||||||| 3.4.a Use standard Proxy 07.05.31 [srl] (d.r) (Out)" and "Location: 5 Route redirects through proxy 0 (In) {sh8an}". I think it needs another name. Code: [HTTP headers] Worked for me at mail.yahoo.com but probably needs more work. HTH |
|||
Apr. 12, 2011, 05:52 AM
(This post was last modified: Apr. 12, 2011 06:26 AM by sh8an.)
Post: #5
|
|||
|
|||
RE: Force proxy for select sites
Thanks a lot! it's alive . in order to be make it look more like original and a bit more consistent with the design changed slightly
Code: [HTTP headers] one could probably redo the second filter with checks for $RESP and $IHDR somewhere above, but it does the trick for me for now. thanks again for help Update: In order to keep track of what's happening changed $LOG() to ($TST(volat=*.log:[12]*)$ADDLST(Log-Rare,HDR ForceProxy\tADD: \(\[\^/\]\+\+.\|\)$GET(uDom)/ \t\u)|) |
|||
« Next Oldest | Next Newest »
|