Gnus development mailing list
 help / color / mirror / Atom feed
* [PB] connecting to an external nntp server
@ 2000-10-24 17:14 Didier Verna
  0 siblings, 0 replies; only message in thread
From: Didier Verna @ 2000-10-24 17:14 UTC (permalink / raw)



                Hi!

        I want to read some newsgroups from a foreign nntp server I have
access to. In order to do so, I first log into machine A, and then telnet the
news server. My foreign server hence has the following parameters (it uses
predefined methods):

Options:
* * Variable: nntp-address
    Value: "machine A"
* * Variable: nntp-open-connection-function
    Value: nntp-open-rlogin
* * Variable: nntp-rlogin-program
    Value: "runsocks-ssh"
* * Variable: nntp-rlogin-user-name
    Value: "verna"
* * Variable: nntp-end-of-line
    Value: "\n"
* * Variable: nntp-rlogin-parameters
    Value: ("telnet" "machine B" "nntp")

        The nntp-rlogin-program "runsocks-ssh" is just a script that
socksifies ssh because I'm behind a firewall. This works well, but this is not
optimal because I can access the news server directly without going to the
intermediary machine first. Typically, this command works well in my terminal:

$ runsocks telnet "machine B" nntp


        Since there is no builtin way to do this, I tried the following
nntp-open-connection-function:

 ,----
| (defun nntp-open-B (buffer)
|   "Open a connection to B"
|   (let ((proc (start-process "nntpd" buffer "runsocks"
|                              "telnet" "-8" "machine B" "nntp")))
|     (save-excursion
|       (set-buffer buffer)
|       (nntp-wait-for-string "^\r*20[01]")
|       (beginning-of-line)
|       (delete-region (point-min) (point))
|       proc)))
`-----

        Unfortunately, that doesn't work. Gnus hangs on the connection. That
was a bit tricky to debug, but as far as I can tell, Gnus is blocked in
nntp-wait-for, on the following loop:

 ,----
|     (while (and (or (not (memq (char-after (point)) '(?2 ?3 ?4 ?5)))
|                     (looking-at "480"))
|                 (memq (process-status process) '(open run)))
`-----

        ... where the character after the point is actually a ^M. So I'm
wondering if there's a way to make the server stop sending these characters,
or if that's not related to the problem.


        Thanks for any ideas !

-- 
    /     /   _   _       Didier Verna        http://www.inf.enst.fr/~verna/
 - / / - / / /_/ /        EPITA / LRDE         mailto:didier@lrde.epita.fr
/_/ / /_/ / /__ /      14-16 rue Voltaire        Tel. +33 (1) 53 14 59 47
                   94276 Kremlin-Bicêtre cedex   Fax. +33 (1) 44 08 01 99



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-10-24 17:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-24 17:14 [PB] connecting to an external nntp server Didier Verna

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).