-
Notifications
You must be signed in to change notification settings - Fork 846
Add ERR_TUN_ACTIVE_TIMEOUT squid code for tunnel timeouts #12786
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
base: master
Are you sure you want to change the base?
Conversation
Add new SquidLogCode to identify when CONNECT tunnels time out due to active timeout. This makes tunnel timeouts visible in access logs via the crc (cache result code) field. Previously, tunnel timeouts were not distinguishable in logs - users could only see them in DEBUG logs. Now the access log will show crc=ERR_TUN_ACTIVE_TIMEOUT for timed-out tunnels. Includes autotest to verify the squid code is logged correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new squid log code ERR_TUN_ACTIVE_TIMEOUT to identify when CONNECT tunnels time out due to active timeout, making these events visible in access logs via the crc (cache result code) field.
Key Changes:
- Add
ERR_TUN_ACTIVE_TIMEOUT = 'T'enum value for tunnel active timeouts - Set the squid code in SSL tunnel handlers when
VC_EVENT_ACTIVE_TIMEOUToccurs - Include comprehensive test coverage to verify the logging behavior
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| include/proxy/hdrs/HTTP.h | Adds new ERR_TUN_ACTIVE_TIMEOUT enum value to SquidLogCode |
| src/proxy/http/HttpSM.cc | Sets the squid code in SSL tunnel producer and consumer handlers on active timeout events |
| src/proxy/logging/Log.cc | Updates the log field alias table to include the new squid code string mapping |
| tests/gold_tests/timeout/tunnel_timeout_client.py | Provides test client that establishes CONNECT tunnel and holds it idle to trigger timeout |
| tests/gold_tests/timeout/tunnel_active_timeout.test.py | Test case that verifies ERR_TUN_ACTIVE_TIMEOUT is logged for tunnel timeouts |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import time | ||
|
|
||
|
|
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'time' is not used.
| import time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add proxy.config.log.max_secs_per_buffer=1 to force log flush - Add delay test run to wait for log file to be written - Remove unused 'import time' from client script
Add new SquidLogCode to identify when CONNECT tunnels time out due to active timeout. This makes tunnel timeouts visible in access logs via the crc (cache result code) field.
Problem:
Previously, tunnel timeouts were not distinguishable in logs - users could only see them in DEBUG logs.
Solution:
ERR_TUN_ACTIVE_TIMEOUT = 'T'to SquidLogCode enumtunnel_handler_ssl_producer()andtunnel_handler_ssl_consumer()onVC_EVENT_ACTIVE_TIMEOUTResult:
Access logs now show
crc=ERR_TUN_ACTIVE_TIMEOUTfor timed-out CONNECT tunnels.Testing:
Includes autotest
tunnel_active_timeout.test.pythat verifies the squid code is logged correctly.