tcp_stream

A simple tcp stream server. Map local tcp port to remote tcp port.

The following common keys are supported:

listen

optional, type: tcp listen

Set the listen config for this server.

The instance count setting will be ignored if listen_in_worker is correctly enabled.

default: not set

Added in version 1.7.20: change listen config to be optional

upstream

required, type: upstream str | seq

Set the remote address(es) and port. The port field is always required.

For seq value, each of its element must be weighted upstream addr.

alias: proxy_pass

upstream_pick_policy

optional, type: selective pick policy

Set the policy to select upstream address.

The key for ketama/rendezvous/jump hash is <client-ip><server-ip>.

default: random

tls_client

optional, type: bool | openssl tls client config

Set if we should do tls handshake with upstream.

default: disabled

upstream_tls_name

optional, type: tls name

Set an explicit tls server name to do upstream tls certificate verification.

If not set, the host of upstream address will be used.

default: not set