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 th same IP address? For example 5 different people could all be connecting via
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?
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?
You could use the INI parsing functions to read that out of /sbbs/ctrl/sbbs.ini, like so:
Try server.socket.local_port.
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.
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.
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.)?
Email me the username and password you would like to use for CVS.
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?
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.
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,042 |
Nodes: | 16 (1 / 15) |
Uptime: | 10:22:43 |
Calls: | 500,918 |
Calls today: | 5 |
Files: | 109,372 |
D/L today: |
13,234 files (2,175M bytes) |
Messages: | 305,038 |
Posted today: | 6 |