nginx / nginx/nginx

ngx_stream_pass_module: add an option to allow keeping the incoming stream server_port

Open
#686 3 comments 0 reactions 2 assignees View on GitHub

@VadimZhestikov is already working on this.

Since Aug 20, 2026.

feature stale
Dominant language
C
Stars
31.7k
Forks
8.3k
Avg merge
1d 12h
Merged PRs (30d)
13

Description

Describe the feature you'd like to add to nginx

With ngx_stream_pass_module, one can pass a connection directly from stream to a http server. For now, the passed connection into http context will see the http server_port instead of the real incoming stream server_port.

When a HTTP request can come from both the http server and stream server, one may want see the incoming stream server_port, so one can tell where the request is coming from.

Describe the problem this feature solves

For now there is no such option. Connections' local_addr is forced to set to the http server listening address.

Additional context

A simple boolean option can be added to pass directive.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.