weblog d’un abbe


ERC + ctrlproxy

Filed under: Hacking — Tags: , , , — abbe @ 1721

Following is the Emacs LISP code, I hacked for ERC to use ctrlproxy:

(defun setup-ctrlproxy()
  "Setup Emacs for using ctrlproxy"

  ;; socks.el is part of GNU Emacs 23
  (require 'socks)
  (setq socks-noproxy '("localhost"))
  (setq socks-override-functions 1)
  (setq erc-server-connect-function 'socks-open-network-stream)

  (setq socks-password "password")
  ;; ctrlproxy exposes itself a SOCKS 5 proxy
  (setq socks-server '("ctrlproxy" "localhost" "6680" 5)))

Now, whenever I want to connect to IRC (using ERC) via ctrlproxy, I simply do M-x setup-ctrlproxy which make ERC aware of ctrlproxy, then M-x erc to start ERC and at the IRC Server prompt I enter the name of the ctrlproxy network I want to connect to. Thats it. Happy, Emacsing… :)


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: