Skip to content

Add PROXY protocol support - #10

Merged
blaubaer merged 1 commit into
mainfrom
migrate/from-origin/pr259
Sep 2, 2026
Merged

Add PROXY protocol support#10
blaubaer merged 1 commit into
mainfrom
migrate/from-origin/pr259

Conversation

@blaubaer

@blaubaer blaubaer commented Sep 2, 2026

Copy link
Copy Markdown
Member

Reimplements gliderlabs/ssh#259 by @donovanhubbard for the current server lifecycle and configuration model.

Summary

  • add optional PROXY protocol v1/v2 support using github.com/pires/go-proxyproto
  • enable it through a single nullable Server.ProxyProtocol configuration field
  • expose connection policy, header validation, read timeout, and buffer sizing
  • apply processing consistently to both Serve and HandleConn before ConnCallback
  • propagate proxied local and remote addresses to callbacks, contexts, and sessions
  • add a standalone example and compile it in CI
  • cover trust policies, validation failures, deadlines, shutdown, and configuration snapshots

Testing

  • go test -count=1 ./...
  • go test -race -count=1 ./...
  • PROXY protocol tests with 20 normal repetitions
  • go vet ./...
  • golangci-lint run --color=never
  • go test -mod=readonly ./... for all standalone example modules
  • Linux, Windows, and Darwin amd64 cross-builds
  • go mod tidy -diff and git diff --check

@blaubaer
blaubaer merged commit 3d524f0 into main Sep 2, 2026
19 checks passed
@blaubaer
blaubaer deleted the migrate/from-origin/pr259 branch September 2, 2026 14:56
@blaubaer blaubaer self-assigned this Sep 2, 2026
@blaubaer blaubaer added the enhancement New feature or request label Sep 2, 2026
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.

1 participant