stream-lua-nginx-module icon indicating copy to clipboard operation
stream-lua-nginx-module copied to clipboard

starttls

Open bjne opened this issue 1 year ago • 1 comments

Does anyone have ideas on how starttls could be possible to accomplish with this module? Would likely need patches to nginx as well, but would be a nice feature that is currently missing

bjne avatar Sep 13 '23 15:09 bjne

I was able to accomplish this now by preread and proxy, but would be extremely nice if one could:

listen 1234; # no ssl here

ssl_certificate_...

preread_by_lua_block {
  local sock = assert(ngx.req.socket(true))

  if sock:receive() == "STARTTLS" then
     sock:sslhandshake(...)
  end
}

bjne avatar Sep 14 '23 16:09 bjne