History log of /unit/src/nxt_router.c (Results 1 – 25 of 253)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 2208:26af8eadc943 29-Sep-2022 Andrew Clayton

Renamed a couple of members of nxt_unit_request_t.

This is a preparatory patch that renames the 'local' and 'local_length'
members of the nxt_unit_request_t structure to 'local_addr' and
'local_addr

Renamed a couple of members of nxt_unit_request_t.

This is a preparatory patch that renames the 'local' and 'local_length'
members of the nxt_unit_request_t structure to 'local_addr' and
'local_addr_length' in preparation for the adding of 'local_port' and
'local_port_length' members.

Suggested-by: Zhidao HONG <z.hong@f5.com>
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>

show more ...


Revision tags: 1.28.0-1, 1.28.0
# 2186:47d365005fab 29-Aug-2022 Zhidao HONG

Status: added requests count.


# 2185:2227bdbb3c89 29-Aug-2022 Valentin Bartenev

Implemented basic statistics API.


# 2165:556348458f34 14-Jul-2022 Zhidao HONG

Log: split access log from nxt_router.c.

No functional changes.


# 2147:7bf58b1b18c4 13-Jul-2022 Zhidao HONG

Var: dynamic variables support.

This commit adds the variables $arg_NAME, $header_NAME, and $cookie_NAME.


# 2133:46433e3cef45 20-Jun-2022 Zhidao HONG

Router: forwared header replacement.


# 2132:34d63ed988dc 20-Jun-2022 Zhidao HONG

Router: introduced nxt_http_forward_t.

This makes the replacement of forwarded request header
like client_ip and protocol more generic.
It's a prerequirement for protocol replacement.

No functional

Router: introduced nxt_http_forward_t.

This makes the replacement of forwarded request header
like client_ip and protocol more generic.
It's a prerequirement for protocol replacement.

No functional changes.

show more ...


# 2131:aea375f03b0b 20-Jun-2022 Zhidao HONG

Router: refactored nxt_router_conf_create().

No functional changes.


# 2126:8542c8141a13 07-Jun-2022 Max Romanov

Removing unused tracking fields and functions.

The message tracking is unused since 1d84b9e4b459 commit.

This fixes the issue found by Coverity (CID 376263).


# 2125:e89e7ff7a4eb 07-Jun-2022 Zhidao HONG

Router: removed unused code in nxt_router_conf_error().

No functional changes.


Revision tags: 1.27.0-1, 1.27.0
# 2077:624e51cfe97a 18-Dec-2021 Alejandro Colomar

Removed special cases for non-NXT_CONF_VALUE_ARRAY.

The previous commit added more generic APIs for handling
NXT_CONF_VALUE_ARRAY and non-NXT_CONF_VALUE_ARRAY together.
Modify calling code to remove

Removed special cases for non-NXT_CONF_VALUE_ARRAY.

The previous commit added more generic APIs for handling
NXT_CONF_VALUE_ARRAY and non-NXT_CONF_VALUE_ARRAY together.
Modify calling code to remove special cases for arrays and
non-arrays, taking special care that the path for non arrays is
logically equivalent to the previous special cased code.
Use the now-generic array code only.

show more ...


# 2050:d1298cc3f385 03-Dec-2021 Valentin Bartenev

Merged with the 1.26 branch.


Revision tags: 1.26.1-1, 1.26.1
# 2017:c1617684637c 25-Nov-2021 Max Romanov

Fixing access_log structure reference counting.

The reference to the access_log structure is stored in the current
nxt_router_conf_t and the global nxt_router_t. When the reference is copied,
the r

Fixing access_log structure reference counting.

The reference to the access_log structure is stored in the current
nxt_router_conf_t and the global nxt_router_t. When the reference is copied,
the reference counter should be adjusted accordingly.

This closes #593 issue on GitHub.

show more ...


# 2014:f8a0992944df 24-Nov-2021 Max Romanov

Sending shared port to application prototype.

Application process started with shared port (and queue) already configured.
But still waits for PORT_ACK message from router to start request processin

Sending shared port to application prototype.

Application process started with shared port (and queue) already configured.
But still waits for PORT_ACK message from router to start request processing
(so-called "ready state").

Waiting for router confirmation is necessary. Otherwise, the application may
produce response and send it to router before the router have the information
about the application process. This is a subject of further optimizations.

show more ...


Revision tags: 1.26.0-1, 1.26.0
# 1998:c8790d2a89bb 09-Nov-2021 Tiago Natel de Moura

Introducing application prototype processes.


