summaryrefslogtreecommitdiffhomepage
path: root/src/stream (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-03-31SSL: RSA_generate_key() is deprecated in OpenSSL 1.1.0.Maxim Dounin1-1/+1
OpenSSL removed support for all 40 and 56 bit ciphers.
2016-03-31Fixed logging.Sergey Kandaurov1-2/+2
2016-03-30Style.Ruslan Ermilov2-2/+2
2016-03-18Stream: additional logging for UDP.Vladimir Homutov2-5/+10
2016-03-23Stream: detect port absence in proxy_pass with IP literal.Roman Arutyunyan1-1/+1
This is a clone of http commit 26c127bab5ef.
2016-01-20Stream: UDP proxy.Roman Arutyunyan6-30/+159
2016-03-15Stream: post first read events from client and upstream.Roman Arutyunyan1-12/+10
The main proxy function ngx_stream_proxy_process() can terminate the stream session. The code, following it, should check its return code to make sure the session still exists. This happens in client and upstream initialization functions. Swapping ngx_stream_proxy_process() call with the code, that follows it, leaves the same problem vice versa. In future ngx_stream_proxy_process() will call ngx_stream_proxy_next_upstream() making it too complicated to know if stream session still exists after this call. Now ngx_stream_proxy_process() is called from posted event handlers in both places with no code following it. The posted event is automatically removed once session is terminated.
2016-02-11Stream: initialize variable right before using it.Roman Arutyunyan1-2/+2
2016-02-11Stream: removed useless typedef.Roman Arutyunyan1-3/+0
2016-02-04Dynamic modules: changed ngx_modules to cycle->modules.Maxim Dounin3-19/+19
2016-02-04Dynamic modules: moved module-related stuff to separate files.Maxim Dounin1-8/+1
2015-10-06Stream: delete proxy connection timer after SSL handshake.Ruslan Ermilov1-0/+4
The timer remained active and could drop active SSL connection.
2015-08-17Win32: MSVC 2015 compatibility.Maxim Dounin2-7/+6
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().
2015-08-13Stream: fixed potential error log buffer overrun.Vladimir Homutov1-1/+3
Found by Duan Jiong <djduanjiong@gmail.com>.
2015-08-12Style.Vladimir Homutov1-1/+1
2015-08-10Stream: the "tcp_nodelay" directive.Vladimir Homutov4-2/+52
2015-07-30Stream: deprecated proxy_downstream_buffer, proxy_upstream_buffer.Roman Arutyunyan1-0/+23
The directive proxy_buffer_size should be used instead.
2015-07-29Style.Roman Arutyunyan1-2/+1
2015-07-29Stream: added proxy_buffer_size to set the size of data buffers.Roman Arutyunyan1-23/+11
Both download and upload buffers now have the same size. The old directives proxy_downstream_buffer and proxy_upstream_buffer are removed.
2015-07-16Fixed strict aliasing warnings with old GCC versions.Ruslan Ermilov1-1/+1
2015-07-14Stream: renamed rate limiting directives.Roman Arutyunyan1-14/+14
The directive proxy_downstream_limit_rate is now called proxy_upload_rate. The directive proxy_upstream_limit_rate is now called proxy_download_rate.
2015-07-02Stream: fixed possible integer overflow in rate limiting.Valentin Bartenev1-1/+1
2015-07-02Stream: fixed MSVC compilation warning.Roman Arutyunyan1-1/+1
Thanks to itpp2012.
2015-06-25Stream: upstream "connected" flag.Roman Arutyunyan2-5/+7
Once upstream is connected, the upstream buffer is allocated. Previously, the proxy module used the buffer allocation status to check if upstream is connected. Now it's enough to check the flag.
2015-06-23Stream: upstream and downstream limit rates.Roman Arutyunyan2-15/+111
2015-06-23Stream: common handler for upstream and downstream.Roman Arutyunyan1-25/+18
2015-06-18Stream: avoid SSL_CTX_set_tmp_rsa_callback() call with LibreSSL.Piotr Sikora1-0/+2
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2015-06-16Upstream: fixed shared upstreams on win32.Ruslan Ermilov2-12/+32
2015-06-18Stream: connection limiting module.Vladimir Homutov3-0/+642
stream { limit_conn_zone $binary_remote_addr zone=perip:1m; limit_conn_log_level error; server { ... limit_conn perip 1; } }
2015-06-16Disabled duplicate http, mail, and stream blocks.Vladimir Homutov1-0/+4
Such configurations have very limited use, introduce various problems and are not officially supported.
2015-06-16Stream: client-side PROXY protocol.Roman Arutyunyan2-2/+119
The new directive "proxy_protocol" toggles sending out PROXY protocol header to upstream once connection is established.
2015-06-16Stream: the "proxy_bind" directive.Vladimir Homutov1-0/+57
2015-06-04Stream: access module.Vladimir Homutov3-12/+480
stream { server { ... allow 127.0.0.1; deny all; } }
2015-06-09Stream: added postconfiguration method to stream modules.Vladimir Homutov9-0/+30
2015-06-08Stream: listen backlog=.Ruslan Ermilov3-0/+17
2015-06-08Stream: embed ngx_stream_listen_t into ngx_stream_conf_addr_t.Ruslan Ermilov3-75/+49
2015-06-05Stream: fixed "reuseport" to actually work.Ruslan Ermilov2-0/+10
2015-05-25Disabled SSLv3 by default (ticket #653).Maxim Dounin2-4/+3
2015-05-20Upstream: report to error_log when max_fails is reached.Ruslan Ermilov1-0/+5
This can be useful to understand why "no live upstreams" happens, in particular.
2015-05-20The "reuseport" option of the "listen" directive.Maxim Dounin3-0/+19
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.
2015-05-20Simplified ngx_http_init_listening().Maxim Dounin1-7/+1
There is no need to set "i" to 0, as it's expected to be 0 assuming the bindings are properly sorted, and we already rely on this when explicitly set hport->naddrs to 1. Remaining conditional code is replaced with identical "hport->naddrs = i + 1". Identical modifications are done in the mail and stream modules, in the ngx_mail_optimize_servers() and ngx_stream_optimize_servers() functions, respectively. No functional changes.
2015-05-18Upstream hash: consistency across little/big endianness.Sergey Kandaurov1-4/+15
2015-04-25Core: the ngx_set_connection_log() macro.Vladimir Homutov3-12/+2
The http and stream versions of this macro were identical.
2015-04-22Stream: prevent repeated event notifications after eof.Roman Arutyunyan1-1/+4
When client or upstream connection is closed, level-triggered read event remained active until the end of the session leading to cpu hog. Now the flag NGX_CLOSE_EVENT is used to unschedule the event.
2015-04-22Upstream: allow multiple upstreams to use the same shared zone.Ruslan Ermilov1-42/+56
2015-04-21Upstream: simplified ip_hash and hash peer selection code.Ruslan Ermilov1-22/+8
Now that peers are stored as a list, the weighted and unweighted cases became nearly identical.
2015-04-20Stream: port from NGINX+.Ruslan Ermilov14-0/+5925