Hacker News new | past | comments | ask | show | jobs | submit | pix0r's comments login

Very cool, quick and responsive.

I'm curious if you could use websockets to connect directly to an irc server rather than going through your perl backend?


No, you need a server that speaks HTTP, at least minimally. This is by design so an XSS attack can't connect to arbitrary servers.

However, you could very easily create a simple adapter that accepts Websocket connections and relays the data to a TCP server.


Depends on the IRC server. Freenode's old IRC daemon was very liberal about the IRC protocol. If you "accidentally" included "POST /whatever HTTP/1.1" before the IRC commands, the server would be just fine with that. You could also send commands without acknowledging responses. This meant that an arbitrary HTTP request could create an IRC connection and send stuff to channels!

The result was a web page that merely visiting would spam people on the IRC network with hate messages from your IP. It was amusing.


Read a little on web sockets (http://en.wikipedia.org/wiki/WebSocket) - it sounds like the server is required to speak HTTP for the initial handshake, so connecting directly to an IRC server would not work.


You could add code to your ircd to recognize it is being spoken to in a websockets way and speak the necessary HTTP voodoo to make it work.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: