unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Unifying network stream
@ 2011-07-01 22:31 falkdayaram
  2011-07-02  8:47 ` Julien Danjou
  2011-07-02 12:43 ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 8+ messages in thread
From: falkdayaram @ 2011-07-01 22:31 UTC (permalink / raw)
  To: emacs-devel

I am using GNU Emacs in a corporate environment.  Due to inhouse
restrictions I am not able to use the inbuilt network stream functions
(open-network-stream, starttls-open-stream, open-tls-stream,
open-gnutls-stream etc.).  To workaround our inhouse proxies and
firewalls, I completly rewrote the network stream/tls/starttls
implementation to bypass our infrastructure.  Whilst emacs provides great
tools to implement such a major change, I am still struggeling to keep my
patches up with upstream development.  Other than that, there are so many
different function that may be used to open network streams, implemented
in so many different places.  It would be great if the creation of network
streams is unified in one single function (open-network-stream).  I could
advice this function then, and would not have to deal with all the other
entry points in my code.

Is there any chance this could be implemented in emacs 24?  I am probably
not the only one out here who uses an own network backend.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Unifying network stream
  2011-07-01 22:31 Unifying network stream falkdayaram
@ 2011-07-02  8:47 ` Julien Danjou
  2011-07-02 10:49   ` Falk Dayaram
  2011-07-02 12:43 ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 8+ messages in thread
From: Julien Danjou @ 2011-07-02  8:47 UTC (permalink / raw)
  To: falkdayaram; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

On Sat, Jul 02 2011, falkdayaram@lavabit.com wrote:

> Is there any chance this could be implemented in emacs 24?  I am probably
> not the only one out here who uses an own network backend.

Could you be more specific about what your patches do?

-- 
Julien Danjou
❱ http://julien.danjou.info

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Unifying network stream
  2011-07-02  8:47 ` Julien Danjou
@ 2011-07-02 10:49   ` Falk Dayaram
  0 siblings, 0 replies; 8+ messages in thread
From: Falk Dayaram @ 2011-07-02 10:49 UTC (permalink / raw)
  To: emacs-devel

Julien Danjou <julien@danjou.info> writes:

> On Sat, Jul 02 2011, falkdayaram@lavabit.com wrote:
>
>> Is there any chance this could be implemented in emacs 24?  I am
>> probably not the only one out here who uses an own network backend.
>
> Could you be more specific about what your patches do?

Basically what they do is to create a real network process that is used
for the actual communication (nc or gnutls-cli); and then setting up
specific iptables rules for that process to forward the actual
communcation to inhoise-specific exit nodes.  In reality it is a lot
more complicated, but thats out of the scope of this post ;)

What I would like to see implemented in emacs 24 is that there is only
one or two functions that may be used to open network streams.  In
particular, those functions are already there; open-network-stream and
make-network-process.  Unfortunately there is lots of lisp code which
rather uses the actual backend interface functions
(e.g. starttls-open-stream) rather than these neat high level function.
Therefore I'd like to deprecate all these backend functions.

Ultimately such a change allows easy management of emacs network stream
by advising only those two high level functions.  This is useful for
redirecting connection like I do, but there are also tons of other
usecases that may benefit from such a change; e.g. an inbuilt emacs
firewall or central OCSP validation of tls connections, etc.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Unifying network stream
  2011-07-01 22:31 Unifying network stream falkdayaram
  2011-07-02  8:47 ` Julien Danjou
@ 2011-07-02 12:43 ` Lars Magne Ingebrigtsen
  2011-07-04 16:12   ` Stefan Monnier
  1 sibling, 1 reply; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-02 12:43 UTC (permalink / raw)
  To: emacs-devel

falkdayaram@lavabit.com writes:

> It would be great if the creation of network streams is unified in one
> single function (open-network-stream).

That's supposed to be the case in Emacs 24.  `open-network-stream' has
been extended to support TLS/STARTTLS/etc, and is the only function that
people are supposed to call now.

But it'll take a while for all use cases to switch over, I guess.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Unifying network stream
  2011-07-02 12:43 ` Lars Magne Ingebrigtsen
@ 2011-07-04 16:12   ` Stefan Monnier
  2011-07-05 15:18     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2011-07-04 16:12 UTC (permalink / raw)
  To: emacs-devel

>> It would be great if the creation of network streams is unified in one
>> single function (open-network-stream).

> That's supposed to be the case in Emacs 24.  `open-network-stream' has
> been extended to support TLS/STARTTLS/etc, and is the only function that
> people are supposed to call now.

> But it'll take a while for all use cases to switch over, I guess.

Are there functions left over which we could mark obsolete to help
this process?


        Stefan



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Unifying network stream
  2011-07-04 16:12   ` Stefan Monnier
@ 2011-07-05 15:18     ` Lars Magne Ingebrigtsen
  2011-07-05 19:15       ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-05 15:18 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Are there functions left over which we could mark obsolete to help
> this process?

`open-network-stream' itself now calls `open-starttls-stream' (etc.), so
marking these obsolete is probably somewhat incorrect.  Since they won't
go away, but are now relegated to "low-level" functions that you
probably shouldn't call directly.

We could adjust the doc strings of these functions, though?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Unifying network stream
  2011-07-05 15:18     ` Lars Magne Ingebrigtsen
@ 2011-07-05 19:15       ` Stefan Monnier
  2011-07-05 19:27         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2011-07-05 19:15 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: emacs-devel

>> Are there functions left over which we could mark obsolete to help
>> this process?
> `open-network-stream' itself now calls `open-starttls-stream' (etc.), so
> marking these obsolete is probably somewhat incorrect.  Since they won't
> go away, but are now relegated to "low-level" functions that you
> probably shouldn't call directly.

> We could adjust the doc strings of these functions, though?

Obsolete declarations do not apply to calls from code that's in the
same file as the obsolescence declaration (since Emacs-24), so you can
still use an obsolete function without suffering from warnings.

This said I can't find open-starttls-stream in Emacs anyway,


        Stefan



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Unifying network stream
  2011-07-05 19:15       ` Stefan Monnier
@ 2011-07-05 19:27         ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-05 19:27 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> This said I can't find open-starttls-stream in Emacs anyway,

It's `starttls-open-stream' in stattls.el.  

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-07-05 19:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-01 22:31 Unifying network stream falkdayaram
2011-07-02  8:47 ` Julien Danjou
2011-07-02 10:49   ` Falk Dayaram
2011-07-02 12:43 ` Lars Magne Ingebrigtsen
2011-07-04 16:12   ` Stefan Monnier
2011-07-05 15:18     ` Lars Magne Ingebrigtsen
2011-07-05 19:15       ` Stefan Monnier
2011-07-05 19:27         ` Lars Magne Ingebrigtsen

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).