X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=videosite-dl.pl;h=1b0079ca0b478e3aa2765f49c36bb553a3d16279;hb=422536027a2fb0656c25e18dba1e342c70533655;hp=15e1bcabec85c8879061566f3849997a6ad66b98;hpb=828bd4a062beaea4f43b4d161803b6152e6b65b2;p=videosite.git diff --git a/videosite-dl.pl b/videosite-dl.pl index 15e1bca..1b0079c 100755 --- a/videosite-dl.pl +++ b/videosite-dl.pl @@ -48,6 +48,21 @@ sub ploader { return @g; } +sub connectors { + my $c = {name => 'environment', schemas => {}}; + + if (exists($ENV{'http_proxy'})) { + $c->{schemas}->{'http'} = $ENV{'http_proxy'} + } + + if (exists($ENV{'https_proxy'})) { + $c->{schemas}->{'https'} = $ENV{'https_proxy'} + } + + return ( $c ); +} + + my $hq = 0; my $ext = '.flv'; my $y; @@ -75,6 +90,7 @@ unless(@g and defined($f)) { foreach (@g, $f) { $_->setio(sub { printf(@_); print("\n"); } ); + $_->setconn(\&connectors); if ($debug) { $_->setdebug(1);