# 1990:89f8eb0b5ccf 05-Nov-2021 Zhidao HONG

HTTP: removed surplus check for r->args is not NULL.


# 1980:43553aa72111 28-Oct-2021 Max Romanov

Moving request limit control to libunit.

Introducting application graceful stop. For now only used when application
process reach request limit value.

This closes #585 issue on GitHub.


# 1978:13e1e2651f08 28-Oct-2021 Max Romanov

Adding explicit app reference to nxt_router_app_port_release().

port->app field is not thread safe and should be used in main thread only.
To release port after request processing, application refer

Adding explicit app reference to nxt_router_app_port_release().

port->app field is not thread safe and should be used in main thread only.
To release port after request processing, application reference should be
obtained from corresponding request descriptor.

show more ...


Revision tags: 1.25.0-1, 1.25.0
# 1942:296628096d6c 17-Aug-2021 Andrey Suvorov

Added TLS session tickets support.


# 1940:29c2c9d80c5b 12-Aug-2021 Zhidao HONG

Introduced the generic API nxt_buf_dummy_completion().

No functional changes.


# 1936:953434450ea9 12-Aug-2021 Oisin Canty

Router: client IP address replacement.

This commit introduces the replacement of the client address based on the value
of a specified HTTP header. This is intended for use when Unit is placed
behin

Router: client IP address replacement.

This commit introduces the replacement of the client address based on the value
of a specified HTTP header. This is intended for use when Unit is placed
behind a reverse proxy like nginx or a CDN.

You must specify the source addresses of the trusted proxies. This can be
accomplished with any valid IP pattern supported by Unit's match block:

["10.0.0.1", "10.4.0.0/16", "!192.168.1.1"]

The feature is configured per listener.

The client address replacement functionality only operates when there is a
source IP match and the specified header is present. Typically this would be
an 'X-Forwarded-For' header.

{
"listeners": {
"127.0.0.1:8080": {
"client_ip": {
"header": "X-Forwarded-For",
"source": [
"10.0.0.0/8"
]
},
"pass": "applications/my_app"
},
}
}

If a request occurs and Unit receives a header like below:

"X-Forwarded-For: 84.123.23.23"

By default, Unit trusts the last rightmost IP in the header, so REMOTE_ADDR
will be set to 84.123.23.23 if the connection originated from 10.0.0.0/8.

If Unit runs behind consecutive reverse proxies and receives a header similar
to the following:

"X-Forwarded-For: 84.123.23.23, 10.0.0.254"

You will need to enable "recursive" checking, which walks the header from
last address to first and chooses the first non-trusted address it finds.

{
"listeners": {
"127.0.0.1:8080": {
"client_ip": {
"header": "X-Forwarded-For",
"source": [
"10.0.0.0/8"
]
"recursive": true,
},
"pass": "applications/my_app"
},
}
}

If a connection from 10.0.0.0/8 occurs, the chain is walked. Here, 10.0.0.254
is also a trusted address so the client address will be replaced with
84.123.23.23.

If all IP addresses in the header are trusted, the client address is set to
the first address in the header:

If 10.0.0.0/8 is trusted and "X-Forwarded-For: 10.0.0.3, 10.0.0.2, 10.0.0.1",
the client address will be replaced with 10.0.0.3.

show more ...


# 1926:6e85d6c0b8bb 29-Jul-2021 Max Romanov

Application restart introduced.

When processing a restart request, the router sends a QUIT message to all
existing processes of the application. Then, a new shared application port is
created to en

Application restart introduced.

When processing a restart request, the router sends a QUIT message to all
existing processes of the application. Then, a new shared application port is
created to ensure that new requests won't be handled by the old processes of
the application.

show more ...


# 1925:b8a2ac618950 24-Jul-2021 Zhidao HONG

Router: split nxt_http_app_conf_t from nxt_http_action_t.

No functional changes.


# 1923:9f268a8a1a2f 23-Jul-2021 Zhidao HONG

Router: split nxt_http_static_conf_t from nxt_http_action_t.

No functional changes.


# 1920:7c19530e2502 21-Jul-2021 Andrey Suvorov

Enabling configure TLS sessions.

To support TLS sessions, Unit uses the OpenSSL built-in session cache; the
cache_size option defines the number sessions to store. To disable the feather,
the optio

Enabling configure TLS sessions.

To support TLS sessions, Unit uses the OpenSSL built-in session cache; the
cache_size option defines the number sessions to store. To disable the feather,
the option must be zero.

show more ...


1234567891011