ngx_http_proxy_connect_module icon indicating copy to clipboard operation
ngx_http_proxy_connect_module copied to clipboard

Can somebody help me to confirm

Open scutkim opened this issue 4 years ago • 2 comments

In the code of function ngx_http_proxy_connect_tunnel() :

    if (downstream->read->active && !downstream->read->ready) {
        if (!from_upstream) {
            ngx_add_timer(downstream->read, clcf->client_body_timeout);------>"Why  use clcf->client_body_timeout but not clcf->read_timeout."

Is this a bug?

scutkim avatar Jan 19 '21 01:01 scutkim

I found the ngx_http_core_module only have send_timeout but no read_timeout option.

scutkim avatar Jan 19 '21 11:01 scutkim

Hi @scutkim

We know that tunnel proxying has two direction: upstream and downstream. For upstream, this module provides proxy_connect_{read|send|connect}_timeout to control timeout between nginx and upstream.

For downstream, this module does not provide some directives, it just reuses nginx original directive client_body_timeout. It's ok, because nginx does not run client-body-handling logic on proxy-tunnel connection. But we can provide a new directive for this module to control timeout for downstream, which is more elegant and not confusing.

Added this problem to TODO list: TODO: added directive to control downstream timeout.

chobits avatar Feb 05 '21 16:02 chobits

hi this issue has been fixed , and we use only one directive proxy_connect_data_timeout to control it. More details and version : see v0.04 or latest master

With this new updating , you will not need use send_timeout directive to control proxy_connect module.

chobits avatar Feb 03 '23 09:02 chobits