Skip to content

Harden server network exposure defaults#80

Merged
AlexJuca merged 1 commit into
mainfrom
codex/harden-network-exposure-limits
Apr 27, 2026
Merged

Harden server network exposure defaults#80
AlexJuca merged 1 commit into
mainfrom
codex/harden-network-exposure-limits

Conversation

@AlexJuca
Copy link
Copy Markdown
Owner

@AlexJuca AlexJuca commented Apr 27, 2026

This PR is part of #77 and does the following:

  • bind the TCP server to 127.0.0.1 by default and add an explicit bind server config option
  • add max-clients with a conservative default of 128 and use it for the listen backlog
  • reject accepted sockets over capacity before allocating client state or queuing reads in kqueue, epoll, and io_uring paths
  • replace permissive atoi parsing for server port, event-loop max events, and max-clients with bounded decimal parsing
  • add config and server-limit unit tests

Notes

This PR intentionally does not close #77 because idle/slow-client cleanup remains as a follow-up slice.

@AlexJuca AlexJuca self-assigned this Apr 27, 2026
@AlexJuca AlexJuca added the enhancement New feature or request label Apr 27, 2026
@AlexJuca AlexJuca merged commit 207c12b into main Apr 27, 2026
5 checks passed
@AlexJuca AlexJuca deleted the codex/harden-network-exposure-limits branch April 27, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Harden default network exposure and connection/request limits

1 participant