Wanted: Javascript Telnet client

T

Tim Tyler

Has anyone ever built a JavaScript Telnet client?

What about a JavaScript SSH client?
 
L

Lasse Reichstein Nielsen

Tim Tyler said:
Has anyone ever built a JavaScript Telnet client?

Can't be done. Javascript does not have the ability to make pure TCP/IP
connections. It can make HTTP-requests, but that is it.
You might be able to use prorpietary features of some browsers to access
non-javascript functions, but it will not work in other browsers.
What about a JavaScript SSH client?

Ditto.

/L
 
M

Martin Honnen

Tim said:
Has anyone ever built a JavaScript Telnet client?

Well, Mozilla has Chatzilla, an IRC client which is built with XUL and
JavaScript as far as I know, but of course it is part of the Mozilla
application and as such has capabilities far beyond those JavaScript in
a HTML page loaded via HTTP in a browser has.
Thus as part of Mozilla it might be possible to build a telnet client
(using XUL for the interfaces and JavaScript and XPCOM to implement the
protocol) but with JavaScript in a HTML page loaded in a browser via
HTTP I think there is no browser exposing any APIs for that.
As for Mozilla see
http://bugzilla.mozilla.org/show_bug.cgi?id=94344
someone had that wish long ago
 
T

Tim Tyler

Lasse Reichstein Nielsen said:
Can't be done. Javascript does not have the ability to make pure TCP/IP
connections. It can make HTTP-requests, but that is it.

Thanks. However this doesn't quite seem like the end of the world.

There seem to me to be at least two possibilities for farming out the
connection to another technology.

* You could perform the telnet connection from the server - and talk to
the Javascript client solely via HTTP - i.e. use "telnet-over-http"
or "tunneling ssh";

* You could use a tiny Java applet to perform the connections.

The second solution probably has few advantages over using a Java
applet to do the whole job.

However, the first solution seems theoretically possible.
 
M

Michael Winter

Lasse Reichstein Nielsen said:
Can't be done. Javascript does not have the ability to make pure TCP/IP
connections. It can make HTTP-requests, but that is it.
[snip]

* You could use a tiny Java applet to perform the connections.

If I recall correctly, in most environments, Java applets are restricted
to making connections to machine that they were served from. If you intend
to telnet to arbitrary addresses, you might run into security-based
problems.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,815
Messages
2,569,705
Members
45,494
Latest member
KandyFrank

Latest Threads

Top