.. _configuration_server: ****** Server ****** Servers are the inbound side of ``vey-proxy``. They accept client traffic, perform protocol-specific frontend work, and hand the request to an escaper. Each server configuration item is a map with two required keys: * :ref:`name `, which defines the server name * :ref:`type `, which selects the concrete server type and therefore determines how the remaining keys are interpreted The pages below cover frontend listeners, protocol proxies, and local chaining ports. Servers ======= .. toctree:: :maxdepth: 1 dummy_close tcp_stream udp_stream udp_tproxy tcp_tproxy tls_stream http_proxy socks_proxy http_rproxy sni_proxy plain_tcp_port plain_tls_port usual_tls_port plain_quic_port intelli_proxy Common Keys =========== These keys are shared by many server types and cover the common frontend behavior. .. _conf_server_common_name: name ---- **required**, **type**: :external+values:ref:`metric node name ` The server name. .. _conf_server_common_type: type ---- **required**, **type**: str The server type. .. _conf_server_common_escaper: escaper ------- **required**, **type**: :external+values:ref:`metric node name ` The escaper used by this server. If the referenced escaper does not exist in the configuration, a default ``DummyDeny`` escaper is used. .. _conf_server_common_auditor: auditor ------- **optional**, **type**: :external+values:ref:`metric node name ` The auditor used by this server. If the referenced auditor does not exist in the configuration, a default auditor is used. .. _conf_server_common_user_group: user_group ---------- **optional**, **type**: :external+values:ref:`metric node name ` The user group used for authentication and authorization. If the referenced user group does not exist in the configuration, a default empty user group is used. **default**: no auth enabled .. _conf_server_common_shared_logger: shared_logger ------------- **optional**, **type**: ascii Makes this server use a logger that runs on a shared thread. **default**: not set .. _conf_server_common_listen_in_worker: listen_in_worker ---------------- **optional**, **type**: bool Controls whether this server listens in every worker runtime when workers are enabled. The number of listener instances then matches the worker count. **default**: false .. _conf_server_common_tls_server: tls_server ---------- **optional**, **type**: :external+values:ref:`rustls server config ` Enables TLS on the listening socket and configures the TLS parameters. **default**: disabled .. _conf_server_common_tls_ticketer: tls_ticketer ------------ **optional**, **type**: :external+values:ref:`tls ticketer ` Configures a remote rolling TLS ticketer. **default**: not set .. versionadded:: 1.9.9 .. _conf_server_common_ingress_network_filter: ingress_network_filter ---------------------- **optional**, **type**: :external+values:ref:`ingress network acl rule ` Ingress network filter for client addresses. The address used here is always the interpreted client address. For directly listening servers, that is the raw socket peer address. For servers behind a PROXY Protocol-aware front end, that is the address carried in the PROXY Protocol message. **default**: not set .. _conf_server_common_dst_host_filter_set: dst_host_filter_set ------------------- **optional**, **type**: :external+values:ref:`dst host acl rule set ` Destination-host filter for each request. .. note:: This won't limit the Host header in http protocol. **default**: not set .. _conf_server_common_dst_port_filter: dst_port_filter --------------- **optional**, **type**: :external+values:ref:`exact port acl rule ` Destination-port filter for each request. **default**: not set .. _conf_server_common_tcp_sock_speed_limit: tcp_sock_speed_limit -------------------- **optional**, **type**: :external+values:ref:`tcp socket speed limit ` Per-TCP-socket speed limit. **default**: no limit tcp_conn_speed_limit -------------------- **deprecated** .. versionchanged:: 1.11.8 deprecated, use tcp_sock_speed_limit instead tcp_conn_limit -------------- **deprecated** .. versionchanged:: 1.11.8 deprecated, use tcp_sock_speed_limit instead conn_limit ---------- **deprecated** .. versionchanged:: 1.11.8 deprecated, use tcp_sock_speed_limit instead .. _conf_server_common_udp_sock_speed_limit: udp_sock_speed_limit -------------------- **optional**, **type**: :external+values:ref:`udp socket speed limit ` Per-UDP-socket speed limit. **default**: no limit udp_relay_speed_limit --------------------- **deprecated** .. versionchanged:: 1.11.8 deprecated, use udp_sock_speed_limit instead udp_relay_limit --------------------- **deprecated** .. versionchanged:: 1.11.8 deprecated, use udp_sock_speed_limit instead relay_limit ----------- **deprecated** .. versionchanged:: 1.11.8 deprecated, use udp_sock_speed_limit instead .. _conf_server_common_tcp_copy_buffer_size: tcp_copy_buffer_size -------------------- **optional**, **type**: :external+values:ref:`humanize usize ` Buffer size used for internal TCP copy operations. **default**: 16K, **minimal**: 4K .. _conf_server_common_tcp_copy_yield_size: tcp_copy_yield_size ------------------- **optional**, **type**: :external+values:ref:`humanize usize ` Set the yield out size for the internal copy task. **default**: 1M, **minimal**: 256K .. _conf_server_common_udp_relay_packet_size: udp_relay_packet_size --------------------- **optional**, **type**: :external+values:ref:`humanize usize ` Set the udp packet size for udp relay. **default**: 4K, **maximum**: 16K .. _conf_server_common_udp_relay_yield_count: udp_relay_yield_count --------------------- **optional**, **type**: usize Set the yield out count of packets for the internal relay task. **default**: 1024, **maximum**: 256 .. versionadded:: 1.13.3 .. _conf_server_common_udp_relay_batch_count: udp_relay_batch_count --------------------- **optional**, **type**: usize Set the batch recvmsg / sendmsg packet count. **default**: 8 .. versionadded:: 1.13.3 .. _conf_server_common_udp_relay_underlying_buffer_size: udp_relay_underlying_buffer_size -------------------------------- **optional**, **type**: :external+values:ref:`humanize usize ` Set the underlying buffer size when we need to parsing UDP packets from a underlying layer. **default**: 16K, or at least 8 * :ref:`udp_relay_packet_size ` .. versionadded:: 1.13.5 .. _conf_server_common_tcp_misc_opts: tcp_misc_opts ------------- **optional**, **type**: :external+values:ref:`tcp misc sock opts ` Set misc tcp socket options on accepted tcp sockets. **default**: not set, nodelay is default enabled .. _conf_server_common_udp_misc_opts: udp_misc_opts ------------- **optional**, **type**: :external+values:ref:`udp misc sock opts ` Set misc udp socket options on created udp sockets. **default**: not set task_idle_check_duration ------------------------ **deprecated** .. versionchanged:: 1.11.3 change default value from 5min to 60s .. versionchanged:: 1.13.0 deprecated, use `task_idle_check_interval` instead .. _conf_server_common_task_idle_check_interval: task_idle_check_interval ------------------------ **optional**, **type**: :external+values:ref:`humanize duration ` Set the idle check duration for task. The value will be up bound to seconds. **default**: 60s, **max**: 30min, **min**: 2s .. versionadded:: 1.13.0 .. _conf_server_common_task_idle_max_count: task_idle_max_count ------------------- **optional**, **type**: usize The task will be closed if the idle check return IDLE the times as this value. .. note:: The value set at user side will overwrite this. **default**: 5 .. versionchanged:: 1.11.3 change default value from 1 to 5 .. _conf_server_common_flush_task_log_on_created: flush_task_log_on_created ------------------------- **optional**, **type**: bool Log when task get created. **default**: false .. versionadded:: 1.11.0 .. _conf_server_common_flush_task_log_on_connected: flush_task_log_on_connected --------------------------- **optional**, **type**: bool Log when upstream connected. **default**: false .. versionadded:: 1.11.0 .. _conf_server_common_task_log_flush_interval: task_log_flush_interval ----------------------- **optional**, **type**: :external+values:ref:`humanize duration ` Enable periodic task log and set the flush interval. .. note:: There will be no periodic task log if protocol inspection is enabled, as intercept and inspect logs will be available in this case. **default**: not set .. versionadded:: 1.11.0 .. _conf_server_common_extra_metrics_tags: extra_metrics_tags ------------------ **optional**, **type**: :external+values:ref:`static metrics tags ` Set extra metrics tags that should be added to server stats and user stats already with server tags added. **default**: not set