mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-11159 Server proxy protocol support
accept proxy protocol header from client connections. The new server variable 'proxy_protocol_networks' contains list of networks from which proxy header is accepted.
This commit is contained in:
15
sql/proxy_protocol.h
Normal file
15
sql/proxy_protocol.h
Normal file
@ -0,0 +1,15 @@
|
||||
#include "my_net.h"
|
||||
|
||||
struct proxy_peer_info
|
||||
{
|
||||
struct sockaddr_storage peer_addr;
|
||||
int port;
|
||||
bool is_local_command;
|
||||
};
|
||||
|
||||
extern bool has_proxy_protocol_header(NET *net);
|
||||
extern int parse_proxy_protocol_header(NET *net, proxy_peer_info *peer_info);
|
||||
extern bool is_proxy_protocol_allowed(const sockaddr *remote_addr);
|
||||
|
||||
extern int set_proxy_protocol_networks(const char *spec);
|
||||
extern void cleanup_proxy_protocol_networks();
|
Reference in New Issue
Block a user