Welcome! Log In Create A New Profile

Advanced

Re: custom logic after connection is closed

November 14, 2016 07:55AM
Hi Maxim,

Maxim Dounin Wrote:
-------------------------------------------------------
> Hello!
>
> On Mon, Nov 14, 2016 at 05:08:33AM -0500, nemster wrote:
>
> > Hi!
> > Is it possible to write a plugin that does some additional stuff
> after a TLS
> > (http/1.1, http/2.0) TCP connection.
> > I would want to keep some extra struct for each TLS connection and
> > manipulated it with every request, then once the TLS (or TCP)
> connection
> > closes i would want to do some processing and cleanup.
>
> You can install a pool cleanup handler on a connection pool. Grep
> sources for ngx_pool_cleanup_add() for usage examples.

looks like a good candidate, however from what i understand in ngx_http_close_connection that is kicked of in the end when ngx_destroy_pool is called.
however the TLS session is deleted after that. ideally i would want access to TLS Parameters such as TLS Session Cookie and the crypto params.

I could log them maybe at session start and then finalize only in the pool cleanup handler, but that would basically double that data in memory for no reason.
Subject Author Posted

custom logic after connection is closed

nemster November 14, 2016 05:08AM

Re: custom logic after connection is closed

Maxim Dounin November 14, 2016 07:40AM

Re: custom logic after connection is closed

nemster November 14, 2016 07:55AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 327
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready