IO-Socket-DNS
view release on metacpan or search on metacpan
=> Options
=> Advanced
=> Network
=> Settings
=> [X] Manual proxy configuration
=> SOCKS Host: 192.168.0.101 Port: 1080 (or whatever IP:Port used for -D in step 2)
=> [OK]
Then surf away.
CONSTRUCTOR
The "new" constructor takes arguments in key-value pairs:
PeerAddr Remote host address <hostname>[:<port>]
PeerHost Synonym for PeerAddr <hostname>[:<port>]
PeerPort Remote port <port>
Suffix Proxy DNS Suffix <domain>
Password Access password <password>
Verbose Used for debugging <level>
If only one argument is passed, it is considered to be "PeerAddr". The
"PeerAddr" can be a hostname or IP-Address.
The "PeerPort" specification can also be embedded in the "PeerAddr" by
preceding it with a ":". The "PeerPort" must be in numeric form.
The "Password" setting is to prove to the server that you are authorized
to use it. The environment variable DNS_PASSWORD may also be used to
define this setting. Default is no password.
If "Verbose" is specified, additional diagnostic information will be
sent to STDERR.
The "Suffix" argument must be a real domain name or subdomain that is
delegated to an IP running the IO::Socket::DNS::Server instance. The
environment variable DNS_SUFFIX may also be used to define this setting.
This is required.
EXAMPLES
my $sock = IO::Socket::DNS->new(
PeerAddr => "www.perl.org",
PeerPort => 80,
Verbose => 1,
Suffix => "d.example.com",
) or die "connect: $!";
$ENV{DNS_SUFFIX} = "d.example.com";
my $sock = new IO::Socket::DNS "www.perl.org:80";
KNOWN ISSUES
It is still very slow. There are several optimizations that can be done
in order to improve the performance to make it faster, but none of these
have been implemented yet.
The Password setting is not implemented yet. So anyone can use your
server without your permission fairly easily and you could be blamed for
any malicious traffic tunnelled through it.
Sockets idle for more than 120 are automatically closed on the server
side. You have to keep probing to keep the connection alive.
Since DNS, for the most part, is UDP, which is a "connectionless"
protocol, IO::Socket::DNS does not implement the FILENO hook for its
TIEHANDLE, so things like IO::Select won't work as expected.
Only TCP protocol is supported at this time.
Patches are welcome, or if you have other ideas for improvements, let me
know.
DISCLAIMER
This software is provided AS-IS for proof of concept purposes only. I
can not be held liable for any loss or damages due to misuse or illegal
or unlawful violations in conjunction with this software. Use at your
own risk of punishing condemnation of all types of ISPs and law
enforcement everywhere. If you do get in trouble, just DON'T BLAME ME!
And please don't abuse this too much or else hotspot admins everywhere
will wise up and start locking out all DNS queries!
SEE ALSO
Net::DNS, IO::Socket, dnsc, iodine
AUTHOR
Rob Brown, <bbb@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2011 by Rob Brown
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself, either Perl version 5.8.9 or, at
your option, any later version of Perl 5 you may have available.
( run in 1.719 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )