By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,693 Members | 1,972 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,693 IT Pros & Developers. It's quick & easy.

connect throught a proxy

P: 1
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
Share this Question
Share on Google+
1 Reply


KevinADC
Expert 2.5K+
P: 4,059
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.