Skip to content

Patch/smarter peek durations#343

Merged
GlenDC merged 2 commits intomainfrom
patch/smarter-peek-durations
Apr 27, 2026
Merged

Patch/smarter peek durations#343
GlenDC merged 2 commits intomainfrom
patch/smarter-peek-durations

Conversation

@GlenDC
Copy link
Copy Markdown
Collaborator

@GlenDC GlenDC commented Apr 25, 2026

For macos l4 proxy, an attempt in a small optimization. Don't think it will do much if anything at all,
but in some cases it might cause speedups for some background protocols.

Only peek http/tls with a slightly longer peek windows if it's a known std port for that protocol,
and otherwise use a shorter window.

Mostly just an experiment, don't think it will be a noticable change,
but never the less a good chance probably anyway. As I noticed some protocols in logs of Samuel
from background services (e.g. from apple) which are "server first" protocols,
meaning there would be nothing to peek for those... so at least those will have now only a very short window to peek.

Summary by Aikido

Security Issues: 0 Quality Issues: 0 Resolved Issues: 0

⚡ Enhancements

  • Introduced port-aware peek durations; added config, CLI, and tests.
  • Added helper functions is_known_http_port and is_known_tls_port for selecting longer peek windows.

More info

GlenDC added 2 commits April 25, 2026 14:58
can be used later also for other l4 proxies,
but for now only used in macos l4 proxy
@GlenDC GlenDC merged commit 40b42d7 into main Apr 27, 2026
35 checks passed
@GlenDC GlenDC deleted the patch/smarter-peek-durations branch April 27, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants