From bf5eb90cfb12c5070db6726af98d1d464bdb4ea3 Mon Sep 17 00:00:00 2001 From: minima Date: Thu, 14 Jun 2001 23:18:35 +0000 Subject: [PATCH] allow sh/qrz to use a http proxy --- Changes | 4 +++- cmd/show/qrz.pl | 10 +++++++--- perl/Internet.pm | 15 +++++++++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index 425119d3..a77da2c1 100644 --- 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 diff --git a/cmd/show/qrz.pl b/cmd/show/qrz.pl index c20be45d..0d6e2d48 100644 --- a/cmd/show/qrz.pl +++ b/cmd/show/qrz.pl @@ -13,17 +13,21 @@ my @out; return (1, $self->msg('e24')) unless $Internet::allow; return (1, "SHOW/QRZ , 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"); diff --git a/perl/Internet.pm b/perl/Internet.pm index 32c62742..49cc1ff6 100644 --- a/perl/Internet.pm +++ b/perl/Internet.pm @@ -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 # -- 2.34.1