9951 explained code solutions for 126 technologies

nginxHow to proxy TCP traffic

stream {
  server {
    listen 1234;
}ctrl + c
stream {

stream block allows proxying TCP and UDP traffic (should be placed on the same level as http block)

server {

virtual server configuration block

listen 1234

listen to TCP traffic on localhost 1234 port


pass TCP traffic to the specified server

server host/port to proxy TCP traffic to