allow sh/qrz to use a http proxy
authorminima <minima>
Thu, 14 Jun 2001 23:18:35 +0000 (23:18 +0000)
committerminima <minima>
Thu, 14 Jun 2001 23:18:35 +0000 (23:18 +0000)
Changes
cmd/show/qrz.pl
perl/Internet.pm

diff --git a/Changes b/Changes
index 425119d3c3fd3e978f29f03b34b5a58cb818f3f2..a77da2c14ec990ea244461828c3fc5044afd4f50 100644 (file)
--- a/Changes
+++ b/Changes
@@ -4,7 +4,9 @@
 script
 3. Added input route filtering
 4. put back the set/isolate logic into routing which is now overridable with
-filters whcih means a default filter is no longer generated.
+filters whcih means a default filter is no longer generated. If you want the
+OLD behaviour, do rm /spider/filter/route/*.pl*, restart and try again. 
+5. Add http_proxy to Internet.pm and allow sh/qrz to use an HTTP Proxy
 13Jun01=======================================================================
 1. fix init cnd rinit cmds
 2. add missing clear/route cmd
index c20be45deeb06f2c9f636145d3daee4ad8997ed6..0d6e2d487d0bf7ab4f572b63b6a3911c817cf328 100644 (file)
@@ -13,17 +13,21 @@ my @out;
 
 return (1, $self->msg('e24')) unless $Internet::allow;
 return (1, "SHOW/QRZ <callsign>, e.g. SH/QRZ g1tlh") unless @list;
+my $target = $Internet::http_proxy || 'qrz.com';
+my $port = $Internet::http_proxy_port || 80;
+my $url = '';
+$url = 'http://qrz.com' if $Internet::http_proxy; 
 
 use Net::Telnet;
 
 my $t = new Net::Telnet;
 
 foreach $l (@list) {
-       $t->open(Host     =>  "qrz.com",
-                        Port     =>  80,
+       $t->open(Host     =>  $target,
+                        Port     =>  $port,
                         Timeout  =>  15);
        if ($t) {
-               my $s = "GET /dxcluster.cgi?callsign=$l\&uid=$Internet::qrz_uid\&pw=$Internet::qrz_pw HTTP/1.0\n\n";
+               my $s = "GET $url/dxcluster.cgi?callsign=$l\&uid=$Internet::qrz_uid\&pw=$Internet::qrz_pw HTTP/1.0\n\n";
 #              print $s;
                $t->print($s);
                Log('call', "$call: show/qrz \U$l");
index 32c62742c8a25b01991d0d5c667ef566302d3b76..49cc1ff6376adcd687e6b2ac2a6acd56621d2aa5 100644 (file)
@@ -40,6 +40,21 @@ $qrz_uid = undef;
 
 $qrz_pw = undef;
 
+#
+# the address of any HTTP proxy you might be using
+#
+# leave as is unless you need one
+#
+
+$http_proxy = undef;
+
+#
+# HTTP proxy port - again leave alone unless you need this
+#
+
+$http_proxy_port = undef;
+
+
 #
 # end
 #