diff options
author | Roman Arutyunyan <arut@nginx.com> | 2014-03-17 17:41:24 +0400 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2014-03-17 17:41:24 +0400 |
commit | 0b5f3297849c6061cf07b359e8b42768889e28cd (patch) | |
tree | 5ae00cb3fd666a763e76baef6598a2edc577734e /src/core/ngx_proxy_protocol.h | |
parent | 2f917b6d0636bd62ab0dfce0cad28148b0e9b002 (diff) |
Added server-side support for PROXY protocol v1 (ticket #355).
Client address specified in the PROXY protocol header is now
saved in the $proxy_protocol_addr variable and can be used in
the realip module.
This is currently not implemented for mail.
Diffstat (limited to 'src/core/ngx_proxy_protocol.h')
-rw-r--r-- | src/core/ngx_proxy_protocol.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/core/ngx_proxy_protocol.h b/src/core/ngx_proxy_protocol.h new file mode 100644 index 000000000..4f3912512 --- /dev/null +++ b/src/core/ngx_proxy_protocol.h @@ -0,0 +1,23 @@ + +/* + * Copyright (C) Roman Arutyunyan + * Copyright (C) Nginx, Inc. + */ + + +#ifndef _NGX_PROXY_PROTOCOL_H_INCLUDED_ +#define _NGX_PROXY_PROTOCOL_H_INCLUDED_ + + +#include <ngx_config.h> +#include <ngx_core.h> + + +#define NGX_PROXY_PROTOCOL_MAX_HEADER 107 + + +u_char *ngx_proxy_protocol_parse(ngx_connection_t *c, u_char *buf, + u_char *last); + + +#endif /* _NGX_PROXY_PROTOCOL_H_INCLUDED_ */ |