in reply to Re: Re: Re: Re: •Re: Chaining proxies with LWP::UserAgent
in thread Chaining proxies with LWP::UserAgent

Having looked at the LWP::UserAgent and LWP::Protocol::HTTP code, I think it should be doable to edit them to add support for the proxy either being an array ref, or a string of proxies chained with some convenient dividers (eg |).

If you then contribute that back, and a lot of people will suddenly be able to easily use chained proxies in Perl if they need it. :-)

Okay, I did it.

http.pm.diff and UserAgent.pm.diff

Those patches allow the second argument of the proxy() method to be either an arrayref, or a whitespace-separated list of proxies.

I sent off the patches to Gisle, hopefully he will accept them in the next version. If so, then proxy chaining via LWP will be available to all! :)

  • Comment on Re: Re: Re: Re: Re: •Re: Chaining proxies with LWP::UserAgent

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: •Re: Chaining proxies with LWP::UserAgent
by tilly (Archbishop) on Jun 29, 2003 at 11:10 UTC
    Way cool. Not sure whether (or when) I would need that, but I know that if I do, it is possible, and I know where to ask. :-)

    Unfortunately you changed the data structure a bit. Someone will have to make equivalent changes to the other protocols. Luckily most of them just check whether there is a and refuse to so they remain the same. And the rest seem to be variations on http so the change should be pretty much the same there.

    Good luck on getting the patch accepted!