Net-SC
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Net/SC.pm view on Meta::CPAN
#######################################################################
#
# $Id: SC.pm,v 1.22 2009-11-14 10:18:40 gosha Exp $
#
# Socks Chain ( TCP only )
#
# Copyright (C) Okunev Igor gosha@prv.mts-nn.ru 2002-2006
#
# All rights reserved. This program is free software;
# you can redistribute it and/or modify it under the
# same terms as Perl itself.
#
########################################################################
package Net::SC;
use strict;
use vars qw( @ISA @EXPORT $VERSION );
use Fcntl qw(:DEFAULT :flock);
use Symbol;
use Config;
use Exporter;
use IO::Socket;
use MIME::Base64;
local $[ = 0;
($VERSION='$Revision: 1.21 $')=~s/^\S+\s+(\S+)\s+.*/$1/;
@ISA = qw( Exporter );
@EXPORT = qw( socks_error
SOCKS_GENERAL_SOCKS_SERVER_FAILURE
SOCKS_CONNECTION_NOT_ALLOWED_BY_RUL
SOCKS_NETWORK_UNREACHABLE
SOCKS_HOST_UNREACHABLE
SOCKS_CONNECTION_REFUSED
SOCKS_TTL_EXPIRED
SOCKS_COMMAND_NOT_SUPPORTED
SOCKS_ADDRESS_TYPE_NOT_SUPPORTED
SOCKS_OKAY
SOCKS_FAILED
SOCKS_NO_IDENT
SOCKS_USER_MISMATCH
SOCKS_INCOMPLETE_AUTH
SOCKS_BAD_AUTH
SOCKS_SERVER_DENIES_AUTH_METHOD
SOCKS_MISSING_SOCKS_SERVER_NET_DATA
SOCKS_MISSING_PEER_NET_DATA
SOCKS_SOCKS_SERVER_UNAVAILABLE
SOCKS_TIMEOUT
SOCKS_UNSUPPORTED_PROTOCOL_VERSION
SOCKS_UNSUPPORTED_ADDRESS_TYPE
SOCKS_HOSTNAME_LOOKUP_FAILURE
);
#
# òÁÓÛÉÒÅÎÎÙÅ ÓÏÏÂÝÅÎÉÑ ÏÂ ÏÛÉÂËÁÈ
#
use constant SOCKS_MSG => {
1 => 'general SOCKS server failure', # SOCKS5
2 => 'connection not allowed by ruleset',
3 => 'network unreachable',
4 => 'host unreachable',
5 => 'connection refused',
6 => 'TTL expired',
7 => 'command not supported',
8 => 'address type not supported',
90 => 'okay', # SOCKS4
91 => 'failed',
92 => 'no ident',
93 => 'user mismatch',
100 => 'incomplete auth', # generic
101 => 'bad auth',
102 => 'server denies auth method',
202 => 'missing SOCKS server net data',
203 => 'missing peer net data',
204 => 'SOCKS server unavailable',
205 => 'timeout',
206 => 'unsupported protocol version',
207 => 'unsupported address type',
208 => 'hostname lookup failure'
};
#
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.796 second using v1.00-cache-2.02-grep-82fe00e-cpan-dad7e4baca0 )