privoxy-log-parser: Higlight 'Server successfully connected over TLSv1.3 (TLS_AES_256...
authorFabian Keil <fk@fabiankeil.de>
Sat, 9 Jul 2022 06:12:05 +0000 (08:12 +0200)
committerFabian Keil <fk@fabiankeil.de>
Sun, 10 Jul 2022 05:55:55 +0000 (07:55 +0200)
tools/privoxy-log-parser.pl

index 297b9dc..ae4ef3e 100755 (executable)
@@ -186,6 +186,8 @@ sub prepare_our_stuff() {
         'configuration-line' => 'red',
         'content-type'       => 'yellow',
         'HOST'               => HEADER_DEFAULT_COLOUR,
+        'tls-version'        => 'pink',
+        'cipher-suite'       => 'light_cyan',
     );
 
     %h_colours = %h;
@@ -1944,6 +1946,12 @@ sub handle_loglevel_connect($) {
         # Client socket 21 is no longer usable. The server socket has been closed.
         $c =~ s@(?<=Client socket )(\d+)@$h{'Number'}$1$h{'Standard'}@;
 
+    } elsif ($c =~ m/^Server successfully connected over/) {
+
+        # Server successfully connected over TLSv1.3 (TLS_AES_256_GCM_SHA384).
+        $c =~ s@(?<=connected over )(TLSv\d\.\d)@$h{'tls-version'}$1$h{'Standard'}@;
+        $c =~ s@(?<=\()([^)]+)@$h{'cipher-suite'}$1$h{'Standard'}@;
+
     } elsif ($c =~ m/^Looks like we / or
              $c =~ m/^Unsetting keep-alive flag/ or
              $c =~ m/^No connections to wait/ or