From b7e78f0c82cca6439ff268a1ee446d579f576524 Mon Sep 17 00:00:00 2001 From: nealey Date: Mon, 6 Dec 2010 12:11:28 -0800 Subject: [PATCH] Updated Home (markdown) --- Home.md | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/Home.md b/Home.md index 77d06b9..95d53ae 100644 --- a/Home.md +++ b/Home.md @@ -1 +1,39 @@ -Welcome to the rcirc wiki! \ No newline at end of file +rcirc `:connect-function` fork +==================== + +My fork of rcirc supports a new `:connect-function` parameter in `rcirc-server-alist`. By overriding the default connect function (`open-network-stream`), you can specify any arbitrary method to connect to an IRC server. + +Connecting with SSL +------------------------------- + +This example defines a new `irc-open-tls-stream` function which calls out to the `socat` program to establish an SSL +connection: + + (defun irc-open-tls-stream (name buffer host service) + (start-process name buffer "socat" "STDIO" (concat "OPENSSL:" host ":" service ",verify=0"))) + + (define rcirc-server-alist '(("irc.freenode.net" :port 6697 :connect-function irc-open-tls-stream :channels ("#rcirc")))) + +Connecting through an HTTP proxy +--------------------------------------------------- + +The `proxychains` program does some magic tricks to get network activity to go out through an HTTP proxy. This example +uses `proxychains` in front of `socat` to make a plain (non-SSL) connection: + + (define irc-open-proxied-stream (name buffer host service) + (start-process name buffer "proxychains" "socat" "STDIO" (concat "TCP:" host ":" service))) + + (define rcirc-server-alist '(("irc.freenode.net" :connect-function irc-open-proxied-stream :channels ("#rcirc")))) + +Connecting with SSL, presenting a client certificate, with an SSH connection to a remote server +----------------------------------------------------------------- + +This crazy example (which I actually use) first establshes an SSH connection to a remote host, then runs `socat` +from that machine, presenting a client certificate to the IRC server to authenticate. It also makes sure the remote +host presents a valid SSL certificate. + + (define irc-open-crazy-stream (name buffer host service) + (start-process name buffer "ssh" "remotehost" "socat" "STDIO" + (concat "OPENSSL:" host ":" service ",cert=/home/neale/ircauth.key,cafile=/home/neale/irc.pem"))) + + (define rcirc-server-alist '(("irc.wotzit.net" :port 994 :connect-function irc-open-crazy-stream)))