unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 16026@debbugs.gnu.org, Michael Albinus <michael.albinus@gmx.de>,
	Stefan Monnier <monnier@IRO.UMontreal.CA>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: bug#16026: Connection specific settings and proxies
Date: Thu, 02 Feb 2017 09:46:59 -0500	[thread overview]
Message-ID: <87o9ykr6os.fsf@flea> (raw)
In-Reply-To: <m3efzhmf5d.fsf_-_@stories> (Lars Ingebrigtsen's message of "Thu,  02 Feb 2017 04:43:10 +0100")

On Thu, 02 Feb 2017 04:43:10 +0100 Lars Ingebrigtsen <larsi@gnus.org> 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



  reply	other threads:[~2017-02-02 14:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.7856.1385996719.10748.bug-gnu-emacs@gnu.org>
     [not found] ` <86wqjnwa9u.fsf@somewhere.org>
     [not found]   ` <jwvfvqb1bhb.fsf-monnier+emacsbugs@gnu.org>
     [not found]     ` <871u1s38m3.fsf@flea.lifelogs.com>
     [not found]       ` <877f5j2i67.fsf@gnus.org>
     [not found]         ` <jwvziif80c1.fsf-monnier+emacsbugs@gnu.org>
     [not found]           ` <87a8a8paru.fsf@lifelogs.com>
     [not found]             ` <jwv8tpsi3ah.fsf-monnier+emacsbugs@gnu.org>
     [not found]               ` <87r33jnvn1.fsf@lifelogs.com>
     [not found]                 ` <87h94fqjq7.fsf@gmx.de>
2017-02-02  3:43                   ` bug#16026: Connection specific settings and proxies Lars Ingebrigtsen
2017-02-02 14:46                     ` Ted Zlatanov [this message]
2017-02-03 15:37                       ` Michael Albinus
     [not found]                       ` <87mve3ffov.fsf__41803.1231420629$1486136780$gmane$org@gmx.de>
2017-02-06 15:22                         ` Ted Zlatanov
2017-02-12 17:42                           ` Michael Albinus
2017-02-13 15:54                             ` Ted Zlatanov
2017-02-13 16:17                               ` Michael Albinus
2017-02-14 15:01                                 ` Ted Zlatanov
2017-02-19 16:26                                   ` Michael Albinus
2017-02-20 16:01                             ` bug#16026: " Lars Ingebrigtsen
2017-02-02 23:58                     ` Daniel McClanahan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9ykr6os.fsf@flea \
    --to=tzz@lifelogs.com \
    --cc=16026@debbugs.gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=michael.albinus@gmx.de \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).