addon.TlsEstablishedServer

addon-dailer
lqqyt2423 3 years ago
parent fade639367
commit 0c26763147

@ -19,6 +19,9 @@ type Addon interface {
// A server connection has been closed (either by us or the server).
ServerDisconnected(*ConnContext)
// The TLS handshake with the server has been completed successfully.
TlsEstablishedServer(*ConnContext)
// HTTP request headers were successfully read. At this point, the body is empty.
Requestheaders(*Flow)
@ -40,6 +43,8 @@ func (addon *BaseAddon) ClientDisconnected(*ClientConn) {}
func (addon *BaseAddon) ServerConnected(*ConnContext) {}
func (addon *BaseAddon) ServerDisconnected(*ConnContext) {}
func (addon *BaseAddon) TlsEstablishedServer(*ConnContext) {}
func (addon *BaseAddon) Requestheaders(*Flow) {}
func (addon *BaseAddon) Request(*Flow) {}
func (addon *BaseAddon) Responseheaders(*Flow) {}

@ -125,6 +125,11 @@ func newMiddle(proxy *Proxy) (interceptor, error) {
if err := connCtx.tlsHandshake(clientHello); err != nil {
return nil, err
}
for _, addon := range connCtx.proxy.Addons {
addon.TlsEstablishedServer(connCtx)
}
return ca.GetCert(clientHello.ServerName)
},
},

Loading…
Cancel
Save