Article delegate-en/4924 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]

Newsgroups: mail-lists.delegate-en

[DeleGate-En] FTP to SFTP gateway: multiple destinations
24 Oct 2010 01:51:23 GMT Filipe Brandenburger <phqjqbdyi-j73qrjjcemlr.ml@ml.delegate.org>


Hello,

First of all, let me say that DeleGate is an awesome software (even
though it's very complex!), I'm finding lots of uses for it, I'm
really glad I found it.

I have to upload files to SFTP servers, but my custom application
supports only FTP client, so I am using DeleGate to do the proxy.

Currently I am using a command line such as this one to translate FTP
on local port 21 to SFTP on remote host upload.example.com:

# delegated -P127.0.0.1:21 SERVER=ftp MOUNT="/*
sftp://upload.example.com//* logindir" RELAY=no FTPCONF=hideserv

Then if I want to upload to sftp://upload.example.com/ with user
"myuser" and password "www123", I just do something like this (some
lines omitted):

    # ftp localhost
    220 127.0.0.1 PROXY-FTP server (DeleGate/9.9.7) ready.
    Name (localhost:root): myuser
    331 Password required for myuser.
    Password: www123
    230 { connected to a FTP server }
    ftp> pwd
    257 "/home/myuser"

It works just fine, but now I would like to be able to use the gateway
to connect to multiple SFTP servers each with different username and
password and possibly a non-standard port (say,
myuser:www123@example.., jsmith:john999@example..:8022
and upload:delegate@example..).

I saw the option about mounting them as subdirectories (MOUNT="/net
sftp://edi.example.net//*"), but I didn't like that option because:
1) Authentication is deferred and I don't get an error right away if I
use the wrong password;
2) If you start changing paths going into a server path and back, it
gets kind of lost in the structure;
3) Root directory listing is weird with a dummy file only.

I would like to be able to access a different server depending on the
specified username, or use an @vhost syntax in the user authentication
to do that (like if I could specify the "MOUNT" parameter
conditionally depending on which user authenticated).

For example:
1) if I authenticate with myuser@com, then act as if I specified
MOUNT="/* sftp://upload.example.com//* logindir" and authenticated
with "myuser" (this is the user that gets passed to the SFTP server)
2) if I authenticate with jsmith@net, then act as if I specified
MOUNT="/* sftp://edi.example.net:8022//* logindir" and authenticated
with "jsmith" (this is the user that gets passed to the SFTP server)
3) if I authenticate with upload@org, then act as if I specified
MOUNT="/* sftp://sftp.example.org//* logindir" and authenticated with
"upload" (this is the user that gets passed to the SFTP server)

The mapping com -> upload.example.com is something I would like to
define in some file or command line for DeleGate, if possible I would
like not to use the destination SFTP server name since there are
custom ports and I would like to be able to change that name in
DeleGate only and have the application know just a "symbolic" name.

Is this at all possible with DeleGate? Even if it's not possible to
define MOUNT=... conditionally, is it possible to accomplish this in
some other way?

Thank you very much for an awesome software product!

Filipe

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V