How to open a socket through a proxy server?

M

Marcelo

Hi all,
I'm trying to modify a module (Net::YahooMessenger) to make it work
from behind a proxy server. It opens sockets to the server, and I
don't know how to wrap those connections so they go through a proxy
(or a socket) server.

Does anyone know a way or workaround?

Thanks in advance,
Marcelo
 
B

Ben Morrow

Quoth (e-mail address removed) (Marcelo):
Hi all,
I'm trying to modify a module (Net::YahooMessenger) to make it work
from behind a proxy server. It opens sockets to the server, and I
don't know how to wrap those connections so they go through a proxy
(or a socket) server.

Does anyone know a way or workaround?

What sort of proxy server? HTTP? SOCKS?

If you're talking about SOCKS, you can use IO::Socket::Socks. If HTTP,
then you need to make a CONNECT request.

Ben
 
M

Marcelo

Ben Morrow said:
Quoth (e-mail address removed) (Marcelo):
What sort of proxy server? HTTP? SOCKS?

If you're talking about SOCKS, you can use IO::Socket::Socks. If HTTP,
then you need to make a CONNECT request.

Ben

I have both proxies, HTTP and SOCKS proxy servers.
I tried using IO::Socket::Socks, but it fails by timeout. The original
version of this module uses IO::Socket::INET that is timeout
customizable.

Any suggestion?

Thanks,
Marcelo
 
B

Ben Morrow

Quoth (e-mail address removed) (Marcelo):
I have both proxies, HTTP and SOCKS proxy servers.
I tried using IO::Socket::Socks, but it fails by timeout. The original
version of this module uses IO::Socket::INET that is timeout
customizable.

IO::Socket::Socks inherits IO::Socket::INET (well, actually
IO::Socket)'s new method, so you can specify a timeout parameter in the
same way.

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,154
Messages
2,570,870
Members
47,400
Latest member
FloridaFvt

Latest Threads

Top