summaryrefslogtreecommitdiffstats
path: root/INF/DSRx020.pm
diff options
context:
space:
mode:
Diffstat (limited to 'INF/DSRx020.pm')
-rw-r--r--INF/DSRx020.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/INF/DSRx020.pm b/INF/DSRx020.pm
index d99cfad..fad319c 100644
--- a/INF/DSRx020.pm
+++ b/INF/DSRx020.pm
@@ -8,6 +8,7 @@ use IO::Socket::SSL qw();
use HTML::TreeBuilder;
use HTTP::Request::Common;
use LWP::UserAgent;
+use LWP::Protocol::socks;
use URI::Escape;
use File::Temp qw/ tempfile tempdir /;
use XML::Simple;
@@ -477,7 +478,13 @@ sub view($$) {
#print join( ' ', ( "java", "-cp", $cp, "com.avocent.video.Stingray", @$args ) ), "\n";
+ if ($self->{proxy_host}) {
+ system( "echo","java", "-DsocksProxyHost=".$self->{proxy_host},"-DsocksProxyPort=".$self->{proxy_port},"-cp", $cp, "com.avocent.video.Stingray", @$args );
+ system( "java", "-DsocksProxyHost=".$self->{proxy_host},"-DsocksProxyPort=".$self->{proxy_port},"-cp", $cp, "com.avocent.video.Stingray", @$args );
+
+ } else {
system( "java", "-cp", $cp, "com.avocent.video.Stingray", @$args );
+ }
}
@@ -604,6 +611,12 @@ sub new ($;$) {
$self->{host} = $parm->{host} || "127.0.0.1";
+ if (defined $parm->{proxy_host}) {
+ $self->{ua}->proxy([qw(http https)] => "socks://".$parm->{proxy_host}.":".$parm->{proxy_port});
+ $self->{proxy_host}= $parm->{proxy_host};
+ $self->{proxy_port}= $parm->{proxy_port};
+ }
+
$self->{user} = $parm->{user} || "Admin";
$self->{password} = $parm->{password} || "";