Thread View: news.software.nntp
8 messages
8 total messages
Started by J. Moreno
Sat, 17 Oct 2015 07:17
Semi-random thought: websockets
Author: J. Moreno
Date: Sat, 17 Oct 2015 07:17
Date: Sat, 17 Oct 2015 07:17
12 lines
1296 bytes
1296 bytes
I was browsing yet another lousy forum the other day, and it occurred to me that that there's no pure javascript NNTP reader, because such a beast is of course impossible--javascript can't get out of it's sandbox...but maybe it could. Does anyone have any idea how difficult it would be to add WebSocket support to INN? -- J. Moreno
Re: Semi-random thought: websockets
Author: Russ Allbery
Date: Mon, 19 Oct 2015 21:10
Date: Mon, 19 Oct 2015 21:10
28 lines
2093 bytes
2093 bytes
J. Moreno <planb@newsreaders.com> writes:
> I was browsing yet another lousy forum the other day, and it occurred to
> me that that there's no pure javascript NNTP reader, because such a
> beast is of course impossible--javascript can't get out of it's
> sandbox...but maybe it could.
> Does anyone have any idea how difficult it would be to add WebSocket
> support to INN?
I've never done much (well, anything) with Javascript, but a quick look at
the protocol makes me think you'd want to put a translator server in front
of something that spoke NNTP, not add support directly to INN. In other
words, build a WebSocket bridge. That's at least the easiest way to
experiment with such a thing.
Note that NNTP is definitely not full-duplex and requires the client and
server take turns and know whose turn it is, although I assume that you
can do that on top of WebSocket by just respecting that at the higher
level of the protocol.
--
Russ Allbery (eagle@eyrie.org) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Semi-random thought: websockets
Author: J. Moreno
Date: Thu, 22 Oct 2015 06:36
Date: Thu, 22 Oct 2015 06:36
41 lines
2763 bytes
2763 bytes
Russ Allbery <eagle@eyrie.org> wrote: > J. Moreno <planb@newsreaders.com> writes: > > Does anyone have any idea how difficult it would be to add WebSocket > > support to INN? > > I've never done much (well, anything) with Javascript, but a quick look > at the protocol makes me think you'd want to put a translator server in > front of something that spoke NNTP, not add support directly to INN. In > other words, build a WebSocket bridge. That's at least the easiest way > to experiment with such a thing. That lets you develop the javascript, but doesn't cut the server/javascript leash, which is what I was actualy after -- as it is, javascript can really only communicate to the page it's on or to a http server. While this is of course a problem with javascript not with other protocols or servers, one way to address it would be for non-http servers to add a way to let javascript talk to them. Alternate solutions would be to standardize websocket bridge ports, or wait/hope that the browsers start allowing raw tcp streams out. Not allowing raw streams seems to be a deliberate decisions -- both Chrome and FireFox allow it, but only under limited circumstances (plugins, certified apps for Firefox OS), so waiting doesn't seem likely to be useful in the short term. Adding WebSockets to INN seemed at least vaguely possible. > Note that NNTP is definitely not full-duplex and requires the client and > server take turns and know whose turn it is, although I assume that you > can do that on top of WebSocket by just respecting that at the higher > level of the protocol. I believe the fact that it isn't full duplex would make it easier on both sides. -- J. Moreno
Re: Semi-random thought: websockets
Author: Julien ÉLIE
Date: Thu, 22 Oct 2015 18:30
Date: Thu, 22 Oct 2015 18:30
27 lines
2081 bytes
2081 bytes
Hi J. Moreno, > I was browsing yet another lousy forum the other day, and it occurred to me > that that there's no pure javascript NNTP reader, because such a beast is > of course impossible--javascript can't get out of it's sandbox...but maybe > it could. An approaching web forum would be NemoWeb <http://news.nemoweb.net> that uses "JNTP" (standing for Json News Transfer Protocol). Click on the yellow button "Voir les hiérarchies" at the left-hand column to browse the list of hierarchies and access for instance news.software.nntp. There was also an attempt to define an HTTP-Tunneling News Protocol in <http://www.eyrie.org/~eagle/nntp/drafts/draft-stockwell-hnews-protocol-00.txt> but I do not know any implementation. Based on CGI scripts. -- Julien ÉLIE « La vérité pure et simple est très rarement pure et jamais simple. » (Oscar Wilde)
Re: Semi-random thought: websockets
Author: Russ Allbery
Date: Thu, 22 Oct 2015 18:43
Date: Thu, 22 Oct 2015 18:43
34 lines
2597 bytes
2597 bytes
J. Moreno <planb@newsreaders.com> writes:
> That lets you develop the javascript, but doesn't cut the
> server/javascript leash, which is what I was actualy after -- as it is,
> javascript can really only communicate to the page it's on or to a http
> server. While this is of course a problem with javascript not with
> other protocols or servers, one way to address it would be for non-http
> servers to add a way to let javascript talk to them.
Wouldn't the easiest way to do that be to run a web server on the news
server that sets up the WebSocket bridge?
> Alternate solutions would be to standardize websocket bridge ports, or
> wait/hope that the browsers start allowing raw tcp streams out.
> Not allowing raw streams seems to be a deliberate decisions -- both
> Chrome and FireFox allow it, but only under limited circumstances
> (plugins, certified apps for Firefox OS), so waiting doesn't seem likely
> to be useful in the short term.
It seems really unlikely to me that browsers will want to allow web pages
you visit to start using your computer to send spam email, automate
captcha solving, brute force bank passwords, or all the other fun things
you can do with raw network sockets. All you'd need to do is inject your
Javascript into an ad network, and tada, instant botnet without even
having to find weaknesses in the individual computers.
--
Russ Allbery (eagle@eyrie.org) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Semi-random thought: websockets
Author: Joshua Cranmer 🐧
Date: Fri, 23 Oct 2015 17:00
Date: Fri, 23 Oct 2015 17:00
21 lines
2140 bytes
2140 bytes
On 10/17/2015 2:17 AM, J. Moreno wrote: > I was browsing yet another lousy forum the other day, and it occurred to me > that that there's no pure javascript NNTP reader, because such a beast is > of course impossible--javascript can't get out of it's sandbox...but maybe > it could. Well, it's actually fairly easy to write an NNTP client in JS (I've actually started on an nntplib JS lib), except for the little fact that every JS environment has a completely different API for TCP sockets. There is a proposal at <http://www.w3.org/TR/tcp-udp-sockets/>, but that's implemented by nobody. The whiteout.io people implemented Mozilla's older variant of that proposal and wrote shims for Node sockets, chrome sockets, and WebSockets here: <https://github.com/whiteout-io/tcp-socket>. -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
Re: Semi-random thought: websockets
Author: dunno
Date: Sat, 24 Oct 2015 06:13
Date: Sat, 24 Oct 2015 06:13
25 lines
2001 bytes
2001 bytes
Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> wrote: > On 10/17/2015 2:17 AM, J. Moreno wrote: >> I was browsing yet another lousy forum the other day, and it occurred to me >> that that there's no pure javascript NNTP reader, because such a beast is >> of course impossible--javascript can't get out of it's sandbox...but maybe >> it could. > > Well, it's actually fairly easy to write an NNTP client in JS (I've > actually started on an nntplib JS lib), except for the little fact that > every JS environment has a completely different API for TCP sockets. > There is a proposal at <http://www.w3.org/TR/tcp-udp-sockets/>, but > that's implemented by nobody. > > The whiteout.io people implemented Mozilla's older variant of that > proposal and wrote shims for Node sockets, chrome sockets, and > WebSockets here: <https://github.com/whiteout-io/tcp-socket>. > There is also NNTP implementation(s) written using jNode, it can be found by googling "NNTP jNode." -- dunno
Re: Semi-random thought: websockets
Author: J. Moreno
Date: Sun, 25 Oct 2015 04:17
Date: Sun, 25 Oct 2015 04:17
36 lines
2760 bytes
2760 bytes
Russ Allbery <eagle@eyrie.org> wrote: > J. Moreno <planb@newsreaders.com> writes: > > > That lets you develop the javascript, but doesn't cut the > > server/javascript leash, which is what I was actualy after -- as it is, > > javascript can really only communicate to the page it's on or to a http > > server. While this is of course a problem with javascript not with > > other protocols or servers, one way to address it would be for non-http > > servers to add a way to let javascript talk to them. > > Wouldn't the easiest way to do that be to run a web server on the news > server that sets up the WebSocket bridge? Hmn, I guess it might be possible to establish a convention of using a nntp subdomain, it could even be on port 119...more opt-in and setup heavy than I was thinking of. > > Not allowing raw streams seems to be a deliberate decisions -- both > > Chrome and FireFox allow it, but only under limited circumstances > > (plugins, certified apps for Firefox OS), so waiting doesn't seem > > likely to be useful in the short term. > > It seems really unlikely to me that browsers will want to allow web pages > you visit to start using your computer to send spam email, automate > captcha solving, brute force bank passwords, or all the other fun things > you can do with raw network sockets. All you'd need to do is inject your > Javascript into an ad network, and tada, instant botnet without even > having to find weaknesses in the individual computers. Sure some limitation is necessary, and perhaps the current limitations are intended for use while they work the kinks out -- J. Moreno
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads