From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.bugs Subject: bug#16026: Connection specific settings and proxies Date: Thu, 02 Feb 2017 09:46:59 -0500 Organization: =?UTF-8?Q?=D0=A2=D0=B5=D0=BE=D0=B4=D0=BE=D1=80_?= =?UTF-8?Q?=D0=97=D0=BB=D0=B0=D1=82=D0=B0=D0=BD=D0=BE=D0=B2?= @ Cienfuegos Message-ID: <87o9ykr6os.fsf__44502.6399022483$1486048818$gmane$org@flea> 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 1486048818 28793 195.159.176.226 (2 Feb 2017 15:20:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 2 Feb 2017 15:20:18 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Michael Albinus , 16026@debbugs.gnu.org, Stefan Monnier , Emacs developers To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 02 16:20:08 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 1cZJB9-00079R-Dt for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Feb 2017 16:20:07 +0100 Original-Received: from localhost ([::1]:57222 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZJBD-0005dU-AR for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Feb 2017 10:20:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZIgC-0000NM-CG for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 09:48:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZIg7-0002I1-Fo for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 09:48:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55698) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cZIg7-0002Hu-C3 for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2017 09:48:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cZIg6-0006J9-Ae; Thu, 02 Feb 2017 09:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ted Zlatanov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Thu, 02 Feb 2017 14:48: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.148604683524196 (code B ref 16026); Thu, 02 Feb 2017 14:48:02 +0000 Original-Received: (at 16026) by debbugs.gnu.org; 2 Feb 2017 14:47:15 +0000 Original-Received: from localhost ([127.0.0.1]:53896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZIfI-0006I8-61 for submit@debbugs.gnu.org; Thu, 02 Feb 2017 09:47:13 -0500 Original-Received: from mail-qt0-f174.google.com ([209.85.216.174]:36834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cZIfC-0006Hb-NE for 16026@debbugs.gnu.org; Thu, 02 Feb 2017 09:47:10 -0500 Original-Received: by mail-qt0-f174.google.com with SMTP id k15so33944959qtg.3 for <16026@debbugs.gnu.org>; Thu, 02 Feb 2017 06:47:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lifelogs.com; s=google; h=from:to:cc:subject:organization:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version; bh=vne3cVIxoGQNLmOISi0X+iePfHOZoI4fpY8r3BHIKUU=; b=GgtntvS+0bhC52k/mPGoOrasFlWaez1f919rHZ7AxYNe0SOpG///vhTKrx7s8OU60D 3DZ/hkjPx425uhvnDM8DP5j+cNQ6wr1oedcSRtXxrWSboKPMVuSS76BZmreL8kguIise hJ/zb50usWsKMIPVgzgrQu1o6SD75u6SLI93Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:organization:references :mail-copies-to:gmane-reply-to-list:date:in-reply-to:message-id :user-agent:mime-version; bh=vne3cVIxoGQNLmOISi0X+iePfHOZoI4fpY8r3BHIKUU=; b=KOdR7XlMxpEjIA9WZCoMQTUxVi/BSADutuN6U4TIA4nLjVEY7+rQJG/kCh7GmwObGT g/tBXiHi5BsnfQr/IZAtB0UBaY10c6m2SlqK2J7PFUV8m4NL39EjNeqFDmrdw6V+v4Yn T/bt6HJ0r07Q/pyo5vqOI3KNrKfGsWsTeYZ2qa9/OYrv5edrLgi6wpCKxmJ6oCyZ6RB+ ZBHtEN6Zr1yBdxrdqi2+eeX0p975BhtkiIinVlNIcYXWdxn+EldQ5jJls38cwhOdnM73 ZKfEdxgj12l3oeidbSJsy7bFrsaUk1O7QXjIWCiDAbkMShu3a+OeBKaix07qEXumC7L3 eg3A== X-Gm-Message-State: AIkVDXI+aUvWnV3meB0aE9mlySID5dTBk6tJKEhmSfnFB5bfPKDAckVbG5Brzaf6YMCB8w== X-Received: by 10.200.57.163 with SMTP id v32mr8922367qte.173.1486046820916; Thu, 02 Feb 2017 06:47:00 -0800 (PST) Original-Received: from flea (c-98-229-60-157.hsd1.ma.comcast.net. [98.229.60.157]) by smtp.gmail.com with ESMTPSA id h62sm6627883qkc.23.2017.02.02.06.46.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Feb 2017 06:47:00 -0800 (PST) X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: (Lars Ingebrigtsen's message of "Thu, 02 Feb 2017 04:43:10 +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:128884 Archived-At: On Thu, 02 Feb 2017 04:43:10 +0100 Lars Ingebrigtsen wrote: LI> I'm also not sure what level to put the proxies on: Should they be LI> passed in from the application (i.e., eww, Gnus, etc) or should it be a LI> global Emacs setting? LI> If the latter, you could see having a call like LI> (set-proxy :match-domain ".*\\.foo\\.bar\\'" LI> :target-port 443 LI> :proxy-server "localhost" LI> :proxy-port 80 LI> :method 'connect) LI> to set up the proxy. (Well, really, you'd have a mode that would allow LI> you to tweak the global proxy setup.) The way Michael set it up, you have connection profiles ("classes") that can be associated with any variables. (For passers-by, see `connection-local-set-class-variables', `connection-local-set-classes', and `with-connection-local-classes'). Profiles can be overlaid to augment each other. (Michael: maybe it's not too late to change "class" to "profile" because the former is so overloaded in our field?) LI> And, like I said, I don't know whether it's the right design choice to LI> have these settings be global, or whether they should be passed in LI> explicitly from each application. Would users want to use one set of LI> proxies while reading HTML news from Gnus and another when reading from LI> eww? Perhaps? Perhaps not? I see. I think the classes should be associated with applications and protocols and login names, not just connections. Michael, what do you think? That would require changing the identification parameter to `connection-local-get-classes' to be an alist or a plist like :user U :application X :protocol Y :machine Z I can imagine more criteria in the future, so the identification should be flexible. This has a pretty big semantic overlap with how auth-source selects credentials and NSM applies security polity, so I think it makes sense to absorb those things into the same hierarchy. So IMO this is a chance to consolidate a lot of disparate code and improve the user experience. Then you could have: "class C1(contains the proxy P1) for IMAP to machines A B C" "class C2(contains the proxy P2) for everything" "class C3(contains the proxy P3) for machines B C D" So IMAP to machine B would get C1/P1, but HTTP to machine B would get C3/P3 (all the matching classes should be applied in specificity order so the most specific one wins). Not all parameters apply everywhere, so we're looking to extract the truly global ones first: network timeout, proxies, NSM policy, GnuTLS parameters, auth-source entries. Ted