Просмотр исходного кода

Updated TLS and QUIC expected tunnel fields test

Amir Khan 1 год назад
Родитель
Сommit
f1beca35b8
1 измененных файлов с 18 добавлено и 0 удалено
  1. 18 0
      psiphon/server/server_test.go

+ 18 - 0
psiphon/server/server_test.go

@@ -2310,11 +2310,29 @@ func checkExpectedServerTunnelLogFields(
 		}
 	}
 
+	if protocol.TunnelProtocolUsesMeekHTTPS(runConfig.tunnelProtocol) ||
+		protocol.TunnelProtocolUsesTLSOSSH(runConfig.tunnelProtocol) {
+
+		for _, name := range []string{
+			"tls_sent_ticket",
+			"tls_did_resume",
+		} {
+			if fields[name] == nil || fmt.Sprintf("%s", fields[name]) == "" {
+				return fmt.Errorf("missing expected field '%s'", name)
+			}
+		}
+
+	}
+
 	if protocol.TunnelProtocolUsesQUIC(runConfig.tunnelProtocol) {
 
 		for _, name := range []string{
 			"quic_version",
 			"quic_dial_sni_address",
+			"quic_dial_early",
+			"quic_sent_ticket",
+			"quic_did_resume",
+			"quic_obfuscated_psk",
 		} {
 			if fields[name] == nil || fmt.Sprintf("%s", fields[name]) == "" {
 				return fmt.Errorf("missing expected field '%s'", name)