MINOR: cfgparse: rename "rev@" prefix to "rhttp@"

'rev@' was used to specify a bind/server used with reverse HTTP
transport. This notation was deemed not explicit enough. Rename it
'rhttp@' instead.
This commit is contained in:
Amaury Denoyelle 2023-10-20 11:34:46 +02:00
parent 9d4c7c1151
commit e05edf71df
7 changed files with 13 additions and 12 deletions

View File

@ -4977,10 +4977,11 @@ bind /<path> [, ...] [param*]
- 'quic6@' -> address is resolved as IPv6 and protocol UDP
is used. The performance note for QUIC over IPv4 applies
as well.
- 'rev@' -> used for reverse HTTP. Address must be a server
with the format '<backend>/<server>'. The server will be
used to instantiate connections to a remote address. The
listener will try to maintain 'maxconn' connections.
- 'rhttp@' -> used for reverse HTTP. Address must be a
server with the format '<backend>/<server>'. The server
will be used to instantiate connections to a remote
address. The listener will try to maintain 'maxconn'
connections.
You may want to reference some environment variables in the
address parameter, see section 2.3 about environment
@ -11534,7 +11535,7 @@ server <name> <address>[:[port]] [param*]
one of them over the FD. The bind part will use the
received socket as the client FD. Should be used
carefully.
- 'rev@' -> custom address family for a passive server in
- 'rhttp@' -> custom address family for a passive server in
HTTP reverse context.
You may want to reference some environment variables in the
address parameter, see section 2.3 about environment

View File

@ -208,7 +208,7 @@ struct bind_conf {
char *arg; /* argument passed to "bind" for better error reporting */
char *file; /* file where the section appears */
int line; /* line where the section appears */
char *reverse_srvname; /* name of server when using "rev@" address */
char *reverse_srvname; /* name of server when using "rhttp@" address */
int reverse_nbconn; /* count of connections to initiate in parallel */
__decl_thread(HA_RWLOCK_T sni_lock); /* lock the SNI trees during add/del operations */
struct thread_set thread_set; /* entire set of the allowed threads (0=no restriction) */

View File

@ -21,7 +21,7 @@ frontend pub
use_backend be-reverse
backend be-reverse
server dev rev@
server dev rhttp@
frontend priv
bind "fd@${priv}" proto h2
@ -37,7 +37,7 @@ defaults
mode http
frontend fe
bind "rev@be-pre-connect/srv" maxconn 1
bind "rhttp@be-pre-connect/srv" maxconn 1
use_backend be
backend be-pre-connect

View File

@ -18,7 +18,7 @@ frontend pub
use_backend be-reverse
backend be-reverse
server dev rev@
server dev rhttp@
frontend priv
bind "fd@${priv}" proto h2

View File

@ -19,7 +19,7 @@ frontend pub
use_backend be-reverse
backend be-reverse
server dev rev@ ssl sni hdr(x-name) verify none
server dev rhttp@ ssl sni hdr(x-name) verify none
frontend priv
bind "fd@${priv}" ssl crt ${testdir}/common.pem verify required ca-verify-file ${testdir}/ca-auth.crt alpn h2

View File

@ -174,7 +174,7 @@ int str2listener(char *str, struct proxy *curproxy, struct bind_conf *bind_conf,
goto fail;
}
bind_conf->reverse_srvname = strdup(str + strlen("rev@"));
bind_conf->reverse_srvname = strdup(str + strlen("rhttp@"));
if (!bind_conf->reverse_srvname) {
memprintf(err, "Cannot allocate reverse HTTP bind.\n");
goto fail;

View File

@ -1101,7 +1101,7 @@ struct sockaddr_storage *str2sa_range(const char *str, int *port, int *low, int
str2 += 9;
ss.ss_family = AF_CUST_SOCKPAIR;
}
else if (strncmp(str2, "rev@", 3) == 0) {
else if (strncmp(str2, "rhttp@", 3) == 0) {
str2 += 4;
ss.ss_family = AF_CUST_REV_SRV;
}