• Getting the telnet port number

    From Ree@VERT to All on Wed Jan 19 10:14:09 2011
    Hey, I'm working on a WebSocket to telnet re-director for Synchronet, and haveãa few questions:ãã1) Is there a property/method I can use to determine what port the telnetãserver is running on? Currently I've hardcoded to connect toãsystem.local_host_name on port 23, but ideally I'd like the port number toãcome from a variable like the host name doesãã2) Will there be a problem with possibly having multiple connections from theãsame IP address? For example 5 different people could all be connecting via aãWebSocket client, and so the WebSocket server will see 5 unique IP addresses,ãbut then the Telnet server will see 5 connections from 127.0.0.1. If if'sãpossible that some systems have a "only 1 connection per IP" rule in place,ãthat'd be problematic, but I don't know if that's an option, or commonlyãenforced if it is.ãã3) How do I get the service included in the official Synchronet releaseãarchives (hopefully enabled by default, but even if it's disabled but includedãthat would be great too)? Or do I just distribute on my own site and hopeãpeople find it?ããThanks,ãRickã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From echicken@VERT/ECBBS to Ree on Thu Jan 20 13:04:38 2011
    Re: Getting the telnet port numberã By: Ree to All on Wed Jan 19 2011 10:14:09ãã > 1) Is there a property/method I can use to determine what port the telnetã > server is running on? Currently I've hardcoded to connect toã > system.local_host_name on port 23, but ideally I'd like the port number toã > come from a variable like the host name doesããYou could use the INI parsing functions to read that out ofã/sbbs/ctrl/sbbs.ini, like so:ããvar f = new File(system.ctrl_dir + "sbbs.ini");ãf.open("r");ãvar telnetPort = f.iniGetValue("BBS", "TelnetPort");ãf.close();ãã(That's off the top of my head, syntax may differ slightly.)ãã > 2) Will there be a problem with possibly having multiple connections from thã > same IP address? For example 5 different people could all be connecting viaããNot that I'm aware of - typically it's a matter of disallowing multiple logonsãfrom the same account rather than IP - but there could be such a settingãsomewhere. If so, not enabled by default afaik.ãã > 3) How do I get the service included in the official Synchronet releaseã > archives (hopefully enabled by default, but even if it's disabled but includã > that would be great too)? Or do I just distribute on my own site and hopeã > people find it?ããAsk DM for a CVS account, or ask someone with a CVS account to post it for you.ããechickenãelectronic chicken bbs - bbs.electronicchicken.com - 416-273-7230ãã---ã þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.comã
  • From Digital Man@VERT to Ree on Thu Jan 20 18:53:01 2011
    Re: Getting the telnet port numberã By: Ree to All on Wed Jan 19 2011 10:14 amãã > Hey, I'm working on a WebSocket to telnet re-director for Synchronet, andã > have a few questions:ã >ã > 1) Is there a property/method I can use to determine what port the telnetã > server is running on? Currently I've hardcoded to connect toã > system.local_host_name on port 23, but ideally I'd like the port number toã > come from a variable like the host name doesããTry server.socket.local_port.ãã > 2) Will there be a problem with possibly having multiple connections fromã > the same IP address? For example 5 different people could all beã > connecting via a WebSocket client, and so the WebSocket server will see 5ã > unique IP addresses, but then the Telnet server will see 5 connections fromã > 127.0.0.1. If if's possible that some systems have a "only 1 connectionã > per IP" rule in place, that'd be problematic, but I don't know if that's anã > option, or commonly enforced if it is.ããNo, that should not be a problem.ãã > 3) How do I get the service included in the official Synchronet releaseã > archives (hopefully enabled by default, but even if it's disabled butã > included that would be great too)? Or do I just distribute on my own siteã > and hope people find it?ããYou can send me the file(s) and I can commit them to CVS for you if you wish.ãIf you think you might be performing continual improvements/updates, I can giveãyou CVS access to commit changes yourself if you wish.ãã digital manããSnapple "Real Fact" #46:ãElephants are the only mammal that cannot jump.ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Ree@VERT to echicken on Tue Jan 25 05:08:25 2011
    You could use the INI parsing functions to read that out ofã > /sbbs/ctrl/sbbs.ini, like so:ããDidn't even think of doing it that way...worked perfect, thanks!ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Ree@VERT to Digital Man on Tue Jan 25 05:40:08 2011
    Try server.socket.local_port.ããserver.socket is undefined for me. Is that a recent addition that isn't inãthe latest Win32 development build? (EXEs look to be from May)ãã > You can send me the file(s) and I can commit them to CVS for you if youã > wish. If you think you might be performing continual improvements/updates,ã > I can give you CVS access to commit changes yourself if you wish.ããA CVS account would be great, as the WebSocket protocol is likely to changeãand then I won't have to repeatedly bug anyone.ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Digital Man@VERT to Ree on Tue Jan 25 14:14:30 2011
    Re: Re: Getting the telnet port numberã By: Ree to Digital Man on Tue Jan 25 2011 05:40 amãã > > Try server.socket.local_port.ã >ã > server.socket is undefined for me. Is that a recent addition that isn't inã > the latest Win32 development build? (EXEs look to be from May)ãããIt should be. In what context are you running (e.g. jsexec, service, webãserver, terminal server, etc.)?ãã > > You can send me the file(s) and I can commit them to CVS for you if youã > > wish. If you think you might be performing continualã > > improvements/updates, I can give you CVS access to commit changesã > > yourself if you wish.ã >ã > A CVS account would be great, as the WebSocket protocol is likely to changeã > and then I won't have to repeatedly bug anyone.ããEmail me the username and password you would like to use for CVS.ãã digital manããSnapple "Real Fact" #58:ãA sneeze travels out of your nose at 100mph.ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Ree@VERT to Digital Man on Wed Jan 26 09:58:23 2011
    Try server.socket.local_port.ã > >ã > > server.socket is undefined for me. Is that a recent addition that isn'tã > > in the latest Win32 development build? (EXEs look to be from May)ã > ã > ã > It should be. In what context are you running (e.g. jsexec, service, webã > server, terminal server, etc.)?ããIt's running as a service.ãã > Email me the username and password you would like to use for CVS.ããOK, I'll do that in a second.ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Digital Man@VERT to Ree on Wed Jan 26 17:09:47 2011
    Re: Re: Getting the telnet port numberã By: Ree to Digital Man on Wed Jan 26 2011 09:58 amãã > > > > Try server.socket.local_port.ã > > >ã > > > server.socket is undefined for me. Is that a recent addition thatã > > > isn't in the latest Win32 development build? (EXEs look to be fromã > > > May)ã > >ã > >ã > > It should be. In what context are you running (e.g. jsexec, service, webã > > server, terminal server, etc.)?ã >ã > It's running as a service.ããThat's wierd, server.socket should definitely be defined. What version ofãSynchronet are you using?ãã digital manããSnapple "Real Fact" #143:ãQ is the only letter in the alphabet not appearing in the name of any U.S. state. ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Ree@VERT to Digital Man on Wed Jan 26 19:38:11 2011
    That's wierd, server.socket should definitely be defined. What version ofã > Synchronet are you using?ããThe latest developer build EXEs for Windows, which are dated May 2010. Here'sãthe results of a for (var prop in server) log(LOG_DEBUG, prop + "=" +ãserver[prop]);ãã 1/26 10:24:43p 0632 WebSocket JavaScript service thread startedã 1/26 10:24:43p 0632 WebSocket version=Synchronet Services 1.245ã 1/26 10:24:43p 0632 WebSocket version_detail=Synchronet Services 1.245ãCompiled May 14 2010 05:07:32 with MSC 1200ã 1/26 10:24:43p 0632 WebSocket interface_ip_address=0.0.0.0ã 1/26 10:24:43p 0632 WebSocket options=2048ã 1/26 10:24:43p 0632 WebSocket clients=1ããwhich does match what I found in the documentation here:ãhttp://www.synchro.net/docs/jsobjs.html#serverã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Digital Man@VERT to Ree on Thu Jan 27 14:23:44 2011
    Re: Re: Getting the telnet port numberã By: Ree to Digital Man on Wed Jan 26 2011 07:38 pmãã > > That's wierd, server.socket should definitely be defined. What versionã > > of Synchronet are you using?ã >ã > The latest developer build EXEs for Windows, which are dated May 2010.ã > Here's the results of a for (var prop in server) log(LOG_DEBUG, prop + "="ã > + server[prop]);ã >ã > 1/26 10:24:43p 0632 WebSocket JavaScript service thread startedã > 1/26 10:24:43p 0632 WebSocket version=Synchronet Services 1.245ã > 1/26 10:24:43p 0632 WebSocket version_detail=Synchronet Services 1.245ã > Compiled May 14 2010 05:07:32 with MSC 1200ã > 1/26 10:24:43p 0632 WebSocket interface_ip_address=0.0.0.0ã > 1/26 10:24:43p 0632 WebSocket options=2048ã > 1/26 10:24:43p 0632 WebSocket clients=1ã >ã > which does match what I found in the documentation here:ã > http://www.synchro.net/docs/jsobjs.html#serverããOkay, server.socket is only defined for *static* services (e.g. ircd.js), soãthat checks out. The original question was how to discover the *Telnet* port,ãand server.socket.local_port would only do that if the script was running inãthe context of the Telnet server, so I think the point is moot and the sbbs.iniãparsing is probably your best bet. I would use the file_cfgname() method to getãthe correct sbbs.ini filename derivation however, as there can be multipleãsbbs*.ini files to choose from.ãã digital manããSnapple "Real Fact" #81:ãAlaska has more caribou then people.ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Ree@VERT to Digital Man on Fri Jan 28 16:19:57 2011
    Okay, server.socket is only defined for *static* services (e.g. ircd.js),ã > so that checks out. The original question was how to discover the *Telnet*ã > port, and server.socket.local_port would only do that if the script wasã > running in the context of the Telnet server, so I think the point is mootã > and the sbbs.ini parsing is probably your best bet. ããOK, that makes sense. I see that's actually the method used inãftp-web-html.js (although to get the http port in that case).ãã > I would use theã > file_cfgname() method to get the correct sbbs.ini filename derivationã > however, as there can be multiple sbbs*.ini files to choose from.ããOK, I've updated the script accordingly (using ftp-web-html.js as aãreference), thanks for the heads up on that.ããRickã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã