Support HAProxy proxy v1 protocol

Added:
-H option - expect HAProxy proxy v1 header, e.g. `proxy -H`

parent ha type - send HAProxy proxy v1 header (must be last in redirection), e.g.

allow *
parent 1000 ha
parent 1000 proxy 1.2.3.4 3128
socks
This commit is contained in:
Vladimir Dubrovin committed 2026-04-08 19:21:25 +03:00
1 parent e373d84717
commit 7e7a0d4336
5 files changed
+111 -55

No files matched your search

+14 -2
View File
@@ -266,7 +266,7 @@ struct passwords {
};
typedef enum {
R_TCP,
R_TCP = 1,
R_CONNECT,
R_SOCKS4,
R_SOCKS5,
@@ -281,9 +281,20 @@ typedef enum {
R_SOCKS5B,
R_ADMIN,
R_EXTIP,
R_TLS
R_TLS,
R_HA,
R_DNS
} REDIRTYPE;
struct redirdesc {
REDIRTYPE redir;
char * name;
void * (*func)(struct clientparam *);
};
extern struct redirdesc redirs[];
struct chain {
struct chain * next;
int type;
@@ -490,6 +501,7 @@ struct srvparam {
int clisockopts, srvsockopts, lissockopts, cbcsockopts, cbssockopts;
int gracetraf, gracenum, gracedelay;
int requirecert;
int haproxy;
#ifdef WITHSPLICE
int usesplice;
#endif