LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-21-2009, 03:46 AM   #1
alex1983-0112
Member
 
Registered: Apr 2008
Location: Russia
Distribution: Fedora Core
Posts: 30

Rep: Reputation: 16
Please help with socks in perl


Hello guys,

So I'm trying to connect to remote host via SOCKS5 proxy using IO::Socket:Socks module. How I can check the proxy is dead or remote host is dead when I get undef after constructor calling? The same about Net::SOCKS module. Thanks guys!!!

Last edited by alex1983-0112; 10-21-2009 at 04:35 AM.
 
Old 10-21-2009, 04:34 AM   #2
alex1983-0112
Member
 
Registered: Apr 2008
Location: Russia
Distribution: Fedora Core
Posts: 30

Original Poster
Rep: Reputation: 16
use IO::Socket::Socks;

my $sock = new IO::Socket::Socks(ProxyAddr=>"XXX.XXX.XXX.XXX",
ProxyPort=>"PXXX",
ConnectAddr=>"YYY.YYY.YYY.YYY",
ConnectPort=>PYYY,
AuthType=>"none",
SocksDebug=>1
);

if(!defined $sock) {
# How I can check who is dead XXX.XXX.XXX.XXX:PXXX or YYY.YYY.YYY.YYY:PYYY?
#
}
 
Old 10-21-2009, 05:19 AM   #3
alex1983-0112
Member
 
Registered: Apr 2008
Location: Russia
Distribution: Fedora Core
Posts: 30

Original Poster
Rep: Reputation: 16
No idea?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install socks 5 ? centosfan Linux - Server 4 02-23-2009 04:08 PM
ftp using socks amer_58 Linux - Newbie 0 04-19-2005 08:57 AM
Socks 5 where ? pakos Linux - Newbie 0 12-23-2004 08:58 AM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 08:09 PM
socks port vanibhat Linux - Networking 1 08-15-2003 11:32 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration