commit 0b4c13b7b3b4bc8c081de630921a213b45b407ae
parent 6ec43d5f784b6a4dd801f5852245383f6b5ebfb8
Author: finwo <finwo@pm.me>
Date: Sat, 3 Jan 2026 19:37:20 +0100
2.45
Diffstat:
4 files changed, 61 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,7 @@
+2.45 [KK 2009-02-18]
+- Usage information formatted.
+- Rubberstamped "stable"!
+
2.44 [KK 2009-02-11]
- Reviewed code for "throw"s (edited for consistency).
- Bug in Webinterface::execute() (during accept()). Thanks Vladimir T.
diff --git a/Makefile b/Makefile
@@ -1,7 +1,7 @@
# Top-level Makefile for XR
# -------------------------
-VER = 2.44
+VER = 2.45
PREFIX = $(DESTDIR)/usr
BINDIR = $(PREFIX)/sbin
MANDIR = $(PREFIX)/share/man
diff --git a/test/restricted-webinterface.xml b/test/restricted-webinterface.xml
@@ -0,0 +1,50 @@
+<!-- This is an example of an XR configuration that limits the access
+ to the web interface to one address. -->
+
+<?xml version="1.0" encoding="UTF-8">
+
+<configuration>
+ <system>
+ <uselogger>false</uselogger>
+ <logdir>/tmp</logdir>
+ </system>
+
+ <service>
+ <!-- This is the main service that XR is responsible for.
+ The local web interface runs on port 11.001 but is accessible
+ only from localhost (127.0.0.1). The sample service runs on
+ port 11.000 and is accessible from wherever you like. -->
+ <name>web</name>
+ <server>
+ <type>tcp</type>
+ <address>0:11000</address>
+ <webinterface>127.0.0.1:11001</webinterface>
+ <verbose>yes</verbose>
+ </server>
+
+ <backend>
+ <address>server1:8000</address>
+ </backend>
+ </service>
+
+ <service>
+ <!-- Here's a forwarder that runs on port 11.002 and only accepts
+ traffic from IP address 10.50.45.189. The calls are
+ dispatched to localhost:11.001, so that this way, the web
+ interface is only accessible via:
+ a. port 11.001 from localhost, or
+ b. port 11.002 from 10.50.45.189 -->
+ <name>webinterface</name>
+ <server>
+ <type>tcp</type>
+ <address>0:11002</address>
+ <acl>
+ <allowfrom>10.50.45.189</allowfrom>
+ </acl>
+ </server>
+ <backend>
+ <address>localhost:11001</address>
+ </backend>
+ </service>
+
+</configuration>
diff --git a/xr/etc/usage.txt b/xr/etc/usage.txt
@@ -59,7 +59,7 @@ may not exist on your platform):
-f, --foreground
Suppresses forking/threading, only for debugging. Also suppresses
wakeups (-w), checkups (-c) and the webinterface (-W).
- -g, --backend-check METHOD
+ -g METHOD, --backend-check METHOD
Defines how back ends are checked. This flag must be specified
PRIOR to defining back ends with -b... The checker will then
apply to all next back ends. Alternatives are:
@@ -81,7 +81,7 @@ may not exist on your platform):
-H HDR, --add-server-header HDR
Inserts HDR into back end bound HTTP messages. The header value is
appended when a pre-existing header is present.
- -I HDR, --replace-host-header
+ -I HDR, --replace-host-header HDR
Inserts "Host: <backend>" into back end bound HTTP messages.
Pre-existing Host headers are overwritten. The value of <backend> is
the server name as in the setting of --backend (-b).
@@ -102,12 +102,12 @@ may not exist on your platform):
FILE is written with the PID of XR upon startup
-Q REQUESTS, --quit-after REQUESTS
Stops the balancer after REQUESTS hits. For debugging / loadtesting.
- -r, --soft-maxconnrate MAXCONS
+ -r MAXCONS, --soft-maxconnrate MAXCONS
Sets the "SOFT" maximum average number of connections per IP allowed
within a given time period (see -U, --time-interval). If a
particular IP exceeds this number, then their connection is
deferred (see -u, --defer-time). Default is 0 (disabled).
- -R, --hard-maxconnrate MAXCONS
+ -R MAXCONS, --hard-maxconnrate MAXCONS
Sets the "HARD" maximum average number of connections per IP allowed
within a given time period (see -U, --time-interval). If a
particular IP exceeds this number, then their connection is
@@ -128,11 +128,11 @@ may not exist on your platform):
-T SEC, --client-timeout SEC
Defines network timeouts for clients, default 30 sec. Use 0 to
prevent timing out.
- -u, --defer-time USEC
+ -u USEC, --defer-time USEC
If a connection is going to be deferred due to hitting the "soft" rate
(see --soft-maxconnrate), then this option sets how long the deferral
will last, in microseconds. Default is 500000 (0.5 seconds).
- -U, --time-interval SEC
+ -U SEC, --time-interval SEC
If either --soft-maxconnrate or --hard-maxconnrate is specified, this
option allows you to specify the time period to which those numbers of
connections apply. For example, "-r 200 -U 60" would trigger the "soft"