summaryrefslogtreecommitdiff
path: root/lisp/net
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/ange-ftp.el2
-rw-r--r--lisp/net/browse-url.el2
-rw-r--r--lisp/net/dbus.el2
-rw-r--r--lisp/net/dig.el2
-rw-r--r--lisp/net/dns.el2
-rw-r--r--lisp/net/eudc-bob.el2
-rw-r--r--lisp/net/eudc-export.el2
-rw-r--r--lisp/net/eudc-hotlist.el2
-rw-r--r--lisp/net/eudc-vars.el2
-rw-r--r--lisp/net/eudc.el2
-rw-r--r--lisp/net/eudcb-bbdb.el2
-rw-r--r--lisp/net/eudcb-ldap.el2
-rw-r--r--lisp/net/eudcb-mab.el2
-rw-r--r--lisp/net/eww.el2
-rw-r--r--lisp/net/gnutls.el2
-rw-r--r--lisp/net/goto-addr.el2
-rw-r--r--lisp/net/hmac-def.el2
-rw-r--r--lisp/net/hmac-md5.el2
-rw-r--r--lisp/net/html2text.el2
-rw-r--r--lisp/net/imap.el2
-rw-r--r--lisp/net/ldap.el2
-rw-r--r--lisp/net/mailcap.el2
-rw-r--r--lisp/net/mairix.el2
-rw-r--r--lisp/net/net-utils.el2
-rw-r--r--lisp/net/netrc.el2
-rw-r--r--lisp/net/network-stream.el2
-rw-r--r--lisp/net/newst-backend.el2
-rw-r--r--lisp/net/newst-plainview.el2
-rw-r--r--lisp/net/newst-reader.el2
-rw-r--r--lisp/net/newst-ticker.el2
-rw-r--r--lisp/net/newst-treeview.el2
-rw-r--r--lisp/net/newsticker.el2
-rw-r--r--lisp/net/nsm.el2
-rw-r--r--lisp/net/ntlm.el2
-rw-r--r--lisp/net/pinentry.el2
-rw-r--r--lisp/net/pop3.el2
-rw-r--r--lisp/net/quickurl.el2
-rw-r--r--lisp/net/rcirc.el2
-rw-r--r--lisp/net/rfc2104.el2
-rw-r--r--lisp/net/rlogin.el2
-rw-r--r--lisp/net/sasl-cram.el2
-rw-r--r--lisp/net/sasl-digest.el2
-rw-r--r--lisp/net/sasl-ntlm.el2
-rw-r--r--lisp/net/sasl-scram-rfc.el2
-rw-r--r--lisp/net/sasl.el2
-rw-r--r--lisp/net/secrets.el2
-rw-r--r--lisp/net/shr-color.el2
-rw-r--r--lisp/net/shr.el2
-rw-r--r--lisp/net/sieve-manage.el2
-rw-r--r--lisp/net/sieve-mode.el2
-rw-r--r--lisp/net/sieve.el2
-rw-r--r--lisp/net/snmp-mode.el2
-rw-r--r--lisp/net/soap-client.el2
-rw-r--r--lisp/net/soap-inspect.el2
-rw-r--r--lisp/net/socks.el2
-rw-r--r--lisp/net/starttls.el2
-rw-r--r--lisp/net/telnet.el2
-rw-r--r--lisp/net/tls.el2
-rw-r--r--lisp/net/tramp-adb.el2
-rw-r--r--lisp/net/tramp-cache.el2
-rw-r--r--lisp/net/tramp-cmds.el2
-rw-r--r--lisp/net/tramp-compat.el2
-rw-r--r--lisp/net/tramp-ftp.el2
-rw-r--r--lisp/net/tramp-gvfs.el2
-rw-r--r--lisp/net/tramp-gw.el336
-rw-r--r--lisp/net/tramp-sh.el6
-rw-r--r--lisp/net/tramp-smb.el2
-rw-r--r--lisp/net/tramp-uu.el2
-rw-r--r--lisp/net/tramp.el2
-rw-r--r--lisp/net/trampver.el2
-rw-r--r--lisp/net/webjump.el2
-rw-r--r--lisp/net/zeroconf.el2
72 files changed, 409 insertions, 73 deletions
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 07c3daf7d7e..cafdb3ecb06 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -1,6 +1,6 @@
;;; ange-ftp.el --- transparent FTP support for GNU Emacs
-;; Copyright (C) 1989-1996, 1998, 2000-2016 Free Software Foundation,
+;; Copyright (C) 1989-1996, 1998, 2000-2017 Free Software Foundation,
;; Inc.
;; Author: Andy Norman (ange@hplb.hpl.hp.com)
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index b2077d784c0..a7c879cbfbc 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -1,6 +1,6 @@
;;; browse-url.el --- pass a URL to a WWW browser
-;; Copyright (C) 1995-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2017 Free Software Foundation, Inc.
;; Author: Denis Howe <dbh@doc.ic.ac.uk>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index 2d7cd2fc612..d740829f99c 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -1,6 +1,6 @@
;;; dbus.el --- Elisp bindings for D-Bus. -*- lexical-binding: t -*-
-;; Copyright (C) 2007-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2017 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, hardware
diff --git a/lisp/net/dig.el b/lisp/net/dig.el
index 338afca15f1..7e733675b63 100644
--- a/lisp/net/dig.el
+++ b/lisp/net/dig.el
@@ -1,6 +1,6 @@
;;; dig.el --- Domain Name System dig interface
-;; Copyright (C) 2000-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2017 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Keywords: DNS BIND dig comm
diff --git a/lisp/net/dns.el b/lisp/net/dns.el
index 487cfc9d080..8615813e074 100644
--- a/lisp/net/dns.el
+++ b/lisp/net/dns.el
@@ -1,6 +1,6 @@
;;; dns.el --- Domain Name Service lookups
-;; Copyright (C) 2002-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2017 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: network comm
diff --git a/lisp/net/eudc-bob.el b/lisp/net/eudc-bob.el
index fe0e3b81d57..661ef51e60e 100644
--- a/lisp/net/eudc-bob.el
+++ b/lisp/net/eudc-bob.el
@@ -1,6 +1,6 @@
;;; eudc-bob.el --- Binary Objects Support for EUDC
-;; Copyright (C) 1999-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2017 Free Software Foundation, Inc.
;; Author: Oscar Figueiredo <oscar@cpe.fr>
;; Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/net/eudc-export.el b/lisp/net/eudc-export.el
index a50892d94d4..222673247b0 100644
--- a/lisp/net/eudc-export.el
+++ b/lisp/net/eudc-export.el
@@ -1,6 +1,6 @@
;;; eudc-export.el --- functions to export EUDC query results
-;; Copyright (C) 1998-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2017 Free Software Foundation, Inc.
;; Author: Oscar Figueiredo <oscar@cpe.fr>
;; Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/net/eudc-hotlist.el b/lisp/net/eudc-hotlist.el
index 558ecb6b388..5c170d0aea6 100644
--- a/lisp/net/eudc-hotlist.el
+++ b/lisp/net/eudc-hotlist.el
@@ -1,6 +1,6 @@
;;; eudc-hotlist.el --- hotlist management for EUDC
-;; Copyright (C) 1998-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2017 Free Software Foundation, Inc.
;; Author: Oscar Figueiredo <oscar@cpe.fr>
;; Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/net/eudc-vars.el b/lisp/net/eudc-vars.el
index 19da7ec1539..79d6f2ebc69 100644
--- a/lisp/net/eudc-vars.el
+++ b/lisp/net/eudc-vars.el
@@ -1,6 +1,6 @@
;;; eudc-vars.el --- Emacs Unified Directory Client
-;; Copyright (C) 1998-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2017 Free Software Foundation, Inc.
;; Author: Oscar Figueiredo <oscar@cpe.fr>
;; Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el
index 22e48dbd3d3..bdd69bf53e1 100644
--- a/lisp/net/eudc.el
+++ b/lisp/net/eudc.el
@@ -1,6 +1,6 @@
;;; eudc.el --- Emacs Unified Directory Client
-;; Copyright (C) 1998-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2017 Free Software Foundation, Inc.
;; Author: Oscar Figueiredo <oscar@cpe.fr>
;; Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/net/eudcb-bbdb.el b/lisp/net/eudcb-bbdb.el
index 796391be2de..bfca103bdb0 100644
--- a/lisp/net/eudcb-bbdb.el
+++ b/lisp/net/eudcb-bbdb.el
@@ -1,6 +1,6 @@
;;; eudcb-bbdb.el --- Emacs Unified Directory Client - BBDB Backend
-;; Copyright (C) 1998-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2017 Free Software Foundation, Inc.
;; Author: Oscar Figueiredo <oscar@cpe.fr>
;; Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/net/eudcb-ldap.el b/lisp/net/eudcb-ldap.el
index ae0bb02de0a..e1900e71ff2 100644
--- a/lisp/net/eudcb-ldap.el
+++ b/lisp/net/eudcb-ldap.el
@@ -1,6 +1,6 @@
;;; eudcb-ldap.el --- Emacs Unified Directory Client - LDAP Backend
-;; Copyright (C) 1998-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2017 Free Software Foundation, Inc.
;; Author: Oscar Figueiredo <oscar@cpe.fr>
;; Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/net/eudcb-mab.el b/lisp/net/eudcb-mab.el
index 0f99ff0d027..43384e2d6fd 100644
--- a/lisp/net/eudcb-mab.el
+++ b/lisp/net/eudcb-mab.el
@@ -1,6 +1,6 @@
;;; eudcb-mab.el --- Emacs Unified Directory Client - AddressBook backend
-;; Copyright (C) 2003-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2017 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: Thomas Fitzsimmons <fitzsim@fitzsim.org>
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 7672bf0e1ef..d42180719dc 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1,6 +1,6 @@
;;; eww.el --- Emacs Web Wowser -*- lexical-binding:t -*-
-;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2017 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: html
diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el
index 9ed1c8b8305..d0dab738164 100644
--- a/lisp/net/gnutls.el
+++ b/lisp/net/gnutls.el
@@ -1,6 +1,6 @@
;;; gnutls.el --- Support SSL/TLS connections through GnuTLS
-;; Copyright (C) 2010-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2017 Free Software Foundation, Inc.
;; Author: Ted Zlatanov <tzz@lifelogs.com>
;; Keywords: comm, tls, ssl, encryption
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el
index bc3c403e2f2..2c2274d41ba 100644
--- a/lisp/net/goto-addr.el
+++ b/lisp/net/goto-addr.el
@@ -1,6 +1,6 @@
;;; goto-addr.el --- click to browse URL or to send to e-mail address
-;; Copyright (C) 1995, 2000-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2000-2017 Free Software Foundation, Inc.
;; Author: Eric Ding <ericding@alum.mit.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/net/hmac-def.el b/lisp/net/hmac-def.el
index c5df4fd7fa3..246683444f4 100644
--- a/lisp/net/hmac-def.el
+++ b/lisp/net/hmac-def.el
@@ -1,6 +1,6 @@
;;; hmac-def.el --- A macro for defining HMAC functions.
-;; Copyright (C) 1999, 2001, 2007-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2001, 2007-2017 Free Software Foundation, Inc.
;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
;; Keywords: HMAC, RFC2104
diff --git a/lisp/net/hmac-md5.el b/lisp/net/hmac-md5.el
index dfeeeaa61ec..53fa153a1eb 100644
--- a/lisp/net/hmac-md5.el
+++ b/lisp/net/hmac-md5.el
@@ -1,6 +1,6 @@
;;; hmac-md5.el --- Compute HMAC-MD5.
-;; Copyright (C) 1999, 2001, 2007-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2001, 2007-2017 Free Software Foundation, Inc.
;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
;; Keywords: HMAC, RFC2104, HMAC-MD5, MD5, KEYED-MD5, CRAM-MD5
diff --git a/lisp/net/html2text.el b/lisp/net/html2text.el
index 2b1c2057bb4..87c71dc504a 100644
--- a/lisp/net/html2text.el
+++ b/lisp/net/html2text.el
@@ -1,6 +1,6 @@
;;; html2text.el --- a simple html to plain text converter -*- coding: utf-8 -*-
-;; Copyright (C) 2002-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2017 Free Software Foundation, Inc.
;; Author: Joakim Hove <hove@phys.ntnu.no>
diff --git a/lisp/net/imap.el b/lisp/net/imap.el
index e5a14d75dee..ada2c477e9e 100644
--- a/lisp/net/imap.el
+++ b/lisp/net/imap.el
@@ -1,6 +1,6 @@
;;; imap.el --- imap library
-;; Copyright (C) 1998-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2017 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Keywords: mail
diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el
index d08fdbee375..f4910b1dc77 100644
--- a/lisp/net/ldap.el
+++ b/lisp/net/ldap.el
@@ -1,6 +1,6 @@
;;; ldap.el --- client interface to LDAP for Emacs
-;; Copyright (C) 1998-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2017 Free Software Foundation, Inc.
;; Author: Oscar Figueiredo <oscar@cpe.fr>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el
index f71d7ba6675..4e53b5a2861 100644
--- a/lisp/net/mailcap.el
+++ b/lisp/net/mailcap.el
@@ -1,6 +1,6 @@
;;; mailcap.el --- MIME media types configuration
-;; Copyright (C) 1998-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2017 Free Software Foundation, Inc.
;; Author: William M. Perry <wmperry@aventail.com>
;; Lars Magne Ingebrigtsen <larsi@gnus.org>
diff --git a/lisp/net/mairix.el b/lisp/net/mairix.el
index c6e78235e2c..00806a178b3 100644
--- a/lisp/net/mairix.el
+++ b/lisp/net/mairix.el
@@ -1,6 +1,6 @@
;;; mairix.el --- Mairix interface for Emacs
-;; Copyright (C) 2008-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2017 Free Software Foundation, Inc.
;; Author: David Engster <dengste@eml.cc>
;; Keywords: mail searching
diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el
index 73d6ff4d61c..06b67dcc4f4 100644
--- a/lisp/net/net-utils.el
+++ b/lisp/net/net-utils.el
@@ -1,6 +1,6 @@
;;; net-utils.el --- network functions
-;; Copyright (C) 1998-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2017 Free Software Foundation, Inc.
;; Author: Peter Breton <pbreton@cs.umb.edu>
;; Created: Sun Mar 16 1997
diff --git a/lisp/net/netrc.el b/lisp/net/netrc.el
index 274a038d251..a30d9f6aad8 100644
--- a/lisp/net/netrc.el
+++ b/lisp/net/netrc.el
@@ -1,5 +1,5 @@
;;; netrc.el --- .netrc parsing functionality
-;; Copyright (C) 1996-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2017 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el
index 657672d5e76..93e1bae5fc2 100644
--- a/lisp/net/network-stream.el
+++ b/lisp/net/network-stream.el
@@ -1,6 +1,6 @@
;;; network-stream.el --- open network processes, possibly with encryption -*- lexical-binding: t -*-
-;; Copyright (C) 2010-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2017 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: network
diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el
index 41b21722723..30a9e54b73e 100644
--- a/lisp/net/newst-backend.el
+++ b/lisp/net/newst-backend.el
@@ -1,6 +1,6 @@
;;; newst-backend.el --- Retrieval backend for newsticker.
-;; Copyright (C) 2003-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2017 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper@web.de>
;; Filename: newst-backend.el
diff --git a/lisp/net/newst-plainview.el b/lisp/net/newst-plainview.el
index 17153f01c09..eab3e244411 100644
--- a/lisp/net/newst-plainview.el
+++ b/lisp/net/newst-plainview.el
@@ -1,6 +1,6 @@
;;; newst-plainview.el --- Single buffer frontend for newsticker.
-;; Copyright (C) 2003-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2017 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper@web.de>
;; Filename: newst-plainview.el
diff --git a/lisp/net/newst-reader.el b/lisp/net/newst-reader.el
index 9c29216ccaf..c781f0dfec1 100644
--- a/lisp/net/newst-reader.el
+++ b/lisp/net/newst-reader.el
@@ -1,6 +1,6 @@
;;; newst-reader.el --- Generic RSS reader functions.
-;; Copyright (C) 2003-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2017 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper@web.de>
;; Filename: newst-reader.el
diff --git a/lisp/net/newst-ticker.el b/lisp/net/newst-ticker.el
index d7e7a4463f9..93198e3dbad 100644
--- a/lisp/net/newst-ticker.el
+++ b/lisp/net/newst-ticker.el
@@ -1,6 +1,6 @@
;; newst-ticker.el --- mode line ticker for newsticker.
-;; Copyright (C) 2003-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2017 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper@web.de>
;; Filename: newst-ticker.el
diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el
index c995af58c27..e93da3e1c47 100644
--- a/lisp/net/newst-treeview.el
+++ b/lisp/net/newst-treeview.el
@@ -1,6 +1,6 @@
;;; newst-treeview.el --- Treeview frontend for newsticker. -*- lexical-binding:t -*-
-;; Copyright (C) 2008-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2017 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper@web.de>
;; Filename: newst-treeview.el
diff --git a/lisp/net/newsticker.el b/lisp/net/newsticker.el
index 7eff422e4ea..971bdf64f41 100644
--- a/lisp/net/newsticker.el
+++ b/lisp/net/newsticker.el
@@ -1,6 +1,6 @@
;;; newsticker.el --- A Newsticker for Emacs. -*- lexical-binding: t -*-
-;; Copyright (C) 2003-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2017 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper@web.de>
;; Filename: newsticker.el
diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el
index 5928ab303be..ccb596f4ddc 100644
--- a/lisp/net/nsm.el
+++ b/lisp/net/nsm.el
@@ -1,6 +1,6 @@
;;; nsm.el --- Network Security Manager
-;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2017 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: encryption, security, network
diff --git a/lisp/net/ntlm.el b/lisp/net/ntlm.el
index e272002cfe7..4baa8f2081a 100644
--- a/lisp/net/ntlm.el
+++ b/lisp/net/ntlm.el
@@ -1,6 +1,6 @@
;;; ntlm.el --- NTLM (NT LanManager) authentication support
-;; Copyright (C) 2001, 2007-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2007-2017 Free Software Foundation, Inc.
;; Author: Taro Kawagishi <tarok@transpulse.org>
;; Maintainer: Thomas Fitzsimmons <fitzsim@fitzsim.org>
diff --git a/lisp/net/pinentry.el b/lisp/net/pinentry.el
index 082a9c8ff89..3e43b7d9dea 100644
--- a/lisp/net/pinentry.el
+++ b/lisp/net/pinentry.el
@@ -1,6 +1,6 @@
;;; pinentry.el --- GnuPG Pinentry server implementation -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2017 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@gnu.org>
;; Version: 0.1
diff --git a/lisp/net/pop3.el b/lisp/net/pop3.el
index 3964288fd23..6230a15c85b 100644
--- a/lisp/net/pop3.el
+++ b/lisp/net/pop3.el
@@ -1,6 +1,6 @@
;;; pop3.el --- Post Office Protocol (RFC 1460) interface
-;; Copyright (C) 1996-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2017 Free Software Foundation, Inc.
;; Author: Richard L. Pieri <ratinox@peorth.gweep.net>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el
index 773589af47e..652eb2ffe82 100644
--- a/lisp/net/quickurl.el
+++ b/lisp/net/quickurl.el
@@ -1,6 +1,6 @@
;;; quickurl.el --- insert a URL based on text at point in buffer
-;; Copyright (C) 1999-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2017 Free Software Foundation, Inc.
;; Author: Dave Pearson <davep@davep.org>
;; Maintainer: Dave Pearson <davep@davep.org>
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 66e6326085c..ddff25c1e92 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -1,6 +1,6 @@
;;; rcirc.el --- default, simple IRC client -*- lexical-binding: t; -*-
-;; Copyright (C) 2005-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2017 Free Software Foundation, Inc.
;; Author: Ryan Yeske <rcyeske@gmail.com>
;; Maintainers: Ryan Yeske <rcyeske@gmail.com>,
diff --git a/lisp/net/rfc2104.el b/lisp/net/rfc2104.el
index d579f8f6eba..71cf5bd8283 100644
--- a/lisp/net/rfc2104.el
+++ b/lisp/net/rfc2104.el
@@ -1,6 +1,6 @@
;;; rfc2104.el --- RFC2104 Hashed Message Authentication Codes
-;; Copyright (C) 1998-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2017 Free Software Foundation, Inc.
;; Author: Simon Josefsson <jas@pdc.kth.se>
;; Keywords: mail
diff --git a/lisp/net/rlogin.el b/lisp/net/rlogin.el
index 921ceff290f..a07c4901545 100644
--- a/lisp/net/rlogin.el
+++ b/lisp/net/rlogin.el
@@ -1,6 +1,6 @@
;;; rlogin.el --- remote login interface
-;; Copyright (C) 1992-1995, 1997-1998, 2001-2016 Free Software
+;; Copyright (C) 1992-1995, 1997-1998, 2001-2017 Free Software
;; Foundation, Inc.
;; Author: Noah Friedman
diff --git a/lisp/net/sasl-cram.el b/lisp/net/sasl-cram.el
index 1ac72fe21c5..cd6c7e1a583 100644
--- a/lisp/net/sasl-cram.el
+++ b/lisp/net/sasl-cram.el
@@ -1,6 +1,6 @@
;;; sasl-cram.el --- CRAM-MD5 module for the SASL client framework
-;; Copyright (C) 2000, 2007-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2007-2017 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Kenichi OKADA <okada@opaopa.org>
diff --git a/lisp/net/sasl-digest.el b/lisp/net/sasl-digest.el
index 0c77f00cfd9..445d4bf37b3 100644
--- a/lisp/net/sasl-digest.el
+++ b/lisp/net/sasl-digest.el
@@ -1,6 +1,6 @@
;;; sasl-digest.el --- DIGEST-MD5 module for the SASL client framework
-;; Copyright (C) 2000, 2007-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2007-2017 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Kenichi OKADA <okada@opaopa.org>
diff --git a/lisp/net/sasl-ntlm.el b/lisp/net/sasl-ntlm.el
index 66b6ab50e56..cb6961b14b5 100644
--- a/lisp/net/sasl-ntlm.el
+++ b/lisp/net/sasl-ntlm.el
@@ -1,6 +1,6 @@
;;; sasl-ntlm.el --- NTLM (NT Lan Manager) module for the SASL client framework
-;; Copyright (C) 2000, 2007-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2007-2017 Free Software Foundation, Inc.
;; Author: Taro Kawagishi <tarok@transpulse.org>
;; Keywords: SASL, NTLM
diff --git a/lisp/net/sasl-scram-rfc.el b/lisp/net/sasl-scram-rfc.el
index 328c2d46f79..1dc4803c828 100644
--- a/lisp/net/sasl-scram-rfc.el
+++ b/lisp/net/sasl-scram-rfc.el
@@ -1,6 +1,6 @@
;;; sasl-scram-rfc.el --- SCRAM-SHA-1 module for the SASL client framework -*- lexical-binding: t; -*-
-;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2017 Free Software Foundation, Inc.
;; Author: Magnus Henoch <magnus.henoch@gmail.com>
;; Package: sasl
diff --git a/lisp/net/sasl.el b/lisp/net/sasl.el
index 419fef0f3b7..6128b91b1db 100644
--- a/lisp/net/sasl.el
+++ b/lisp/net/sasl.el
@@ -1,6 +1,6 @@
;;; sasl.el --- SASL client framework
-;; Copyright (C) 2000, 2007-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2007-2017 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Keywords: SASL
diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el
index ea26a521afd..4d6e48ba2e0 100644
--- a/lisp/net/secrets.el
+++ b/lisp/net/secrets.el
@@ -1,6 +1,6 @@
;;; secrets.el --- Client interface to gnome-keyring and kwallet. -*- lexical-binding: t -*-
-;; Copyright (C) 2010-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2017 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm password passphrase
diff --git a/lisp/net/shr-color.el b/lisp/net/shr-color.el
index 67e3b90b9d4..cb081cbbb10 100644
--- a/lisp/net/shr-color.el
+++ b/lisp/net/shr-color.el
@@ -1,6 +1,6 @@
;;; shr-color.el --- Simple HTML Renderer color management
-;; Copyright (C) 2010-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2017 Free Software Foundation, Inc.
;; Author: Julien Danjou <julien@danjou.info>
;; Keywords: html
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 9ea143da335..e0bb3dbb2b7 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1,6 +1,6 @@
;;; shr.el --- Simple HTML Renderer -*- lexical-binding: t -*-
-;; Copyright (C) 2010-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2017 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: html
diff --git a/lisp/net/sieve-manage.el b/lisp/net/sieve-manage.el
index 8f7bd449284..1a54e1aa738 100644
--- a/lisp/net/sieve-manage.el
+++ b/lisp/net/sieve-manage.el
@@ -1,6 +1,6 @@
;;; sieve-manage.el --- Implementation of the managesieve protocol in elisp
-;; Copyright (C) 2001-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2017 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Albert Krewinkel <tarleb@moltkeplatz.de>
diff --git a/lisp/net/sieve-mode.el b/lisp/net/sieve-mode.el
index 6aa1b207ee2..87bb3a245b8 100644
--- a/lisp/net/sieve-mode.el
+++ b/lisp/net/sieve-mode.el
@@ -1,6 +1,6 @@
;;; sieve-mode.el --- Sieve code editing commands for Emacs
-;; Copyright (C) 2001-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2017 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
diff --git a/lisp/net/sieve.el b/lisp/net/sieve.el
index d126d84c5de..665a0a8e15d 100644
--- a/lisp/net/sieve.el
+++ b/lisp/net/sieve.el
@@ -1,6 +1,6 @@
;;; sieve.el --- Utilities to manage sieve scripts
-;; Copyright (C) 2001-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2017 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
diff --git a/lisp/net/snmp-mode.el b/lisp/net/snmp-mode.el
index 4afc460779f..e6a27f43a08 100644
--- a/lisp/net/snmp-mode.el
+++ b/lisp/net/snmp-mode.el
@@ -1,6 +1,6 @@
;;; snmp-mode.el --- SNMP & SNMPv2 MIB major mode
-;; Copyright (C) 1995, 1998, 2001-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1998, 2001-2017 Free Software Foundation, Inc.
;; Author: Paul D. Smith <psmith@BayNetworks.com>
;; Keywords: data
diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el
index f8973a3a537..5d36cfa89b8 100644
--- a/lisp/net/soap-client.el
+++ b/lisp/net/soap-client.el
@@ -1,6 +1,6 @@
;;; soap-client.el --- Access SOAP web services -*- lexical-binding: t -*-
-;; Copyright (C) 2009-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2017 Free Software Foundation, Inc.
;; Author: Alexandru Harsanyi <AlexHarsanyi@gmail.com>
;; Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
diff --git a/lisp/net/soap-inspect.el b/lisp/net/soap-inspect.el
index 9e7947a2eb5..db83cf8463e 100644
--- a/lisp/net/soap-inspect.el
+++ b/lisp/net/soap-inspect.el
@@ -1,6 +1,6 @@
;;; soap-inspect.el --- Interactive WSDL inspector -*- lexical-binding: t -*-
-;; Copyright (C) 2010-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2017 Free Software Foundation, Inc.
;; Author: Alexandru Harsanyi <AlexHarsanyi@gmail.com>
;; Created: October 2010
diff --git a/lisp/net/socks.el b/lisp/net/socks.el
index f2a8fc3223e..f18e69514bb 100644
--- a/lisp/net/socks.el
+++ b/lisp/net/socks.el
@@ -1,6 +1,6 @@
;;; socks.el --- A Socks v5 Client for Emacs
-;; Copyright (C) 1996-2000, 2002, 2007-2016 Free Software Foundation,
+;; Copyright (C) 1996-2000, 2002, 2007-2017 Free Software Foundation,
;; Inc.
;; Author: William M. Perry <wmperry@gnu.org>
diff --git a/lisp/net/starttls.el b/lisp/net/starttls.el
index b9255901f97..4de3d69e4f8 100644
--- a/lisp/net/starttls.el
+++ b/lisp/net/starttls.el
@@ -1,6 +1,6 @@
;;; starttls.el --- STARTTLS functions
-;; Copyright (C) 1999-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2017 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Author: Simon Josefsson <simon@josefsson.org>
diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el
index 95c32a5b4fc..b38ef6c654a 100644
--- a/lisp/net/telnet.el
+++ b/lisp/net/telnet.el
@@ -1,6 +1,6 @@
;;; telnet.el --- run a telnet session from within an Emacs buffer
-;; Copyright (C) 1985, 1988, 1992, 1994, 2001-2016 Free Software
+;; Copyright (C) 1985, 1988, 1992, 1994, 2001-2017 Free Software
;; Foundation, Inc.
;; Author: William F. Schelter
diff --git a/lisp/net/tls.el b/lisp/net/tls.el
index f1219fdddbd..2273d1345d5 100644
--- a/lisp/net/tls.el
+++ b/lisp/net/tls.el
@@ -1,6 +1,6 @@
;;; tls.el --- TLS/SSL support via wrapper around GnuTLS
-;; Copyright (C) 1996-1999, 2002-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2002-2017 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Keywords: comm, tls, gnutls, ssl
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index a4218c28ab3..846b19575a6 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -1,6 +1,6 @@
;;; tramp-adb.el --- Functions for calling Android Debug Bridge from Tramp
-;; Copyright (C) 2011-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2017 Free Software Foundation, Inc.
;; Author: Jürgen Hötzel <juergen@archlinux.org>
;; Keywords: comm, processes
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 0d90017651b..5205eceacff 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -1,6 +1,6 @@
;;; tramp-cache.el --- file information caching for Tramp
-;; Copyright (C) 2000, 2005-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2005-2017 Free Software Foundation, Inc.
;; Author: Daniel Pittman <daniel@inanna.danann.net>
;; Michael Albinus <michael.albinus@gmx.de>
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index 208859dbe7f..05adaa49e3e 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -1,6 +1,6 @@
;;; tramp-cmds.el --- Interactive commands for Tramp
-;; Copyright (C) 2007-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2017 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index 9b779a0566b..8e5b3e45d13 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -1,6 +1,6 @@
;;; tramp-compat.el --- Tramp compatibility functions
-;; Copyright (C) 2007-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2017 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el
index 20a12eb6936..85e4f2b0f0c 100644
--- a/lisp/net/tramp-ftp.el
+++ b/lisp/net/tramp-ftp.el
@@ -1,6 +1,6 @@
;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP
-;; Copyright (C) 2002-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2017 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 37aba59e12e..dd42d9c9830 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1,6 +1,6 @@
;;; tramp-gvfs.el --- Tramp access functions for GVFS daemon
-;; Copyright (C) 2009-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2017 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
diff --git a/lisp/net/tramp-gw.el b/lisp/net/tramp-gw.el
new file mode 100644
index 00000000000..77772129476
--- /dev/null
+++ b/lisp/net/tramp-gw.el
@@ -0,0 +1,336 @@
+;;; tramp-gw.el --- Tramp utility functions for HTTP tunnels and SOCKS gateways
+
+;; Copyright (C) 2007-2017 Free Software Foundation, Inc.
+
+;; Author: Michael Albinus <michael.albinus@gmx.de>
+;; Keywords: comm, processes
+;; Package: tramp
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Access functions for HTTP tunnels and SOCKS gateways from Tramp.
+;; SOCKS functionality is implemented by socks.el from the w3 package.
+;; HTTP tunnels are partly implemented in socks.el and url-http.el;
+;; both implementations are not complete. Therefore, it is
+;; implemented in this package.
+
+;;; Code:
+
+(require 'tramp)
+
+;; Pacify byte-compiler.
+(eval-when-compile
+ (require 'cl)
+ (require 'custom))
+(defvar socks-noproxy)
+
+;; We don't add the following methods to `tramp-methods', in order to
+;; exclude them from file name completion.
+
+;; Define HTTP tunnel method ...
+;;;###tramp-autoload
+(defconst tramp-gw-tunnel-method "tunnel"
+ "Method to connect HTTP gateways.")
+
+;; ... and port.
+(defconst tramp-gw-default-tunnel-port 8080
+ "Default port for HTTP gateways.")
+
+;; Define SOCKS method ...
+;;;###tramp-autoload
+(defconst tramp-gw-socks-method "socks"
+ "Method to connect SOCKS servers.")
+
+;; ... and port.
+(defconst tramp-gw-default-socks-port 1080
+ "Default port for SOCKS servers.")
+
+;; Autoload the socks library. It is used only when we access a SOCKS server.
+(autoload 'socks-open-network-stream "socks")
+(defvar socks-username (user-login-name))
+(defvar socks-server
+ (list "Default server" "socks" tramp-gw-default-socks-port 5))
+
+;; Add a default for `tramp-default-user-alist'. Default is the local user.
+;;;###tramp-autoload
+(add-to-list
+ 'tramp-default-user-alist
+ (list (concat "\\`"
+ (regexp-opt (list tramp-gw-tunnel-method tramp-gw-socks-method))
+ "\\'")
+ nil (user-login-name)))
+
+;; Internal file name functions and variables.
+
+(defvar tramp-gw-vector nil
+ "Keeps the remote host identification. Needed for Tramp messages.")
+
+(defvar tramp-gw-gw-vector nil
+ "Current gateway identification vector.")
+
+(defvar tramp-gw-gw-proc nil
+ "Current gateway process.")
+
+;; This variable keeps the listening process, in order to reuse it for
+;; new processes.
+(defvar tramp-gw-aux-proc nil
+ "Process listening on local port, as mediation between SSH and the gateway.")
+
+(defun tramp-gw-gw-proc-sentinel (proc _event)
+ "Delete auxiliary process when we are deleted."
+ (unless (memq (process-status proc) '(run open))
+ (tramp-message
+ tramp-gw-vector 4 "Deleting auxiliary process `%s'" tramp-gw-gw-proc)
+ (let* ((tramp-verbose 0)
+ (p (tramp-get-connection-property proc "process" nil)))
+ (when (processp p) (delete-process p)))))
+
+(defun tramp-gw-aux-proc-sentinel (proc _event)
+ "Activate the different filters for involved gateway and auxiliary processes."
+ (when (memq (process-status proc) '(run open))
+ ;; A new process has been spawned from `tramp-gw-aux-proc'.
+ (tramp-message
+ tramp-gw-vector 4
+ "Opening auxiliary process `%s', speaking with process `%s'"
+ proc tramp-gw-gw-proc)
+ (tramp-compat-set-process-query-on-exit-flag proc nil)
+ ;; We don't want debug messages, because the corresponding debug
+ ;; buffer might be undecided.
+ (let ((tramp-verbose 0))
+ (tramp-set-connection-property tramp-gw-gw-proc "process" proc)
+ (tramp-set-connection-property proc "process" tramp-gw-gw-proc))
+ ;; Set the process-filter functions for both processes.
+ (set-process-filter proc 'tramp-gw-process-filter)
+ (set-process-filter tramp-gw-gw-proc 'tramp-gw-process-filter)
+ ;; There might be already some output from the gateway process.
+ (with-current-buffer (process-buffer tramp-gw-gw-proc)
+ (unless (= (point-min) (point-max))
+ (let ((s (buffer-string)))
+ (delete-region (point) (point-max))
+ (tramp-gw-process-filter tramp-gw-gw-proc s))))))
+
+(defun tramp-gw-process-filter (proc string)
+ (let ((tramp-verbose 0))
+ ;; The other process might have been stopped already. We don't
+ ;; want to be interrupted then.
+ (ignore-errors
+ (process-send-string
+ (tramp-get-connection-property proc "process" nil) string))))
+
+;;;###tramp-autoload
+(defun tramp-gw-open-connection (vec gw-vec target-vec)
+ "Open a remote connection to VEC (see `tramp-file-name' structure).
+Take GW-VEC as SOCKS or HTTP gateway, i.e. its method must be a
+gateway method. TARGET-VEC identifies where to connect to via
+the gateway, it can be different from VEC when there are more
+hops to be applied.
+
+It returns a string like \"localhost#port\", which must be used
+instead of the host name declared in TARGET-VEC."
+
+ ;; Remember vectors for property retrieval.
+ (setq tramp-gw-vector vec
+ tramp-gw-gw-vector gw-vec)
+
+ ;; Start listening auxiliary process.
+ (unless (and (processp tramp-gw-aux-proc)
+ (memq (process-status tramp-gw-aux-proc) '(listen)))
+ (let ((aux-vec
+ (vector "aux" (tramp-file-name-user gw-vec)
+ (tramp-file-name-host gw-vec) nil nil)))
+ (setq tramp-gw-aux-proc
+ (make-network-process
+ :name (tramp-buffer-name aux-vec) :buffer nil :host 'local
+ :server t :noquery t :service t :coding 'binary))
+ (set-process-sentinel tramp-gw-aux-proc 'tramp-gw-aux-proc-sentinel)
+ (tramp-compat-set-process-query-on-exit-flag tramp-gw-aux-proc nil)
+ (tramp-message
+ vec 4 "Opening auxiliary process `%s', listening on port %d"
+ tramp-gw-aux-proc (process-contact tramp-gw-aux-proc :service))))
+
+ (let* ((gw-method
+ (intern
+ (tramp-find-method
+ (tramp-file-name-method gw-vec)
+ (tramp-file-name-user gw-vec)
+ (tramp-file-name-host gw-vec))))
+ (socks-username
+ (tramp-find-user
+ (tramp-file-name-method gw-vec)
+ (tramp-file-name-user gw-vec)
+ (tramp-file-name-host gw-vec)))
+ ;; Declare the SOCKS server to be used.
+ (socks-server
+ (list "Tramp temporary socks server list"
+ ;; Host name.
+ (tramp-file-name-real-host gw-vec)
+ ;; Port number.
+ (or (tramp-file-name-port gw-vec)
+ (case gw-method
+ (tunnel tramp-gw-default-tunnel-port)
+ (socks tramp-gw-default-socks-port)))
+ ;; Type. We support only http and socks5, NO socks4.
+ ;; 'http could be used when HTTP tunnel works in socks.el.
+ 5))
+ ;; The function to be called.
+ (socks-function
+ (case gw-method
+ (tunnel 'tramp-gw-open-network-stream)
+ (socks 'socks-open-network-stream)))
+ socks-noproxy)
+
+ ;; Open SOCKS process.
+ (setq tramp-gw-gw-proc
+ (funcall
+ socks-function
+ (let ((tramp-verbose 0)) (tramp-get-connection-name gw-vec))
+ (let ((tramp-verbose 0)) (tramp-get-connection-buffer gw-vec))
+ (tramp-file-name-real-host target-vec)
+ (tramp-file-name-port target-vec)))
+ (set-process-sentinel tramp-gw-gw-proc 'tramp-gw-gw-proc-sentinel)
+ (set-process-coding-system tramp-gw-gw-proc 'binary 'binary)
+ (tramp-compat-set-process-query-on-exit-flag tramp-gw-gw-proc nil)
+ (tramp-message
+ vec 4 "Opened %s process `%s'"
+ (case gw-method ('tunnel "HTTP tunnel") ('socks "SOCKS"))
+ tramp-gw-gw-proc)
+
+ ;; Return the new host for gateway access.
+ (format "localhost#%d" (process-contact tramp-gw-aux-proc :service))))
+
+(defun tramp-gw-open-network-stream (name buffer host service)
+ "Open stream to proxy server HOST:SERVICE.
+Resulting process has name NAME and buffer BUFFER. If
+authentication is requested from proxy server, provide it."
+ (let ((command (format (concat
+ "CONNECT %s:%d HTTP/1.1\r\n"
+ "Host: %s:%d\r\n"
+ "Connection: keep-alive\r\n"
+ "User-Agent: Tramp/%s\r\n")
+ host service host service tramp-version))
+ (authentication "")
+ (first t)
+ found proc)
+
+ (while (not found)
+ ;; Clean up.
+ (when (processp proc) (delete-process proc))
+ (with-current-buffer buffer (erase-buffer))
+ ;; Open network stream.
+ (setq proc (open-network-stream
+ name buffer (nth 1 socks-server) (nth 2 socks-server)))
+ (set-process-coding-system proc 'binary 'binary)
+ (tramp-compat-set-process-query-on-exit-flag proc nil)
+ ;; Send CONNECT command.
+ (process-send-string proc (format "%s%s\r\n" command authentication))
+ (tramp-message
+ tramp-gw-vector 6 "\n%s"
+ (format
+ "%s%s\r\n" command
+ (tramp-compat-replace-regexp-in-string ;; no password in trace!
+ "Basic [^\r\n]+" "Basic xxxxx" authentication t)))
+ (with-current-buffer buffer
+ ;; Trap errors to be traced in the right trace buffer. Often,
+ ;; proxies have a timeout of 60". We wait 65" in order to
+ ;; receive an answer this case.
+ (ignore-errors
+ (let ((tramp-verbose 0))
+ (tramp-wait-for-regexp proc 65 "\r?\n\r?\n")))
+ ;; Check return code.
+ (goto-char (point-min))
+ (narrow-to-region
+ (point-min)
+ (or (search-forward-regexp "\r?\n\r?\n" nil t) (point-max)))
+ (tramp-message tramp-gw-vector 6 "\n%s" (buffer-string))
+ (goto-char (point-min))
+ (search-forward-regexp "^HTTP/[1-9]\\.[0-9]" nil t)
+ (case (condition-case nil (read (current-buffer)) (error))
+ ;; Connected.
+ (200 (setq found t))
+ ;; We need basic authentication.
+ (401 (setq authentication (tramp-gw-basic-authentication nil first)))
+ ;; Access forbidden.
+ (403 (tramp-error-with-buffer
+ (current-buffer) tramp-gw-vector 'file-error
+ "Connection to %s:%d forbidden." host service))
+ ;; Target host not found.
+ (404 (tramp-error-with-buffer
+ (current-buffer) tramp-gw-vector 'file-error
+ "Host %s not found." host))
+ ;; We need basic proxy authentication.
+ (407 (setq authentication (tramp-gw-basic-authentication t first)))
+ ;; Connection failed.
+ (503 (tramp-error-with-buffer
+ (current-buffer) tramp-gw-vector 'file-error
+ "Connection to %s:%d failed." host service))
+ ;; That doesn't work at all.
+ (t (tramp-error-with-buffer
+ (current-buffer) tramp-gw-vector 'file-error
+ "Access to HTTP server %s:%d failed."
+ (nth 1 socks-server) (nth 2 socks-server))))
+ ;; Remove HTTP headers.
+ (delete-region (point-min) (point-max))
+ (widen)
+ (setq first nil)))
+ ;; Return the process.
+ proc))
+
+(defun tramp-gw-basic-authentication (proxy pw-cache)
+ "Return authentication header for CONNECT, based on server request.
+PROXY is an indication whether we need a Proxy-Authorization header
+or an Authorization header. If PW-CACHE is non-nil, check for
+password in password cache. This is done for the first try only."
+
+ ;; `tramp-current-*' must be set for `tramp-read-passwd'.
+ (let ((tramp-current-method (tramp-file-name-method tramp-gw-gw-vector))
+ (tramp-current-user (tramp-file-name-user tramp-gw-gw-vector))
+ (tramp-current-host (tramp-file-name-host tramp-gw-gw-vector)))
+ (unless pw-cache (tramp-clear-passwd tramp-gw-gw-vector))
+ ;; We are already in the right buffer.
+ (tramp-message
+ tramp-gw-vector 5 "%s required"
+ (if proxy "Proxy authentication" "Authentication"))
+ ;; Search for request header. We accept only basic authentication.
+ (goto-char (point-min))
+ (search-forward-regexp
+ "^\\(Proxy\\|WWW\\)-Authenticate:\\s-*Basic\\s-+realm=")
+ ;; Return authentication string.
+ (format
+ "%s: Basic %s\r\n"
+ (if proxy "Proxy-Authorization" "Authorization")
+ (base64-encode-string
+ (format
+ "%s:%s"
+ socks-username
+ (tramp-read-passwd
+ nil
+ (format
+ "Password for %s@[%s]: " socks-username (read (current-buffer)))))))))
+
+(add-hook 'tramp-unload-hook
+ (lambda ()
+ (unload-feature 'tramp-gw 'force)))
+
+(provide 'tramp-gw)
+
+;;; TODO:
+
+;; * Provide descriptive Commentary.
+;; * Enable it for several gateway processes in parallel.
+
+;;; tramp-gw.el ends here
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 57cb6e11d21..b0a2c431f95 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1,6 +1,6 @@
;;; tramp-sh.el --- Tramp access functions for (s)sh-like connections
-;; Copyright (C) 1998-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2017 Free Software Foundation, Inc.
;; (copyright statements below in code to be updated with the above notice)
@@ -794,7 +794,7 @@ on the remote host.")
(defconst tramp-perl-encode
"%s -e '
# This script contributed by Juanma Barranquero <lektu@terra.es>.
-# Copyright (C) 2002-2016 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
use strict;
my %%trans = do {
@@ -832,7 +832,7 @@ This string is passed to `format', so percent characters need to be doubled.")
(defconst tramp-perl-decode
"%s -e '
# This script contributed by Juanma Barranquero <lektu@terra.es>.
-# Copyright (C) 2002-2016 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
use strict;
my %%trans = do {
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 70b72d82f54..53e1ce8159d 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -1,6 +1,6 @@
;;; tramp-smb.el --- Tramp access functions for SMB servers
-;; Copyright (C) 2002-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2017 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
diff --git a/lisp/net/tramp-uu.el b/lisp/net/tramp-uu.el
index b3d84bb7bf8..ec2f46be730 100644
--- a/lisp/net/tramp-uu.el
+++ b/lisp/net/tramp-uu.el
@@ -1,6 +1,6 @@
;;; tramp-uu.el --- uuencode in Lisp
-;; Copyright (C) 2002-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2017 Free Software Foundation, Inc.
;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
;; Keywords: comm, terminals
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 7b5f71a754f..3697d50429d 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1,6 +1,6 @@
;;; tramp.el --- Transparent Remote Access, Multiple Protocol
-;; Copyright (C) 1998-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2017 Free Software Foundation, Inc.
;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
;; Michael Albinus <michael.albinus@gmx.de>
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 1cdbe161d52..9bf9102cc77 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -1,7 +1,7 @@
;;; trampver.el --- Transparent Remote Access, Multiple Protocol
;;; lisp/trampver.el. Generated from trampver.el.in by configure.
-;; Copyright (C) 2003-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2017 Free Software Foundation, Inc.
;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
;; Keywords: comm, processes
diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el
index 46f17afed47..f6e0cf87b9c 100644
--- a/lisp/net/webjump.el
+++ b/lisp/net/webjump.el
@@ -1,6 +1,6 @@
;;; webjump.el --- programmable Web hotlist
-;; Copyright (C) 1996-1997, 2001-2016 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1997, 2001-2017 Free Software Foundation, Inc.
;; Author: Neil W. Van Dyke <nwv@acm.org>
;; Created: 09-Aug-1996
diff --git a/lisp/net/zeroconf.el b/lisp/net/zeroconf.el
index 421c1953e33..3db65c624eb 100644
--- a/lisp/net/zeroconf.el
+++ b/lisp/net/zeroconf.el
@@ -1,6 +1,6 @@
;;; zeroconf.el --- Service browser using Avahi.
-;; Copyright (C) 2008-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2017 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, hardware