[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Patch to add direct FTP proxy support in kio_ftp
From:       Dawit Alemayehu <adawit () kde ! org>
Date:       2001-06-28 16:39:52
[Download RAW message or body]

On Thursday 28 June 2001 05:43, Michael Goffioul wrote:
> > Hi Michael,
> >
> > Personally I see few problems with this patch:
>
> I never said it was THE patch. I posted to points the needed changes to
> support a real FTP proxy server (DeLeGate). It was hard to dig into kio/ftp
> code and I'm pretty sure I didn't get everything, so I choose the easiest
> solutions. Someone involved in kio development would probably find more
> elegant solutions that does the same.

I understand and one of those people at least in terms of proxy configuration 
is me.  When I said personally I did not mean for it to sound harsh, perhaps that
should have been IMHO :)

> > The first one of my concerns/problems is with the '@' workaround.  IMHO
> > noone should circumvent a standard and send un-encoded '@' when the
> > specification explicitly states otherwise.  See RFC 2396 section 3.2. 
> > Though this might have worked for you in this particular scenario for
> > now, there is no guarantee this will work on for everyone or even for you
> > down the road because the remote machine(s) at some point and time might
> > not accept the un-encoded '@' in the username.  You have to be careful
> > with such hacks since it possibly involves machines beyond your control. 
> > My only advice here is you change the username if possible.
>
> I didn't get your point here. The patch I posted avoid having username in
> the URL in the form of login@host:port, so you don't have garbage '@'
> anymore. On the other hand the patch simply change how the ftp ioslave
> issues a "USER" command: instead of the form "USER login", it issues "USER
> login@remote:host". But this command is issued to the FTP proxy server (not
> the target remote FTP server) and this proxy server SHOULD understand it,
> as it is how it works. The FTP proxy server does NOT ask for "USER
> login%40host:port" with the '@' encoded, it simply won't work. So I don't
> see the point here with the encoded '@'.

Hmm... then I think I mis-understood your prior comment.  However that does not
change the fact that this is still a workaround for the legacy?? ftp proxy server.
Otherwise, the server would not have allowed reserved characters within the
username like it does now :)

> > The other problem is that the KProtocolManager patch is well wrong for
> > luck of better words.  We currently do not allow per-host proxy settings.
> >  The proxy settings are global and the actual method you want to change
> > is KProtocolManager::slaveProtocol(). In there we simply assume that
> > everything that uses proxy uses an http proxy.  We should instead obtain
> > the protocol from the set proxy address to allow for this type of
> > proxying.  Then all you have to do is to simply enter the correct proxy
> > address at the config dialog.  Fixed.
>
> I see 2 problems to this way:
>
> - The protocol used for FTP proxy is http, you don't have any control on this in
> the config dialog

That is why we are going to have a new config dialog for configuring proxies very
soon :)

> - This won't work with auto-proxy configuration, which is my case, because
> what you propose implies to use manual proxy configuration, an auto-proxy
> will override everything, and the auto-proxy will of course redirect you to
> the classical HTTP proxy

Nope.  Perhaps I should have been a bit more clearer about this.  The scheduler,
which manages the io-slaves, determines whether or not a proxy is supposed to
be used for the current connection by looking at one overloaded function: 
::slaveProtocol.  These functions determine which io-slave is the actual io-slave
that should be used to retreive the request.  Usually, i.e. when no proxy useage
is requested, this does not matter, but if proxy useage is necessary then the most
common setup is to route requests over the http io-slave since most proxy servers
communicate over HTTP.  And this is where the problem comes in.  In the two overloaded
functions, we have hard-coded the io-slave to be "http" whenever an FTP connection
is requested instead of honoring what the user-setup.  In other words we completely ignore
the fact that people such as yourself might have direct FTP proxy servers as well.  This
is what my patch fixes.  It simply changes this hard-coded "http" limitation and instead
determines the io-slave to use from the "protocol" of the actual proxy server URL.

> Here, we have a auto-proxy configuration (for HTTP and FTP) and a real FTP
> proxy server. The patch I proposed allows you to use the HTTP auto-proxy
> for http request AND the real FTP proxy for ftp request. By setting the
> config variable "UseFtpProxyServer" to false, you will then disable the FTP
> proxy and use the classical HTTP proxy for ftp requests also. The only way
> I found to do that was to add a test in proxyForURL before the switch
> statement in ftp.cc.

See above why IMHO this is not necessary, i.e. yet another configure option :)

Regards,
Dawit A.
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic