Discussion:
Proxo help
(too old to reply)
Pa
2004-11-18 17:32:23 UTC
Permalink
Trying to enforce (not add) a prefix to all request via a proxy.

Thus I wish to direct every 5th request to prefix
webwarper.net/ww/~gz~s/

I set Proxo to add this prefix but isn't working. Furthermore
Opera name completion/prefix to google or warper seems never to
work. Suggestions?
Nisse Engström
2004-11-22 18:46:39 UTC
Permalink
Post by Pa
Trying to enforce (not add) a prefix to all request via a proxy.
Thus I wish to direct every 5th request to prefix
webwarper.net/ww/~gz~s/
I set Proxo to add this prefix but isn't working. Furthermore
Opera name completion/prefix to google or warper seems never to
work. Suggestions?
Doing this in Proxomitron turned out to be easier
than I expected (the presumed difficulty being the
"every 5th" part). Create a new /outgoing/ header filter:

HTTP Header: URL: filter name
URL Match:
Header Value Match: $CON(1,5)
Replacement text: $RDIR(http://webwarper.net/ww/~gz~s/\u)

Note that this appends the full URL, including the "http://"-
part. If that's not what you want, you will have to tweak it
with other replacement codes, for instance:

$RDIR(http://webwarper.net/ww/~gz~s/\h\p\q\a)

or:

$RDIR(http://webwarper.net/ww/~gz~s\p\q\a)

(Note the missing slash.)

Note also that this also intercept requests for external
stylesheets, javascript, images, etc., which may not be
what you want. (I have no idea what webwarper is).


If you only want to redirect, say, HTML documents,
you could write a filter based on Content-Type. Create a
new /incoming/ header filter:

HTTP Header: Content-Type: filter name
URL Match:
Header Value Match: text/html&$CON(1,5)
Replacement text: $RDIR(http://webwarper.net/ww/~gz~s/\u)

Note that the $CON() counts /all/ connections, not only
the ones matching the Content-Type, and that the HTML
documents matching this rule may have to be transmitted
twice.

- - -

These filters have only been briefly tested. Scrutinize,
ponder, double-check, test and tweak according to need.


--n
Pa
2004-11-24 16:52:27 UTC
Permalink
So, now I must figure out how to run two instances of Proxomitron
at same time...
Pa
2004-11-24 19:37:16 UTC
Permalink
Post by Pa
So, now I must figure out how to run two instances of
Proxomitron at same time...
Or, does anyone know if privoxy can do this url request
prefixing/rewriting?
Nisse Engström
2004-11-25 06:26:09 UTC
Permalink
Post by Pa
So, now I must figure out how to run two instances of Proxomitron
at same time...
Why two?

--n
Pa
2004-11-27 14:14:45 UTC
Permalink
Post by Nisse Engström
Why two?
--n
Because, the second proxomitron is only for the web warper branch
of my proxy chain, used only when slipstream is slow or down.
Thus, instead of a slower direct connection, I at least would
have assurance of gzip and html shrink.

I see Proximodo--the open source proxomitron clone--but it
doesn't work. It will pull the first few lines of any web page
and hang, or often spit garbage into the browser window. So, I
tried eliminating all filters, port change, webposting, writing
author and sweet talk (to the program, not programmer), but no
luck getting it to work. [Proximodo has a nice filter set,
description of use of each filter, and cleaner interface more
suitable to skeptics and beginners than proxomitron. It doesn't
assume a user will know difference between a header filter and
webpage filter. My guess would be this could be more popular
than proxomitron, if it worked.]

Continue reading on narkive:
Loading...