Skip Menu |

This queue is for tickets about the AnyEvent-HTTP-Socks CPAN distribution.

Report information
The Basics
Id: 86099
Status: rejected
Priority: 0/
Queue: AnyEvent-HTTP-Socks

People
Owner: Nobody in particular
Requestors: blue [...] thisisnotmyrealemail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: request for alternative proxy syntax
Would it be possible to also support a syntax that is similar to that of the current AnyEvent::HTTP proxy syntax, i.e. proxy => [$ip, $port]. I would like to be able to do socks => [$ip, $port], or socks5 => [$ip, $port]. Then it would be easier to generalize code instead of having something awkward like this: my @proxy = $type =~ /^socks5?$/ ? (socks => "$type://$ip:$port") : (proxy => [$ip, $port]); This would be a bit simpler: my @proxy = ($type =~ /^https?$/ ? 'proxy' : $type => [$ip, $port]); Even better would be to use exact same proxy syntax if possible and just intercept if the scheme is socks/socks5: proxy =>[$ip, $port, 'socks'];
On Wed Jun 12 18:36:01 2013, blue wrote: Show quoted text
> Would it be possible to also support a syntax that is similar to that > of the current AnyEvent::HTTP proxy syntax, i.e. proxy => [$ip, > $port]. I would like to be able to do socks => [$ip, $port], or > socks5 => [$ip, $port]. Then it would be easier to generalize code > instead of having something awkward like this: > > my @proxy = $type =~ /^socks5?$/ > ? (socks => "$type://$ip:$port") : (proxy => [$ip, $port]); > > This would be a bit simpler: > > my @proxy = ($type =~ /^https?$/ ? 'proxy' : $type => [$ip, > $port]); > > Even better would be to use exact same proxy syntax if possible and > just intercept if the scheme is socks/socks5: > > proxy =>[$ip, $port, 'socks'];
For socks proxy we should have ability to specify socks version, login and password, several proxy to make socks chain. We can't make all of this and do not break compatibility with ae::http's `proxy' parameter. In fact `proxy' and `socks' here are two different things, you can even specify both to make connection like socks -> http_proxy -> server or socks -> socks -> ... -> socks -> http_proxy -> server. So I don't want to make this unnecessary job. But you can provide a patch and I'll see could it be included in the next version.
no patch provided