aboutsummaryrefslogtreecommitdiff
path: root/src/stream/ngx_stream_core_module.c
Commit message (Collapse)AuthorAge
* Stream: allow servers with no handler.Roman Arutyunyan2024-06-27
| | | | | | | | Previously handlers were mandatory. However they are not always needed. For example, a server configured with ssl_reject_handshake does not need a handler. Such servers required a fake handler to pass the check. Now handler absence check is moved to runtime. If handler is missing, the connection is closed with 500 code.
* Stream: moved fastopen compatibility check.Roman Arutyunyan2024-01-18
| | | | The move makes the code look similar to the corresponding code in http module.
* Stream: the "setfib" parameter of the "listen" directive.Sergey Kandaurov2024-03-22
| | | | The FreeBSD SO_SETFIB support.
* Stream: the "accept_filter" parameter of the "listen" directive.Sergey Kandaurov2024-03-22
| | | | The FreeBSD accept filters support.
* Stream: the "deferred" parameter of the "listen" directive.Sergey Kandaurov2024-03-22
| | | | The Linux TCP_DEFER_ACCEPT support.
* Overhauled some diagnostic messages akin to 1b05b9bbcebf.Sergey Kandaurov2024-03-22
|
* Stream: virtual servers.Roman Arutyunyan2023-12-14
| | | | | | | | | Server name is taken either from ngx_stream_ssl_module or ngx_stream_ssl_preread_module. The change adds "default_server" parameter to the "listen" directive, as well as the following directives: "server_names_hash_max_size", "server_names_hash_bucket_size", "server_name" and "ssl_reject_handshake".
* Stream: socket peek in preread phase.Roman Arutyunyan2023-12-13
| | | | | | | | | | Previously, preread buffer was always read out from socket, which made it impossible to terminate SSL on the connection without introducing additional SSL BIOs. The following patches will rely on this. Now, when possible, recv(MSG_PEEK) is used instead, which keeps data in socket. It's called if SSL is not already terminated and if an egde-triggered event method is used. For epoll, EPOLLRDHUP support is also required.
* Fixed port ranges support in the listen directive.Valentin Bartenev2022-12-18
| | | | | | | | | Ports difference must be respected when checking addresses for duplicates, otherwise configurations like this are broken: listen 127.0.0.1:6000-6005 It was broken by 4cc2bfeff46c (nginx 1.23.3).
* Filtering duplicate addresses in listen (ticket #2400).Maxim Dounin2022-11-23
| | | | | | | | | | | | Due to the glibc bug[1], getaddrinfo("localhost") with AI_ADDRCONFIG on a typical host with glibc and without IPv6 returns two 127.0.0.1 addresses, and therefore "listen localhost:80;" used to result in "duplicate ... address and port pair" after 4f9b72a229c1. Fix is to explicitly filter out duplicate addresses returned during resolution of a name. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=14969
* Stream: the "fastopen" parameter of the "listen" directive.Ruslan Ermilov2021-05-20
| | | | Based on a patch by Anbang Wen.
* Multiple addresses in "listen".Roman Arutyunyan2019-03-15
| | | | | | Previously only one address was used by the listen directive handler even if host name resolved to multiple addresses. Now a separate listening socket is created for each address.
* Stream: avoid potential infinite loop at preread phase.Roman Arutyunyan2018-08-29
| | | | | | | | Previously the preread phase code ignored NGX_AGAIN value returned from c->recv() and relied only on c->read->ready. But this flag is not reliable and should only be checked for optimization purposes. For example, when using SSL, c->read->ready may be set when no input is available. This can lead to calling preread handler infinitely in a loop.
* SSL: detect "listen ... ssl" without certificates (ticket #178).Maxim Dounin2018-04-24
| | | | | | | | | In mail and stream modules, no certificate provided is a fatal condition, much like with the "ssl" and "starttls" directives. In http, "listen ... ssl" can be used in a non-default server without certificates as long as there is a certificate in the default one, so missing certificate is only fatal for default servers.
* Introduced ngx_tcp_nodelay().Ruslan Ermilov2017-05-26
|
* Stream: configurable socket buffer sizes.Vladimir Homutov2017-04-03
| | | | | The "rcvbuf" and "sndbuf" parameters are now supported by the "listen" directive.
* Modules compatibility: removed unneeded IPV6_V6ONLY checks.Maxim Dounin2016-10-03
| | | | | | | | | | The IPV6_V6ONLY macro is now checked only while parsing appropriate flag and when using the macro. The ipv6only field in listen structures is always initialized to 1, even if not supported on a given platform. This is expected to prevent a module compiled without IPV6_V6ONLY from accidentally creating dual sockets if loaded into main binary with proper IPV6_V6ONLY support.
* Stream: preread phase.Vladimir Homutov2016-09-15
| | | | | | | | | | | | In this phase, head of a stream is read and analysed before proceeding to the content phase. Amount of data read is controlled by the module implementing the phase, but not more than defined by the "preread_buffer_size" directive. The time spent on processing preread is controlled by the "preread_timeout" directive. The typical preread phase module will parse the beginning of a stream and set variable that may be used by the content phase, for example to make routing decision.
* Stream: phases.Roman Arutyunyan2016-09-15
|
* Stream: increase default value for proxy_protocol_timeout to 30s.Dmitry Volyntsev2016-09-08
|
* Stream: the "proxy_protocol" parameter of the "listen" directive.Dmitry Volyntsev2016-09-06
|
* Ensure "listen" exists in a mail or stream server (ticket #1049).Roman Arutyunyan2016-08-17
|
* Stream: resolver.Vladimir Homutov2016-07-07
|
* Stream: variables and script.Vladimir Homutov2016-07-04
| | | | This is a port of corresponding http code with unrelated features excluded.
* Stream: added preconfiguration step.Vladimir Homutov2016-06-15
|
* Renamed "u" to "sockaddr" in listen options types.Maxim Dounin2016-05-23
|
* Introduced the ngx_sockaddr_t type.Ruslan Ermilov2016-05-23
| | | | It's properly aligned and can hold any supported sockaddr.
* Stream: fixed duplicate listen address detection.Ruslan Ermilov2016-05-23
| | | | | | | The 6f8254ae61b8 change inadvertently fixed the duplicate port detection similar to how it was fixed for mail in b2920b517490. It also revealed another issue: the socket type (tcp vs. udp) wasn't taken into account.
* Use ngx_cmp_sockaddr() where appropriate.Ruslan Ermilov2016-05-20
|
* Stream: UDP proxy.Roman Arutyunyan2016-01-20
|
* Dynamic modules: changed ngx_modules to cycle->modules.Maxim Dounin2016-02-04
|
* Win32: MSVC 2015 compatibility.Maxim Dounin2015-08-17
| | | | | | | Resolved warnings about declarations that hide previous local declarations. Warnings about WSASocketA() being deprecated resolved by explicit use of WSASocketW() instead of WSASocket(). When compiling without IPv6 support, WinSock deprecated warnings are disabled to allow use of gethostbyname().
* Stream: the "tcp_nodelay" directive.Vladimir Homutov2015-08-10
|
* Stream: added postconfiguration method to stream modules.Vladimir Homutov2015-06-09
|
* Stream: listen backlog=.Ruslan Ermilov2015-06-08
|
* Stream: embed ngx_stream_listen_t into ngx_stream_conf_addr_t.Ruslan Ermilov2015-06-08
|
* The "reuseport" option of the "listen" directive.Maxim Dounin2015-05-20
| | | | | | | | | | | | | | | When configured, an individual listen socket on a given address is created for each worker process. This allows to reduce in-kernel lock contention on configurations with high accept rates, resulting in better performance. As of now it works on Linux and DragonFly BSD. Note that on Linux incoming connection requests are currently tied up to a specific listen socket, and if some sockets are closed, connection requests will be reset, see https://lwn.net/Articles/542629/. With nginx, this may happen if the number of worker processes is reduced. There is no such problem on DragonFly BSD. Based on previous work by Sepherosa Ziehau and Yingqi Lu.
* Stream: port from NGINX+.Ruslan Ermilov2015-04-20