lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LYNX-DEV FTP & socks probably needs PASV or else not SHORTENED_RBIND


From: Tom Zerucha
Subject: LYNX-DEV FTP & socks probably needs PASV or else not SHORTENED_RBIND
Date: Thu, 14 Nov 1996 15:10:32 -0500 (EST)

On Thu, 14 Nov 1996, Foteos Macrides wrote:

>       Well, I looked real hard and don't see anything wrong with the
> code, but can't actually try it, so I may have a "blind" spot to something
> wrong in it.  I do want to get it squared away before my mods are included
> in the Composite.  Perhaps if you re-describe the problem, and a patch
> versus the lynx2-6mods replacements, to lynx-dev, explaining that it's
> a quickie fix that might help yield an optimum fix, others using SOCKs
> might also be able to help.

It is something really obscure since it doesn't affect any other proxies
or local connections, but except to close misconnections in HTTCP.c I
don't know of any #ifdef SOCKS enclosing a close.

From my HTTCP.c:

#ifdef SOCKS
    if (socks_flag) {
        status = Rconnect(*s, (struct sockaddr*)&soc_address,
                          sizeof(soc_address));
        /*BEGIN KLUDGE*/
        if( status < 0 && SOCKET_ERRNO == EISCONN ) {
          NETCLOSE(*s);
          status = Rconnect(*s, (struct sockaddr*)&soc_address,
                          sizeof(soc_address));
        }
        /*END KLUDGE*/
        /*  For long Rbind. */
        socks_bind_remoteAddr = soc_address.sin_addr.s_addr;
    } else
#endif /* SOCKS */
 
>       There was a lynx-dev message today, or last night, from someone
> having ftp problems, and the setup indicated socks.  I tried the ftp URL
> from here, and had no problems, but without socks.  He didn't indicate
> if he had the problem reliably, i.e., perhaps he just had a network
> glitch and transmission timeout, but it might be related.  What happens
> for you with ftp (see appended)?  He used PORT.  Do SOCKs servers
> require PASV?

They don't *require* it, but then you should avoid the SHORTENED_RBIND.

I would first suggest trying -DNOPORT since I have that and the URL that
was in your attachment worked from my system.

[Socks technical discussion follows]

The problem with shortened Rbind is that it has to guess at the
destination host, which is passed through in the long Rbind (The
destination host is needed so socks will know which local host to forward
the remote connection to - it has to expect the connect message).  The
first time through, it doesn't so it usually does something wrong.  What
is returned for the internet address then needs to be the socks host and
port where the bind actually happened to put into the PORT command.
Usually, somehing like 127.0.0.1, or 0.0.0.0 is put in when it can't
figure it out.

PASV reverses the process by telling the remote host to listen, and to
reply with the address and port where it is listening.  I think Netscape
uses PASV exclusively.  So connections are always initiated on the local
end eliminating the bind problem.

address@hidden
finger address@hidden for PGP key

;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]