From: Daniel Pittman <daniel@rimspace.net>
To: help-gnu-emacs@gnu.org
Subject: Re: ERC through a gateway
Date: Thu, 29 Apr 2010 11:33:12 +1000 [thread overview]
Message-ID: <87wrvryrdz.fsf@rimspace.net> (raw)
In-Reply-To: e8rbpd3bpn9.fsf@FLM000025LVE9F.catmktg.com
david@adboyd.com (J. David Boyd) writes:
> Daniel Pittman <daniel@rimspace.net> writes:
>> david@adboyd.com (J. David Boyd) writes:
>>> pocmatos@gmail.com (Paulo J. Matos) writes:
>>>
>>>> I can only access irc in my company through a gateway. How can I setup erc
>>>> to recognize the gateway? Or if I can't setup erc directly, is there a way
>>>> I can setup machine to direct erc requests through the gateway?
>>>
>>> I would dearly love to know how to do this as well. My company blocks IRC,
>>> and I miss it.
>>
>> ;; Because this is all I really ever use...
>> (setq erc-server-connect-function #'dp/erc-connect-smartly)
erc uses the function in this variable to establish the connection; it
defaults to a function that makes a normal TCP connect, but you can modify it
to a bunch of others, or write your own.
>> (defun dp/erc-connect-smartly (name buffer host port)
>> "Establish a connection via SSH, for home, or directly, for normal IRC,
>> which allows me to nicely support multiple concurrent connections."
>> (if (string-match "rimspace\.net$" host)
>> (dp/erc-via-ssh-and-netcat name buffer host port)
>> (open-network-stream name buffer host port)))
This just decides between the two connection types based on where it is
connecting to; for your purposes, probably not required.
>> (defun dp/erc-via-ssh-and-netcat (name buffer host port)
>> "Establish a connection via ssh and netcat on the destination host"
>> (let ((process-connection-type nil)
>> (command (list "/usr/bin/ssh" host "nc" "-q" "1" host (int-to-string port))))
>> (apply 'start-process name buffer command)))
This uses ssh to connect to a remote machine, then tunnels TCP/IP to a remote
system using netcat.
[...]
> Thanks, lots to learn here, I see, as I have _no_ idea what most of the
> above does, but I guess I'll figure it out!
The built-in help should cover most of what you need.
Daniel
--
✣ Daniel Pittman ✉ daniel@rimspace.net ☎ +61 401 155 707
♽ made with 100 percent post-consumer electrons
next prev parent reply other threads:[~2010-04-29 1:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-27 8:59 ERC through a gateway Paulo J. Matos
2010-04-28 12:20 ` J. David Boyd
2010-04-28 13:59 ` Daniel Pittman
2010-04-28 14:47 ` J. David Boyd
2010-04-29 1:33 ` Daniel Pittman [this message]
2010-04-29 8:09 ` Paulo J. Matos
2010-04-29 9:58 ` Daniel Pittman
2010-04-30 11:58 ` J. David Boyd
2010-04-30 12:47 ` Peter Dyballa
2010-05-05 15:44 ` J. David Boyd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wrvryrdz.fsf@rimspace.net \
--to=daniel@rimspace.net \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.