-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add network diagnostic tool for HTTP/2 connectivity issues #21259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
geropl
wants to merge
6
commits into
main
Choose a base branch
from
tools/network-diagnostic
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,138
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adds a cross-platform diagnostic tool to help identify network issues affecting Gitpod connectivity, particularly HTTP/2 and TLS problems caused by corporate proxies and firewalls. The tool checks: - DNS resolution - TCP connectivity - TLS handshake (version, cipher, ALPN, cert chain) - HTTP/2 SETTINGS exchange with server settings capture - Connect-RPC test request (mimics VSCode Desktop) - Reference test against google.com It detects common issues like SSL inspection, HTTP/2 protocol errors, and protocol downgrades, providing actionable recommendations. Co-authored-by: Ona <[email protected]>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Co-authored-by: Ona <[email protected]>
Adds two additional tests to help differentiate between failure modes: - HTTP/1.1 test: Forces HTTP/1.1 via ALPN to check if basic HTTPS works - WebSocket test: Attempts WebSocket upgrade to /api/gitpod endpoint This helps identify: - HTTP/2 specific issues (HTTP/1.1 works, HTTP/2 fails) - WebSocket blocking (HTTP works, WebSocket upgrade fails) Co-authored-by: Ona <[email protected]>
- Add TLS key exchange detection (ECDHE, RSA, TLS 1.3) - Add compatibility warnings section to diagnosis: - Warn if server advertises ENABLE_CONNECT_PROTOCOL - Warn about potential post-quantum key exchange with TLS 1.3 - Warn if HTTP/2 works but Connect-RPC fails - Display key exchange in TLS handshake output These warnings help identify potential issues with corporate proxies and older network equipment that may not support newer TLS/HTTP/2 features. Co-authored-by: Ona <[email protected]>
Adds --full flag to run extended tests: TLS Compatibility: - TLS 1.2 fallback - P-256 curve only (simulates middlebox rejecting X25519) - Legacy cipher suite HTTP/2 Robustness: - Large headers (8KB) - Many headers (50) - Concurrent streams (5) Protocol Variants: - gRPC request - Connect-RPC streaming Bumps version to 0.2.0. Co-authored-by: Ona <[email protected]>
New test categories: Middlebox Detection: - Response headers capture (Via, Server, X-Forwarded-*, proxy signatures) - Proxy signature detection (BlueCoat, Squid, CloudFlare, etc.) - Full certificate chain details (subject, issuer, org, validity, DNS names) - TLS session resumption test - Timing breakdown (DNS/TCP/TLS/HTTP2/first-byte) Reliability Tests: - Retry test (3 attempts) to detect intermittent failures - Connection reuse test (second request on same connection) - Consistency check across attempts Also adds HTTP/2 PING roundtrip test to HTTP/2 robustness category. Bumps version to 0.3.0. Co-authored-by: Ona <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Some customers experience VSCode Desktop connection failures with HTTP/2 protocol errors, while browser-based IDEs work fine. These issues are often caused by corporate proxies, SSL inspection appliances, or firewalls that don't properly handle HTTP/2.
Diagnosing these issues is difficult because:
Solution
This PR adds a standalone diagnostic tool (
dev/network-diag) that customers can run to identify network issues. The tool produces both human-readable and JSON output for easy sharing and comparison.Features
Standard Tests
Extended Tests (
--fullflag)TLS Compatibility:
HTTP/2 Robustness:
Protocol Variants:
Middlebox Detection:
Reliability Tests:
Automatic Diagnosis
The tool automatically detects and reports:
Usage
Example Output
Cross-Platform Binaries
The Makefile builds binaries for:
Testing
Tested against three preview environments with different Caddy versions:
All environments pass all tests identically, confirming the tool works correctly and can detect differences when they exist.
Related
This tool was created to help diagnose issues like those in #21258 where HTTP/2 behavior changes in Caddy 2.9+ may cause problems with certain corporate network configurations.