On 06/04/04(04:21) you Travice Dane <nycstealth2002@yahoo..> wrote in <_A2632@delegate-en.ML_> |We use delegate to proxy ssl encrypted telnet connections from our external clients to a telnet server inside. Everything works just fine. Unfortunately, those connections can remain inactive (idle) for a quite long period of time. Because some of our clients have outbound firewalls with connection idle timeout, an inactive connection gets killed. I'm wondering, is any way to make delegate to create some fake activity to keep the connection alive? DeleGate sets SO_KEEPALIVE for both of client-side and server-side connections at the start. If a client can control the interval of TCP level Keep-Alive packet (keep-alive probe) on his/her host, it will solve the problem. Another unexpected TCP disconnection can occur by the timeout of idle connection by DeleGate itself. It can be disabled with TIMEOUT="idle:0" (the default value is 600 seconds). For situations where these configurations are not effective, I can introduce a mechanism to send out NOP command periodically on Telnet connections with client and server, like the enclosed patch. This patch is enabled with TIMEOUT="idle:0" option. Cheers, Yutaka -- D G Yutaka Sato <pfqcabdyi-mxhgu43r633w.ml@delegate.org> http://delegate.org/y.sato/ ( - ) National Institute of Advanced Industrial Science and Technology _< >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan Do the more with the less -- B. Fuller *** ../dist/delegate8.9.5/src/telnet.c Mon Mar 8 17:33:27 2004 --- telnet.c Sat Jun 12 12:47:10 2004 *************** *** 150,158 **** --- 150,164 ---- { int cnt,rcc,ci,cj; char *sdir; int start,nready; + int keepalive; rcc = 0; start = time(0); + keepalive = 0; + if( timeout == 0 ){ + keepalive = 1; + timeout = 60; + } for( cnt = 0; cnt < 10; cnt++ ){ if( THREAD ) nready = thread_PollIn(sock,timeout*1000); *************** *** 170,175 **** --- 176,188 ---- break; } if( nready == 0 ){ + if( keepalive ){ + Verbose("%s generate NOP\n",what); + rcc = sizeof(NOPstr); + bcopy(NOPstr,buf,rcc); + break; + } + if( timeout <= time(0)-start ){ sv1log("Timedout %d sec. (by TIMEOUT=io:%ds)\n", timeout,timeout);