From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs,gmane.emacs.devel Subject: bug#16026: Connection specific settings and proxies Date: Thu, 02 Feb 2017 04:43:10 +0100 Message-ID: References: <86wqjnwa9u.fsf@somewhere.org> <871u1s38m3.fsf@flea.lifelogs.com> <877f5j2i67.fsf@gnus.org> <87a8a8paru.fsf@lifelogs.com> <87r33jnvn1.fsf@lifelogs.com> <87h94fqjq7.fsf@gmx.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1486007928 22244 195.159.176.226 (2 Feb 2017 03:58:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 2 Feb 2017 03:58:48 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Ted Zlatanov , 16026@debbugs.gnu.org, Stefan Monnier , Emacs developers To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 02 04:58:44 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZ8Xj-0005aR-Gk for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Feb 2017 04:58:43 +0100 Original-Received: from localhost ([::1]:54049 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZ8Xo-0005na-Vt for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Feb 2017 22:58:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZ8Xf-0005fG-55 for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2017 22:58:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZ8JX-0006XY-Lm for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2017 22:44:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55539) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cZ8JX-0006XK-J0 for bug-gnu-emacs@gnu.org; Wed, 01 Feb 2017 22:44:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cZ8JW-00062U-Bb; Wed, 01 Feb 2017 22:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Thu, 02 Feb 2017 03:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16026 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: Original-Received: via spool by 16026-submit@debbugs.gnu.org id=B16026.148600700223159 (code B ref 16026); Thu, 02 Feb 2017 03:44:02 +0000 Original-Received: (at 16026) by debbugs.gnu.org; 2 Feb 2017 03:43:22 +0000 Original-Received: from localhost ([127.0.0.1]:53738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZ8Is-00061S-CL for submit@debbugs.gnu.org; Wed, 01 Feb 2017 22:43:22 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:57191) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZ8Ir-00061L-BF for 16026@debbugs.gnu.org; Wed, 01 Feb 2017 22:43:21 -0500 Original-Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1cZ8Ih-0006mI-6K; Thu, 02 Feb 2017 04:43:13 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXe1dRzQVdEDie0kJj2 7uz79vTq4uDy6ecQbg69AAACb0lEQVQ4jUWUQY7jIBBFkZzxbIN9ApwL2M0o2UZqCNssoHtryd3F 1lJjc/35Bc4MSYhcj1+/oEjE5l3OMXmDEbxJeBmz0y4CnjIPZ2wICALkuSWAwBqMmE0ZyeS1ZUVZ Z5LL5HIyeLJmjxUwem+EFroRNiDj4wW8cSfjvugaHr88Hh9xLR4AP190j7PYm2C3EPYKMD4arZtR aMynzfoVaxC1UPjn6YSSRQomWTdXwBszT4cynYnm05oXsIH35svmU07evUAowHmzJjIu2c/MACHr MX2mdG9uDodgXN4BUJy1yILIOt1a+Li071UBd8RdbuT4x+BUsjkAm95Pj0ZKOcID70dN5cNDNOMk pVL9mByO/R+4az0NspOyl2e226kCu06yG4ZBYlZfxrkXMIuUAwPE5Q2FEVVzB98BqO8gOqNndFTl 2JjB29BrvWU3txWsKJRzXd4GqftTBbBYm0kWcwCl9S3nqvBoUjVHKiX/gw/dTwUo+YYJYBeCwbvk rbGiuyBhBQvAwqAr++Ca1TWTwLCBN1HiFcgrHUDXkg4IUBXbxwGUVAWo31WxPUtJLxvVXYgBqvrh k1WqyDrVDWdigku8sALxqbqr6wESn8eADvVsM3R9xJkziAWo8yRLp+Q1HgrSFaylS/1I+wFWXdra 5wWF6RYHWMAi7romacUke/xm95byodB8QHCXvf5Obo2U9hlg5mbw0HqMJiUi3AUBsGh2x2rErfMO mTKxAu2DBh9Bm8V/Qsy4bqwQFYyCEIvI5LCeGzUz0GPL9cO4bUv8lWoUsWx4XpmIouC4EG3meIt/ HRJ8RQ4wUh1t/ZoF0fIX3JwW2CU5fRQAAAAASUVORK5CYII= In-Reply-To: <87h94fqjq7.fsf@gmx.de> (Michael Albinus's message of "Tue, 31 Jan 2017 17:26:08 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:128880 gmane.emacs.devel:211860 Archived-At: Michael Albinus writes: >> It's easy to create an ad-hoc system just for network timeout >> parameters, like I did with many GnuTLS parameters early on, but the >> systematic approach Michael gave us is much better. The only reason I >> haven't implemented it is lack of time. > > If I could help, just ping me. Not that I have too much free time, but > I'm interested in this. I was just pondering something that's perhaps related: HTTP proxying in the with-url branch. url.el uses an alist on the form ((("http" . "foo.bar:port") "proxy:port")) or something to determine what connections should be proxied. It doesn't support HTTPS proxies (i.e., "CONNECT"), so it's rather underspecified, if I read the code correctly. I'm also not sure what level to put the proxies on: Should they be passed in from the application (i.e., eww, Gnus, etc) or should it be a global Emacs setting? If the latter, you could see having a call like (set-proxy :match-domain ".*\\.foo\\.bar\\'" :target-port 443 :proxy-server "localhost" :proxy-port 80 :method 'connect) to set up the proxy. (Well, really, you'd have a mode that would allow you to tweak the global proxy setup.) Now, this all kinda ties in with what Ted was talking about: A per-connection setting thing. So you could envision doing just the same with, say, IMAP, if you need to have that be proxied or something, and then it turns out that the right layer for this stuff is probably in `open-network-stream': Almost all networking already goes through that function, so by implementing it there, all clients get automatic proxy support. The same mechanism for determining things like lifecycle settings (i.e., network timeout parameters) could somehow be squeezed in here. But I've read the doc for connection-local-set-class-variables, and I don't quite see how to match up these needs with that mechanism... And, like I said, I don't know whether it's the right design choice to have these settings be global, or whether they should be passed in explicitly from each application. Would users want to use one set of proxies while reading HTML news from Gnus and another when reading from eww? Perhaps? Perhaps not? So many options... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no