You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only raw request sockets are supported, for obvious reasons. The `raw` argument value
307
-
is ignored and the raw request socket is always returned. Unlike `ngx_http_lua_module`,
323
+
is ignored and the raw request socket is always returned. Unlike ngx_http_lua,
308
324
you can still call output API functions like `ngx.say`, `ngx.print`, and `ngx.flush`
309
325
after acquiring the raw request socket via this function.
310
326
@@ -316,6 +332,8 @@ packets back to the client using the downstream socket.
316
332
317
333
The raw TCP sockets returned by this module will contain the following extra method:
318
334
335
+
[Back to TOC](#directives)
336
+
319
337
tcpsock:shutdown
320
338
----------------
321
339
@@ -494,9 +512,7 @@ TODO
494
512
====
495
513
496
514
* Add new directives `access_by_lua_block` and `access_by_lua_file`.
497
-
* Add `ngx.semaphore` API.
498
-
* Add support for [lua-resty-core](https://github.com/openresty/lua-resty-core).
499
-
* Add `lua_postpone_output` to emulate the [postpone_output](http://nginx.org/r/postpone_output) directive.
515
+
* Add `lua_postpone_output` to emulate the [postpone_output](https://nginx.org/r/postpone_output) directive.
500
516
501
517
[Back to TOC](#table-of-contents)
502
518
@@ -509,34 +525,45 @@ The latest version of this module is compatible with the following versions of N
509
525
* 1.15.x (last tested: 1.15.8)
510
526
* 1.13.x (last tested: 1.13.6)
511
527
512
-
Nginx cores older than 1.13.6 (exclusive) are *not* tested and may or may not work. Use at your own risk!
528
+
Nginx cores older than 1.13.6 (exclusive) are *not* tested and may or may not
529
+
work. Use at your own risk!
513
530
514
531
[Back to TOC](#table-of-contents)
515
532
516
533
Installation
517
534
============
518
535
519
-
This module can be manually compiled into Nginx or OpenResty:
536
+
It is *highly* recommended to use [OpenResty releases](https://openresty.org)
537
+
which bundle Nginx, ngx_http_lua, ngx_stream_lua, (this module), LuaJIT, as
538
+
well as other powerful companion Nginx modules and Lua libraries.
520
539
521
-
1. Install LuaJIT 2.1 or Lua 5.1 (Lua 5.2+ are *not* supported yet). LuaJIT can be downloaded from the [the LuaJIT project website](http://luajit.org/download.html) and Lua 5.1, from the [Lua project website](http://www.lua.org/). Some distribution package managers also distribute LuaJIT and/or Lua.
522
-
1. Download the latest version of ngx_stream_lua [HERE](https://github.com/openresty/stream-lua-nginx-module/tags).
523
-
1. Download the latest supported version of NGINX [HERE](http://nginx.org/) (See [Nginx Compatibility](#nginx-compatibility)) or the OpenResty bundle from [HERE](https://openresty.org/).
540
+
It is discouraged to build this module with Nginx yourself since it is tricky
541
+
to set up exactly right.
524
542
525
-
Build the source of NGINX or OpenResty with this module, like below:
543
+
Note that Nginx, LuaJIT, and OpenSSL official releases have various limitations
544
+
and long standing bugs that can cause some of this module's features to be
545
+
disabled, not work properly, or run slower. Official OpenResty releases are
546
+
recommended because they bundle [OpenResty's optimized LuaJIT 2.1 fork](https://github.com/openresty/luajit2) and
Alternatively, ngx_stream_lua can be manually compiled into Nginx:
551
+
552
+
1. LuaJIT can be downloaded from the [latest release of OpenResty's LuaJIT fork](https://github.com/openresty/luajit2/releases). The official LuaJIT 2.x releases are also supported, although performance will be significantly lower for reasons elaborated above
553
+
1. Download the latest version of ngx_stream_lua [HERE](https://github.com/openresty/stream-lua-nginx-module/tags)
554
+
1. Download the latest supported version of Nginx [HERE](https://nginx.org/) (See [Nginx Compatibility](#nginx-compatibility))
0 commit comments