@@ -269,17 +269,20 @@ func (p *proxyapp) colorizeTLS(req *layers.TLSClientHello, resp *layers.TLSServe
269269 if req .Version != nil && req .Version .Desc != "" {
270270 sb .WriteString (fmt .Sprintf (" Ver: %s" , req .Version .Desc ))
271271 }
272- if req .SessionID != "" {
273- sb .WriteString (fmt .Sprintf (" SID: %s" , req .SessionID ))
274- }
275272 if req .ALPN != nil {
276273 sb .WriteString (fmt .Sprintf (" ALPN: %v" , req .ALPN ))
277274 }
278275 sb .WriteString (" -> " )
279- sb .WriteString (fmt .Sprintf ("%s " , resp .TypeDesc ))
276+ sb .WriteString ("\n " )
277+ sb .WriteString (fmt .Sprintf ("%s " , p .colorizeTimestamp ()))
278+ sb .WriteString (id )
279+ sb .WriteString (fmt .Sprintf (" %s " , resp .TypeDesc ))
280280 if resp .Length > 0 {
281281 sb .WriteString (fmt .Sprintf (" Len: %d" , resp .Length ))
282282 }
283+ if resp .SessionID != "" {
284+ sb .WriteString (fmt .Sprintf (" SID: %s" , resp .SessionID ))
285+ }
283286 if resp .CipherSuite != nil && resp .CipherSuite .Desc != "" {
284287 sb .WriteString (fmt .Sprintf (" CS: %s" , resp .CipherSuite .Desc ))
285288 }
@@ -302,17 +305,20 @@ func (p *proxyapp) colorizeTLS(req *layers.TLSClientHello, resp *layers.TLSServe
302305 if req .Version != nil && req .Version .Desc != "" {
303306 sb .WriteString (colors .GreenBg (fmt .Sprintf (" Ver: %s" , req .Version .Desc )).String ())
304307 }
305- if req .SessionID != "" {
306- sb .WriteString (colors .Gray (fmt .Sprintf (" SID: %s" , req .SessionID )).String ())
307- }
308308 if req .ALPN != nil {
309309 sb .WriteString (colors .BlueBg (fmt .Sprintf (" ALPN: %v" , req .ALPN )).String ())
310310 }
311311 sb .WriteString (colors .MagentaBg (" -> " ).String ())
312- sb .WriteString (colors .LightBlue (fmt .Sprintf ("%s " , resp .TypeDesc )).Bold ())
312+ sb .WriteString ("\n " )
313+ sb .WriteString (fmt .Sprintf ("%s " , p .colorizeTimestamp ()))
314+ sb .WriteString (id )
315+ sb .WriteString (colors .LightBlue (fmt .Sprintf (" %s " , resp .TypeDesc )).Bold ())
313316 if resp .Length > 0 {
314317 sb .WriteString (colors .BeigeBg (fmt .Sprintf (" Len: %d" , resp .Length )).String ())
315318 }
319+ if resp .SessionID != "" {
320+ sb .WriteString (colors .Gray (fmt .Sprintf (" SID: %s" , resp .SessionID )).String ())
321+ }
316322 if resp .CipherSuite != nil && resp .CipherSuite .Desc != "" {
317323 sb .WriteString (colors .Yellow (fmt .Sprintf (" CS: %s" , resp .CipherSuite .Desc )).Bold ())
318324 }
0 commit comments