variables. The "init-addr" setting can be used to modify the way
IP addresses should be resolved upon startup.
+ Additionally, there is a special address notation defined for
+ servers which does not have any address assigned. Currently, only
+ '@reverse' is valid. This instantiates a server which can only be
+ used with reverse connect. This mode requires the proxy to be in
+ HTTP mode and the server to explicitly use HTTP/2, either through
+ 'proto' or 'alpn' keywords.
+
<port> is an optional port specification. If set, all connections will
be sent to this port. If unset, the same port the client
connected to will be used. The port may also be prefixed by a "+"
#define SRV_F_NON_STICK 0x0004 /* never add connections allocated to this server to a stick table */
#define SRV_F_USE_NS_FROM_PP 0x0008 /* use namespace associated with connection if present */
#define SRV_F_FORCED_ID 0x0010 /* server's ID was forced in the configuration */
+#define SRV_F_REVERSE 0x0020 /* reverse connect server which requires idle connection for transfers */
#define SRV_F_AGENTPORT 0x0040 /* this server has a agent port configured */
#define SRV_F_AGENTADDR 0x0080 /* this server has a agent addr configured */
#define SRV_F_COOKIESET 0x0100 /* this server has a cookie configured, so don't generate dynamic cookies */
if ((curproxy->mode != PR_MODE_HTTP) && (curproxy->options & PR_O_REUSE_MASK) != PR_O_REUSE_NEVR)
curproxy->options &= ~PR_O_REUSE_MASK;
+ if ((curproxy->mode != PR_MODE_HTTP) && newsrv->flags & SRV_F_REVERSE) {
+ ha_alert("%s '%s' : server %s uses reverse addressing which can only be used with HTTP mode.\n",
+ proxy_type_str(curproxy), curproxy->id, newsrv->id);
+ cfgerr++;
+ err_code |= ERR_FATAL | ERR_ALERT;
+ goto out;
+ }
+
newsrv = newsrv->next;
}
else
newsrv->tmpl_info.prefix = strdup(args[1]);
+ /* special address specifier */
+ if (args[*cur_arg][0] == '@') {
+ if (strcmp(args[*cur_arg], "@reverse") == 0) {
+ newsrv->flags |= SRV_F_REVERSE;
+ }
+ else {
+ ha_alert("unknown server address specifier '%s'\n",
+ args[*cur_arg]);
+ err_code |= ERR_ALERT | ERR_FATAL;
+ goto out;
+ }
+
+ (*cur_arg)++;
+ parse_flags &= ~SRV_PARSE_PARSE_ADDR;
+ }
+
/* several ways to check the port component :
* - IP => port=+0, relative (IPv4 only)
* - IP: => port=+0, relative