FTP-Proxy-Problem

H

Hirgumir

Hi,

I have a problem with ftpconnection via proxy.

|--------------------| |------| |------|
|local mit ftp client| -> |proxy | -> |host |
|--------------------| |------| |------|

The perlscript looks als follows: (i am using Linux)
#!/usr/local/bin/perl -w
use strict;

use Net::FTP;

my $TRUE = 1;
my $FALSE = 0;

my $prox="www-proxy.xxxxxxx:8080";
my $host="xxxxxx";

my $ftp = Net::FTP->new($host,Firewall => $prox, #thid is line 15
Debug => 1,
Timeout => 1000,
Passive => $TRUE) or
die "OOps\n";

$ftp->login("xxxxxxxx",'xxxxxxxx');

$ftp->binary();

my $result = $ftp->put("hallo","deldies.ftpt");

$ftp->quit();

This script writes folloing output:

Net::FTP>>> Net::FTP(2.72)
Net::FTP>>> Exporter(5.57)
Net::FTP>>> Net::Cmd(2.24)
Net::FTP>>> IO::Socket::INET(1.27)
Net::FTP>>> IO::Socket(1.28)
Net::FTP>>> IO::Handle(1.23)
Net::FTP: Unexpected EOF on command channel at ./ftptest.pl line 15
OOps


The connection works with "TotalCommnder" on a windows computer. The
connection and the filetransfer are working. The proxy is the same.

I would be glad. if anybody could help me to acomplish it with the
script on Linux.

Thanks in advance

Hirgumir
 
C

Charles DeRykus

Hi,

I have a problem with ftpconnection via proxy.

|--------------------| |------| |------|
|local mit ftp client| -> |proxy | -> |host |
|--------------------| |------| |------|

The perlscript looks als follows: (i am using Linux)
#!/usr/local/bin/perl -w
use strict;

use Net::FTP;

my $TRUE = 1;
my $FALSE = 0;

my $prox="www-proxy.xxxxxxx:8080";
my $host="xxxxxx";

my $ftp = Net::FTP->new($host,Firewall => $prox, #thid is line 15
Debug => 1,
Timeout => 1000,
Passive => $TRUE) or
die "OOps\n";

$ftp->login("xxxxxxxx",'xxxxxxxx');

$ftp->binary();

my $result = $ftp->put("hallo","deldies.ftpt");

$ftp->quit();

This script writes folloing output:

Net::FTP>>> Net::FTP(2.72)
Net::FTP>>> Exporter(5.57)
Net::FTP>>> Net::Cmd(2.24)
Net::FTP>>> IO::Socket::INET(1.27)
Net::FTP>>> IO::Socket(1.28)
Net::FTP>>> IO::Handle(1.23)
Net::FTP: Unexpected EOF on command channel at ./ftptest.pl line 15
OOps


The connection works with "TotalCommnder" on a windows computer. The
connection and the filetransfer are working. The proxy is the same.

I would be glad. if anybody could help me to acomplish it with the
script on Linux.

Pure guess but you may need to set the FirewallType option
From Net::FTP docs:

FirewallType - The type of firewall running on the
machine indicated by Firewall. This can be overridden by
an environment variable "FTP_FIREWALL_TYPE". For a list
of permissible types, see the description of
ftp_firewall_type in Net::Config.

HTH,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top