Article delegate-en/95 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]
[Reference:<_A94@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: XDC MODE with Proxy
15 Sep 1998 10:28:26 GMT ysato@etl.go.jp (Yutaka Sato 佐藤豊)


Hi Piero,

In message <_A94@delegate-en.ML_>
on 09/15/98(01:04:34)
you "Piero Berritta" <plqaabdyi-znqnbumvoylr.ml@ml.delegate.org> wrote:
 |## SSLway[1562](192.168.111.50) start
 |## SSLway[1562](192.168.111.50) accepted
 |## SSLway[1562](192.168.111.50) client's cert. = NONE
 |09/14 17:02:51.70 [1561] 1+0: Unknown request: MODE XDC^M
 |09/14 17:02:55.62 [1563] 2+0: -- Fork(OnetimeServer): 1560 -> 1563
 |
 |I get this error as soon I issue a dir command (a data connection request)
 |from client.

I see.  I recognized two problems; XDC mode has not been supported in
(not bound) proxy FTP-DeleGate, and FTP-DeleGate which forwards to
another with "PROXY" parameter makes needless re-initialization
of connection (with external filter set) toword the proxy server.
I enclosed a patch to make DeleGate cope with your case.

Cheers,
Yutaka
--
Yutaka Sato <ysato@etl.go.jp> http://www.etl.go.jp/~ysato/   @ @ 
Computer Science Division, Electrotechnical Laboratory      ( - )
1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan            _<   >_

*** ../dist/delegate5.6.6/src/ftp.c	Wed Aug 19 15:40:42 1998
--- ftp.c	Tue Sep 15 19:18:56 1998
***************
*** 605,610 ****
--- 605,616 ----
  	if( strcasecmp(com,"SYST") == 0 ){
  		fprintf(tc,"500 SYST command is not supported.\r\n");
  	}else
+ 	if( strcasecmp(com,"MODE") == 0 ){
+ 		fprintf(tc,"200 MODE %s Ok.\r\n",arg);
+ 		if( strcaseeq(arg,"XDC") )
+ 			FS->fs_modeXDC = 1;
+ 		else	FS->fs_modeXDC = 0;
+ 	}else
  	if( strcasecmp(com,"PORT") == 0 ){
  		setupPORT(Conn,FS,NULL,NULL,tc,arg);
  	}else
***************
*** 865,870 ****
--- 871,877 ----
  
   fprintf(tc,"220- %s PROXY-FTP server (DeleGate %s) ready.\r\n",
  	myhost,DELEGATE_ver());
+  fprintf(tc,"%s\r\n",XDC_OPENING);
   fprintf(tc,"220--  @ @  \r\n");
   fprintf(tc,"220-- ( - ) { %s }\r\n",DELEGATE_version());
   fprintf(tc,"220- You can connect to a SERVER by `user' command:\r\n");
***************
*** 2476,2481 ****
--- 2483,2490 ----
  			}
  			PFS->fs_dport[0] = 0;
  		}
+ 		if( PFS )
+ 			FS->fs_modeXDC = PFS->fs_modeXDC;
  
  		RESP = resp + strlen(resp);
  		if( PATHCOMS(PFC->fc_swcom) ){
***************
*** 2701,2707 ****
--- 2710,2722 ----
  		if( strcasecmp(com,"USER") == 0 && xserv[0] ){
  			sprintf(cserv,"%s@%s",arg,xserv);
  			if( check_server(cserv,com,tc) == 0 )
+ 			{
+ 				if( toProxy ){
+ 					sprintf(arg+strlen(arg),"@%s",xserv);
+ 					sprintf(req,"%s %s\r\n",com,arg);
+ 				}else
  				goto SWSERV;
+ 			}
  			else	continue;
  		}else
  		if( strncasecmp(req,"MODE ",5) == 0 ){

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