467,146 Members | 1,024 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,146 developers. It's quick & easy.

connect throught a proxy

Hello,
I want my Perl script to connect through the tor proxy which runs on my localhost on port 9050, so I wrote:

Expand|Select|Wrap|Line Numbers
  1. require LWP::UserAgent;
  2. my $ua = LWP::UserAgent->new;
  3.  
  4. $ua->timeout(10);
  5.  
  6.  
  7. $ua->proxy(['http'], 'localhost:9050');
  8.  
  9.  
  10. my $response = $ua->get('http://www.ip-adress.com/');
  11.  
  12. print $response->content;
But I have this error message:

Expand|Select|Wrap|Line Numbers
  1. 501 Protocol scheme 'localhost' is not supported
thnx to help a newbie
Jul 8 '08 #1
  • viewed: 1920
Share:
1 Reply
KevinADC
Expert 2GB
It appears that you can't use localhost as a proxy.
Jul 9 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by =?Utf-8?B?TWlrZTEz?= | last post: by
reply views Thread by =?Utf-8?B?TWlrZTEz?= | last post: by
6 posts views Thread by Muffinthief | last post: by
1 post views Thread by Edwin.Madari@VerizonWireless.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.