Article delegate-en/2026 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:<_A2024@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: How-to for the X11 proxy ?
10 Dec 2002 10:53:28 GMT Florian DECKERT <pwidqbdyi-xtqvdm2knljr.ml@ml.delegate.org>


Hello Mr Yukata,

Thank for your patch, it's running (I just had to fix a small buffer 
overlay problem).
As a contribution I will write a small extention to the manual to 
explain how to use the X11 proxy (for the only command I know about 'x') 
and how to use it being a NAL firewall.

Do you plan to add this patch to CVS ? Or is it recommanded I keep it so 
that I can apply it on the next release ?

regards

Yutaka Sato wrote:

>Hi,
>
>In message <_A2023@delegate-en.ML_> on 12/10/02(00:22:09)
>you Florian DECKERT <pwidqbdyi-xtqvdm2knljr.ml@ml.delegate.org> wrote:
> |But now I'm trying to do something more tricky, I would like delegated 
> |to setup the DISPLAY ip address not to the real ip adress of the 
> |delegate server, but to a NAT translated adress. The X11 proxy is 
> |located behind a NAT firewall.
> |
> |The real ip adress of delegate is 172.16.9.5
> |it's NAt address is 192.168.0.2
> |
> |with "delegated -f -P8023 SERVER=telnet" the DISPLAY variable is set to 
> |172.16.9.5 (real). Is there a option to force delegate to use the NAT 
> |adress ?
> |
> |I tried "SRCIF=192.168.0.2" but it did not work.
>
>SRCIF seems the right parameter to specify the forced display name,
>and indeed it works when DeleGate can do bind() the address to the
>socket to be connected to the telnet server.  But it does not work
>when the specified address is not valid for bind().  So I'll extend
>telnet.c like enclosed patch with which you can use it like following
>parameer to get DISPLAY variable as you expected.
>
>  SRCIF="192.168.0.2:*:X"
>
>Cheers,
>Yutaka
>--
>  @ @ Yutaka Sato <y.sato@delegate.org> http://www.delegate.org/y.sato/
> ( - ) National Institute of Advanced Industrial Science and Technology (AIST)
>_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
>Do the more with the less -- B. Fuller
>
>
>*** 8.2.0/src/telnet.c	Thu Oct 10 07:39:41 2002
>--- src/telnet.c	Tue Dec 10 00:57:55 2002
>***************
>*** 1045,1050 ****
>--- 1045,1064 ----
>  	ClientIF_HP(Conn,myhp);
>  	sprintf(me,"%s://%s/",DFLT_PROTO,myhp);
>  	xpid = makeXproxy(Conn,Xproxy,Xdisplay,myname,peername,me,0);
>+ 
>+ 	/* if SRCIF="proxyDisplay:*:X" is given */{
>+ 		char xdisp[256],odisp[256],*dp;
>+ 		int xport;
>+ 
>+ 		if( SRCIFfor(Conn,"X",peername,0,xdisp,&xport) ){
>+ 			dp = wordscanY(Xproxy,odisp,sizeof(odisp),"^:");
>+ 			if( *dp == ':' ){
>+ 				sv1log("#### Xproxy = %s (%s)\n",xdisp,odisp);
>+ 				sprintf(Xproxy,"%s:%s",xdisp,dp+1);
>+ 			}
>+ 		}
>+ 	}
>+ 
>  	sv1log("#### Xproxy[%d]: %s <- %s <- %s\n",
>  		xpid,Xdisplay,Xproxy,peername);
>  	return xpid;
>
>  
>


-- 
Florian DECKERT
System Manager
tel : +30 0 00 00 00 0f
SOPRA Group 
PAE Les glaisins bp238 - 74940 Annecy le vieux cedex - France
--
"Welcome to the real world" (The Matrix : 1999)
--
Ce message est exclusivement destiné aux personnes dont le nom figure ci-dessus. Il peut contenir des informations confidentielles dont la divulgation est à ce titre rigoureusement interdite en l'absence d'autorisation nominative explicite de l'émetteur. Dans l"hypothèse où vous auriez reçu ce message par erreur, merci de le renvoyer à l'adresse électronique ci-dessous et de détruire toute copie.

This message may contain confidential and proprietary material for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies


*** 8.2.0/src/telnet.c	Thu Oct 10 07:39:41 2002
--- src/telnet.c	Tue Dec 10 00:57:55 2002
***************
*** 1045,1050 ****
--- 1045,1064 ----
  	ClientIF_HP(Conn,myhp);
  	sprintf(me,"%s://%s/",DFLT_PROTO,myhp);
  	xpid = makeXproxy(Conn,Xproxy,Xdisplay,myname,peername,me,0);
+ 
+ 	/* if SRCIF="proxyDisplay:*:X" is given */{
+ 		char xdisp[256],odisp[256],*dp;
+ 		int xport;
+ 
+ 		if( SRCIFfor(Conn,"X",peername,0,xdisp,&xport) ){
+ 			dp = wordscanY(Xproxy,odisp,sizeof(odisp),"^:");
+ 			if( *dp == ':' ){
+ 				sv1log("#### Xproxy = %s (%s)\n",xdisp,odisp);
+				strcpy (odisp, dp+1);
+ 				sprintf(Xproxy,"%s:%s",xdisp,odisp);
+ 			}
+ 		}
+ 	}
+ 
  	sv1log("#### Xproxy[%d]: %s <- %s <- %s\n",
  		xpid,Xdisplay,Xproxy,peername);
  	return xpid;

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