Merge pull request #2681 from yueguobin/fix/wireshark-curl-https-skip-cert

fix(web-wireshark): add -k flag to curl for HTTPS with self-signed certs
This commit is contained in:
Jeremy Grossmann 2026-04-23 23:04:08 +08:00 committed by GitHub
commit f06b5fff21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -888,8 +888,10 @@ class WebWiresharkManager:
raise RuntimeError("Container has no IP address")
# Start Wireshark in background (fire-and-forget, no waiting)
# Use -k for HTTPS to skip certificate validation (for self-signed certs)
curl_insecure_flag = "-k" if capture_stream_url.startswith("https://") else ""
wireshark_cmd = (
f"curl -N -H 'Authorization: Bearer {jwt_token}' "
f"curl {curl_insecure_flag} -N -H 'Authorization: Bearer {jwt_token}' "
f"'{capture_stream_url}' | "
f"wireshark -i - -k --fullscreen -display :{display} &"
)