mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-09-20 17:00:38 +03:00
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:
commit
f06b5fff21
@ -888,8 +888,10 @@ class WebWiresharkManager:
|
|||||||
raise RuntimeError("Container has no IP address")
|
raise RuntimeError("Container has no IP address")
|
||||||
|
|
||||||
# Start Wireshark in background (fire-and-forget, no waiting)
|
# 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 = (
|
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"'{capture_stream_url}' | "
|
||||||
f"wireshark -i - -k --fullscreen -display :{display} &"
|
f"wireshark -i - -k --fullscreen -display :{display} &"
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user