openresty / openresty/stream-lua-nginx-module

Changing upstream TCP packets on the fly

Open
#156 7 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
749
Forks
210
Avg merge
4h 31m
Merged PRs (30d)
3

Description

I am using OpenResty as a TCP (stream) proxy. I have been capable to read TCP packets using reqsock:peek and preread_by_lua_block directives.

However, would like to change certain bytes of the TCP packet as it flows though the proxy, so that the service behind gets a changed packet.

Is this possible to achieve with ngx_stream_lua_module and how?

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start with the mentioned reqsock:peek API and preread_by_lua_block directive in ngx_stream_lua_module, then determine whether the module exposes any supported way to modify upstream TCP data after it is read. The issue does not name files or tests, and completion criteria are limited to establishing whether this is possible and how.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, nginx
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.