473,503 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

connect throught a proxy

1 New Member
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
1 2061
KevinADC
4,059 Recognized Expert Specialist
It appears that you can't use localhost as a proxy.
Jul 9 '08 #2

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

Similar topics

1
2904
by: Manjesh Gowda | last post by:
Hi all, I am maintaing a persistent HTTP connection using the "HTTP CONNECT" method , this works fine for many proxies like Squid, ISA , etc. But the iPlanet proxy disconnects the conneciton...
22
3233
by: Kristof Thys | last post by:
Hello, I'm developing a C# - windows forms application. To get some information for my application, I'm connecting to an URL, wich gives me XML generated using php. With 90% of the users, this...
4
4441
by: WATYF1 | last post by:
Hello. I'm writing a VB.NET app to check email message counts for both POP3 and IMAP4. I'm using TCPClient to connect, and a NetworkStream to send simple commands. It's a very simple bit of code,...
3
9525
by: nandan | last post by:
Yes. My client has a proxy server. That much i know. In my application I make two kinds of calls that are affected by the proxy server I finally got the webservice call working. But my...
0
1981
by: =?Utf-8?B?TWlrZTEz?= | last post by:
Sorry for the cross post from dontnet.framework but I'm hoping this may see more activity here. I have written an application to access a web service. The application runs at multiple sites and...
0
2368
by: =?Utf-8?B?TWlrZTEz?= | last post by:
Sorry for the cross post; I'm hoping this will get a response here... I have written an application to access a web service. The application runs at multiple sites and must cross a proxy server....
6
4925
by: Muffinthief | last post by:
Ok this question may seem odd, but I'll do my best to explain it. I'm writing a script for development purposes so this doesn't need to run in a browser, actually this would be a lot easier if it...
1
1312
by: Edwin.Madari | last post by:
jlist wrote: switching to urllib2, installing the proxy opener, worked for me. here is the sample. variable names are self explanatory import urllib2...
6
13644
by: Patrick.Simons | last post by:
I try to connect a FTPWebRequest through Proxy and VPN to a remote FTP- server. Sometimes it works sometimes not. When my VB.Net-App (2005) returns the error on the GetResponse-Method, I'll try to...
0
7076
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7274
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6984
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5576
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5005
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.