Article View: gnu.emacs.bug
Article #88101[Not a bug] ange-ftp.el enhancement: using transparent proxy ftp prog
From: Jan-Hein
Date: Wed, 03 Aug 1994 19:28
Date: Wed, 03 Aug 1994 19:28
156 lines
7308 bytes
7308 bytes
In GNU Emacs 19.25.1 of Mon Aug 1 1994 on hzsbc03 (sparc-sun-sunos4.1.3)
[This is not a bug, but a possible enhancement]
Currently, there is support in ange-ftp to access hosts that are not
directly accessible, in roughly the following ways:
1. Via remote login (quasi- or non-interactively) to another host, that
*has* direct internet access. For this you need to have a (network-)
directory that needs to be shared between your local host and the
internet-access-host. You can specify an alternate ftp program for
this.
2. Via proxy ftp server, which supposedly works with USER@HOST requests.
With this you (again) identify the host that has direct internet access.
The following context diff provide a *third* way of accessing internet
hosts which you don't have direct access to: it enables you to specify
an alternate ftp program (e.g. "pftp") that needs to be used solely when
accessing ``outside'' hosts. Such a program gives you the desired
access transparently (except for the other program name). The normal
ftp program is used for accessing ``inside'' hosts.
So you could say that it is a specialized case of option 1.: the remote
host is just `localhost', so why bothering logging in etc.?
It works for the 19.25 and it did work for the 19.22 distribution of
emacs.
*** ChangeLog.orig Wed Aug 3 13:02:13 1994
--- ChangeLog Wed Aug 3 13:14:07 1994
***************
*** 1,3 ****
--- 1,8 ----
+ Wed Aug 3 13:03:09 1994 Jan-Hein Buhrman (J.H.Buhrman@ns-nl.att.com)
+
+ * ange-ftp.el: Allow use of smart and transparent proxy ftp
+ program to be used on local host.
+
Mon May 30 04:33:36 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu)
* Version 19.25 released.
*** ange-ftp.el.orig Wed Aug 3 10:05:37 1994
--- ange-ftp.el Wed Aug 3 10:56:05 1994
***************
*** 214,219 ****
--- 214,227 ----
;;; If you have a "smart" ftp program that allows you to issue commands like
;;; "USER foo@bar" which do nice proxy things, then look at the variables
;;; ange-ftp-smart-gateway and ange-ftp-smart-gateway-port.
+ ;;;
+ ;;; Otherwise, if there is an alternate ftp program that implements proxy in
+ ;;; a transparent way (i.e. w/o specifying the proxy host), that will
+ ;;; connect you directly to the desired destination host, set
+ ;;; ange-ftp-local-host-regexp to a value as stated earlier on, leave
+ ;;; ange-ftp-gateway-host as it is (i.e. nil) and set
+ ;;; ange-ftp-gateway-ftp-program-name to the alternate program. Also set
+ ;;; ange-ftp-smart-gateway to t.
;;; Tips for using ange-ftp:
;;;
***************
*** 711,717 ****
(defvar ange-ftp-local-host-regexp ".*"
"*Regexp selecting hosts which can be reached directly with ftp.
For other hosts the FTP process is started on \`ange-ftp-gateway-host\'
! instead.")
(defvar ange-ftp-gateway-program-interactive nil
"*If non-nil then the gateway program should give a shell prompt.
--- 719,725 ----
(defvar ange-ftp-local-host-regexp ".*"
"*Regexp selecting hosts which can be reached directly with ftp.
For other hosts the FTP process is started on \`ange-ftp-gateway-host\'
! instead, and/or reached via \`ange-ftp-gateway-ftp-program-name\'.")
(defvar ange-ftp-gateway-program-interactive nil
"*If non-nil then the gateway program should give a shell prompt.
***************
*** 738,745 ****
arrange to strip out trailing ^M characters.")
(defvar ange-ftp-smart-gateway nil
! "*Non-nil means the ftp gateway is smart.
! Don't bother telnetting, etc., just issue a user@host command instead.")
(defvar ange-ftp-smart-gateway-port "21"
"*Port on gateway machine to use when smart gateway is in operation.")
--- 746,754 ----
arrange to strip out trailing ^M characters.")
(defvar ange-ftp-smart-gateway nil
! "*Non-nil means the ftp gateway and/or the gateway ftp program is smart.
! Don't bother telnetting, etc., already connected to desired host transparently,
! or just issue a user@host command in case \`ange-ftp-gateway-host\' is non-nil.")
(defvar ange-ftp-smart-gateway-port "21"
"*Port on gateway machine to use when smart gateway is in operation.")
***************
*** 765,771 ****
"*Name of FTP program to run.")
(defvar ange-ftp-gateway-ftp-program-name "ftp"
! "*Name of FTP program to run on gateway machine.
Some AT&T folks claim to use something called `pftp' here.")
(defvar ange-ftp-ftp-program-args '("-i" "-n" "-g" "-v")
--- 774,780 ----
"*Name of FTP program to run.")
(defvar ange-ftp-gateway-ftp-program-name "ftp"
! "*Name of FTP program to run when accessing non-local hosts.
Some AT&T folks claim to use something called `pftp' here.")
(defvar ange-ftp-ftp-program-args '("-i" "-n" "-g" "-v")
***************
*** 1746,1752 ****
If HOST is only ftp-able through a gateway machine then spawn a shell
on the gateway machine to do the ftp instead."
(let* ((use-gateway (ange-ftp-use-gateway-p host))
! (ftp-prog (if use-gateway
ange-ftp-gateway-ftp-program-name
ange-ftp-ftp-program-name))
(args (append (list ftp-prog) ange-ftp-ftp-program-args))
--- 1755,1764 ----
If HOST is only ftp-able through a gateway machine then spawn a shell
on the gateway machine to do the ftp instead."
(let* ((use-gateway (ange-ftp-use-gateway-p host))
! (use-smart-ftp (and (not ange-ftp-gateway-host)
! (ange-ftp-use-smart-gateway-p host)))
! (ftp-prog (if (or use-gateway
! use-smart-ftp)
ange-ftp-gateway-ftp-program-name
ange-ftp-ftp-program-name))
(args (append (list ftp-prog) ange-ftp-ftp-program-args))
***************
*** 1909,1915 ****
(setq proc (ange-ftp-start-process host user name))
;; login to FTP server.
! (if (ange-ftp-use-smart-gateway-p host)
(ange-ftp-smart-login host user pass account proc)
(ange-ftp-normal-login host user pass account proc))
--- 1921,1928 ----
(setq proc (ange-ftp-start-process host user name))
;; login to FTP server.
! (if (and (ange-ftp-use-smart-gateway-p host)
! ange-ftp-gateway-host)
(ange-ftp-smart-login host user pass account proc)
(ange-ftp-normal-login host user pass account proc))
-- Jan-Hein Buhrman -- AT&T Huizen NL --- <J.H.Buhrman@ns-nl.att.com> ---
-- <Std.Disclaimer> -- +31 35 87.4799 --- ...!att!hvgtw!hzsbg01!jbuhrma ---
``Pam Pam Pam''
BeatBox diversion one --- Art of Noise
Technical Details
Message-ID:
<9408031153.AA24705@hzsbg01>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!ns-nl.ATt.COM!J.H.BuhrmanShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,90a57eed17325893,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-08-04 01:39:51 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!ns-nl.ATt.COM!J.H.Buhrman From: J.H.Buhrman@ns-nl.ATt.COM (Jan-Hein) Newsgroups: gnu.emacs.bug Subject: [Not a bug] ange-ftp.el enhancement: using transparent proxy ftp prog Date: 3 Aug 1994 15:28:34 -0400 Organization: GNUs Not Usenet Lines: 157 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <9408031153.AA24705@hzsbg01>