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

[DeleGate-En] Re: How-to for the X11 proxy ?
09 Dec 2002 16:23:34 GMT feedback@delegate.org (Yutaka Sato)


Hi,

In message <_A2023@delegate-en.ML_> on 12/10/02(00:22:09)
you Florian DECKERT <pwidqbdyi-uqy4d4w4nhjr.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;

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