From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.help Subject: Re: ERC through a gateway Date: Thu, 29 Apr 2010 19:58:14 +1000 Message-ID: <87vdbashqh.fsf@rimspace.net> References: <871vdzoeye.fsf@rimspace.net> <87wrvryrdz.fsf@rimspace.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1272535549 20608 80.91.229.12 (29 Apr 2010 10:05:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 29 Apr 2010 10:05:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 29 12:05:47 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O7Qc9-0001UR-N3 for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Apr 2010 12:05:40 +0200 Original-Received: from localhost ([127.0.0.1]:54049 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7Qc2-0003uN-Vl for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Apr 2010 06:04:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O7QZ7-0003U7-9y for help-gnu-emacs@gnu.org; Thu, 29 Apr 2010 06:01:53 -0400 Original-Received: from [140.186.70.92] (port=46168 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7QZ2-0003Se-Sa for help-gnu-emacs@gnu.org; Thu, 29 Apr 2010 06:01:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7QYY-0007hR-1m for help-gnu-emacs@gnu.org; Thu, 29 Apr 2010 06:01:21 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:60801) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7QYX-0007gw-OP for help-gnu-emacs@gnu.org; Thu, 29 Apr 2010 06:01:18 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1O7QYL-0007w0-Kf for help-gnu-emacs@gnu.org; Thu, 29 Apr 2010 12:01:05 +0200 Original-Received: from ppp59-167-189-244.static.internode.on.net ([59.167.189.244]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 Apr 2010 12:01:05 +0200 Original-Received: from daniel by ppp59-167-189-244.static.internode.on.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 Apr 2010 12:01:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory Original-Lines: 38 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ppp59-167-189-244.static.internode.on.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:uL0Act9EU5yTgs8qRw7C7I8RtDw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:72864 Archived-At: pocmatos@gmail.com (Paulo J. Matos) writes: > Daniel Pittman writes: > >>>> (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. > > So, you end up always needing a remote machine that you can ssh to that > provides a way to do a direct tcp/ip connection, right? Well, if you use my command as written you would. OTOH, you can substitute *any* command that connects STDIN/STDOUT to a remote TCP socket here, and it will do the right thing. So, if you need to tunnel through an HTTP CONNECT gateway get something that connects that way, and replace the ssh call with that, and bob is your mothers brother, as the saying goes. Er, I have been assuming that y'all know how to look up the documentation for the various customizable variables and so forth. If not, there is a whole lot of information about the API for this stuff hidden away there that you could use to perhaps better understand what is happening. For how to do that, if you don't know, see the "Documentation Lookup" section of the info supplied with Emacs, or here: http://www.gnu.org/software/emacs/manual/html_node/emacs/Documentation.html#Documentation Daniel -- ✣ Daniel Pittman ✉ daniel@rimspace.net ☎ +61 401 155 707 ♽ made with 100 percent post-consumer electrons