try to make this work

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer
2025-05-21 02:00:12 +02:00
parent 1155ccb3e8
commit 82c177b7eb
10 changed files with 101 additions and 53 deletions

View File

@ -13,9 +13,16 @@ func (p *Payload) innerHandler(ctx protocol.Context) {
ctx.EndInnerProtocol(protocol.StatusError, nil)
return
}
pl := p.Inner.Handle(ctx)
pl := p.Inner.Handle(ctx.ForInnerProtocol(p.Inner.Type()))
enc, err := pl.Encode()
p.st.TLS.Write(enc)
if err != nil {
ctx.Log().WithError(err).Warning("failed to encode inner protocol")
}
// p.st.Conn.expectedWriterByteCount = len(enc)
_, err = p.st.TLS.Write(enc)
if err != nil {
ctx.Log().WithError(err).Warning("failed to write to TLS")
}
// return &Payload{
// Data: enc,
// }