add support for proxyprotocol v1 on backend server side

This commit is contained in:
Yves Rutschle committed 2025-03-09 18:49:17 +01:00
1 parent 951b708f61
commit 24c3bb07a0
11 files changed
+172 -8

No files matched your search

+23 -2
View File
@@ -1,5 +1,5 @@
/* Generated by conf2struct (https://www.rutschle.net/tech/conf2struct/README)
* on Sun Dec 22 22:40:51 2024.
* on Mon Feb 24 18:37:24 2025.
# conf2struct: generate libconf parsers that read to structs
# Copyright (C) 2018-2024 Yves Rutschle
@@ -500,7 +500,7 @@ struct arg_file* sslhcfg_conffile;
struct arg_str* sslhcfg_anyprot;
struct arg_end* sslhcfg_end;
static struct config_desc table_sslhcfg_protocols[] = {
@@ -775,6 +775,22 @@ static struct config_desc table_sslhcfg_protocols[] = {
/* optional */ 1,
/* default_val*/ .default_val.def_int = 0
},
{
/* name */ "proxyprotocol",
/* type */ CFG_INT,
/* sub_group*/ NULL,
/* arg_cl */ NULL,
/* base_addr */ NULL,
/* offset */ offsetof(struct sslhcfg_protocols_item, proxyprotocol),
/* offset_len */ 0,
/* offset_present */ offsetof(struct sslhcfg_protocols_item, proxyprotocol_is_present),
/* size */ sizeof(int),
/* array_type */ -1,
/* mandatory */ 0,
/* optional */ 1,
/* default_val*/ .default_val.def_int = 0
},
{ 0 }
};
@@ -2427,6 +2443,11 @@ static void sslhcfg_protocols_fprint(
if (! sslhcfg_protocols->minlength_is_present)
fprintf(out, " <unset>");
fprintf(out, "\n");
indent(out, depth);
fprintf(out, "proxyprotocol: %d", sslhcfg_protocols->proxyprotocol);
if (! sslhcfg_protocols->proxyprotocol_is_present)
fprintf(out, " <unset>");
fprintf(out, "\n");
}
static void sslhcfg_listen_fprint(