Repository navigation
Expand file tree
/
Copy pathNEWS
More file actions
2149 lines (1502 loc) · 67.5 KB
/
Copy pathNEWS
File metadata and controls
2149 lines (1502 loc) · 67.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Pound -- history of user-visible changes. 2026-09-22
See the end of file for copying conditions.
Pound is a continuation of the software originally developed by
Robert Segall at Apsis GmbH, which was officially discontinued
on 2022-09-19. See the README file for details.
Please send pound bug reports to <gray@gnu.org>
Version 4.23.97 (git)
* Changes in configuration syntax.
** Sizes
Arguments to the following keywords can be suffixed with usual size
suffixes "k", "m", and "g" or their upper-case equivalents:
ContentCapture
LineBufferSize
MaxURI
WorkerStackSize
** Durations
The following keywords take a duration value as their arguments. A
duration is a sequence of numbers, each of which is followed by a
time unit suffix, "s", "m", "h" or "d", standing for seconds, minutes,
hours, or days, correspondingly:
Alive
Client
ConnTO
Grace
OverrideTTL
RetryInterval
TTL (in the "Session" section)
TimeOut
WSTimeOut
WatcherTTL
WorkerIdleTimeout
** Synchronization lines
Synchronization lines in traditional formats are understood:
#line N
#line N "FILE"
# N
# N "FILE"
** Pragmatic comments
Comments that start with the word "pragma" are treated specially.
Such comments modify parsing of the configuration file. This version
introduces two pragmatic comments:
#pragma preprocessor COMMAND
Enables configuration file preprocessing. See below for
details.
#pragma tab-width N
Instructs pound to consider each TAB character to be equal to N
spaces. This is used when computing column offsets in
configuration file, for diagnostic and reporting.
* Cert and ACME statements take into account include directory
Arguments to Cert or ACME are taken relative to the current include
directory.
* Wildcards are allowed in Cert statement
The argument to the Cert directive in ListenHTTPS can contain glob(7)
patterns, e.g.:
Cert "ssl/*.pem"
* Placement of Cert directive within ListenHTTPS
In previous versions, the Cert directive was required to precede any
other SSL-specific statement (such as ClientCert, etc.) in the
ListenHTTPS section. This is no longer the case. The Cert directive
can be placed anywhere within ListenHTTPS, it will always be
processed first.
* The "Use" statement in Backend sections
The "Use" statement inherits settings from a named backend referred to
by its argument. The "Priority" and "Disables" directives can be used
together with it, e.g.:
Service
Backend
Use "nb"
Priority 3
End
End
* HTTPS statement in Backend sections
In previous versions, the HTTPS statement was required to be used
prior to any of the following statements in a Backend section:
Cert, Ciphers, Disable. This requirement was lifted. Moreover, any
of these statements already imply that the backend is HTTPS capable,
which means that the HTTPS statement is superfluous if any of these
is used.
* Fall-through services
A new kind of services, fall-through services, is introduced.
Fall-through services are processed specially. If the request matches
such a service, any modification statements from that service are
applied to the request, and the selection process continues from the
next service. In other words, a fall-through service provides a way to
apply a set of modifications common for all services that follow.
A service is marked as a fall-through using the "FallThrough"
statement. Such services cannot contain backend definitions or
"Rewrite response" statements. An example of a fall-through service
follows:
Service
Path -beg "/status/"
SetHeader "Host: internal"
LogSuppress success
FallThrough
End
* Early rewrites
Any request modification directives are normally applied to the
incoming request immediately before sending it to the selected
backend. A new flavor of the "Rewrite" statement is introduced:
Rewrite early
Such statements are applied to the request at the early stage of
its processing. "Rewrite early" statements appearing in ListenHTTP
(or ListenHTTPS) section are applied first, right after the request
headers have been received and parsed. Such statements appearing in
Service sections are applied during service selection, before applying
service selection statements for that service.
This means that any modifications done in "Rewrite early" sections are
visible to conditional statements (both standalone and those
contained in "Rewrite" sections).
It is important to notice that any modifications done by early
rewrites in a Service section remain visible for subsequent sections,
if this one is not selected for processing the request.
To summarize, this release provides two mechanisms for making
request modifications visible to conditional statements: early
rewrites and fall-through sections.
* Beacons
Beacons are special boolean values that can be used in conditional
statements to select the service to use. Beacons can change their
value only via the pound control interface, using poundctl or similar
tool.
Beacons provide a mechanism for adopting pound configuration to
the changing external conditions (such as the current load or request
rate) without the need to reconfigure the pound daemon.
Beacons are declared using the "DeclareBeacon" statement in the global
scope:
DeclareBeacon "NAME" [BOOL]
Beacons are examined using the "Beacon" statement in "Section",
"Match", or "Rewrite" section, e.g.:
Beacon "NAME"
To change or inspect the actual value of a beacon, use poundctl:
poundctl beacon
Examine all declared beacons and their values.
poundctl beacon NAME
Examine the value of beacon NAME.
poundctl -s NAME
Set beacon NAME to "true".
poundctl -d NAME
Set beacon NAME to "false".
* Request timings
The %T log conversion specifier takes an optional prefix,
specifying starting point for time measuring. Its possible values are
init
The time between establishing connection or sending last
byte of the previous response and sending last byte of the
response to the client.
req
The time between receiving first byte of the request and
sending last byte of the response to the client. This is the
default.
reqend
The time after receiving last byte of the request header and
sending last byte of the response to the client.
be
The time between sending first byte to the backend and sending
last byte of the response to the client.
E.g.: "%{reqend:us}T"
Similar extension applies to the "D" convertsion. Here, the prefix
indicates the stage of request processing whose duration is requested.
Its values are:
init
Time between establishing the connection or sending last byte of
the previous response and receiving first byte of the request.
header
Total time reading the request headers, i.e. between receiving
first byte of the request and sending it over to the backend.
select
Time spent selecting the service and backend.
resp
Time processing the response, i.e. time elapsed between the moment
when the service and backend have been selected and the moment after
the last byte of the response has been sent to the client.
be
Time between sending first byte to the backend and sending last
byte of the response to the client.
totalreq
Time between receiving first byte of the request and sending last
byte of the response to the client.
grandtotal
Time between establishing the connection or sending last byte of
the previous response and sending last byte of the response to the
client.
* Tracing
Tracing helps in debugging complex service selection or rewrite
conditions. Each service has an associated trace flag. When this flag
is set, each evaluated conditional is reflected in the pound log.
Example output:
(7f2d5534f640) Request from: 192.0.2.11
(7f2d5534f640) Request: GET /media/id.jpg HTTP/1.1
(7f2d5534f640) Headers:
(7f2d5534f640) Host:example.com
(7f2d5534f640) User-Agent: Mozilla/5.0
(7f2d5534f640) Accept: */*
(7f2d5534f640) service selection: pound.cfg:29.9-36.11:considering service
(7f2d5534f640) service selection: pound.cfg:30.17-26: header: 1
(7f2d5534f640) service selection: pound.cfg:31.17-25: path /media: 1
(7f2d5534f640) service selection: implicit AND: 1
(7f2d5534f640) service selection: pound.cfg:29.9-36.11: service selected
The value in parentheses identifies the worker thread that did the
selection. Result of each conditional is printed as a boolean value
(0/1).
To manage trace flags, a new poundctl subcommand, trace, is provided:
- poundctl trace /L/S
Show trace flag for service S in listener L.
- poundctl trace -s /L/S
Set trace flag for service S in listener L.
- poundctl trace -d /L/S
Delete (unset) trace flag for service S in listener L.
The object path specification can be shortened to /L, to operate on all
services in the listener L, or to /, to operate on all services
defined in the configuration.
* Preprocessing
Configuration files can be optionally preprocessed using an external
program. To do so, specify the command line of the preprocessor in
the "preprocessor" pragmatic comment appearing in the very beginning
of the principal configuration file, like that:
# pragma preprocessor m4 -s
It is important that this comment appears before the first
configuration statement. Comments and empty lines before it are
allowed.
A new command line option -E instructs pound to print the preprocessed
text and exit.
Version 4.23, 2026-05-26
* Important bugfix
A bug in "SendFile" allowed for reading files outside of the
configured directory. This is fixed.
* Compilation
The early pthread_cancel probe hack is no longer used. Consequently, the
"--disable-pthread-cancel-probe" configure option is gone.
* Handling of errors during service selection
In previous versions, if service selection failed due to an error
(e.g. because a non-existing backreference was used, a run-time error
in a Lua function occurred, or the like), that service would be skipped
as if its conditions returned false, and the next one would be tried.
This could lead to selecting an improper service in case of error.
Starting from this version, any error occurring during service
selection causes pound to return internal server error (500).
* File descriptor usage
At startup, pound closes all inherited file descriptors numerically
greater than 2. If this is undesirable for some reason, use the
-Wno-close-extra-fds command line option.
Capacity of the incoming connection queue (used when all workers
become busy) is computed so as to prevent the program from running out
of file descriptors. It can also be set explicitly, using the
"ConnectionQueueSize" configuration file statement.
* Configuration constants
The "Constant" statement defines a configuration constant for use in
string expansions and Lua code. A constant is a string value
identified by a unique name. The "Constant" statement can appear in
top-level, listener, and service scopes. The syntax is:
Constant "NAME" "VALUE"
or
Constant "NAME" OPTIONS
where OPTIONS are:
-file FILE
Read constant value from the file FILE at startup.
-filewatch FILE
Read constant value from the file FILE, and monitor it during
the runtime for changes.
-trim
Trim off the trailing whitespace from the obtained value.
Constants can be used in string expansions (using the "%[const NAME]"
accessor), and in Lua code (using the "http:const(NAME)" method).
Refer to the documentation, section "Constants", for a detailed
discussion with examples.
* Tunnels
A tunnel passes an opaque stream of bytes between the client and backend.
It is defined in configuration file using the following construct:
Tunnel [ "ID" ]
Address IPADDR
Port PORT
Backend
Address IPADDR
Port PORT
End
End
Naturally, only one backend is allowed. Similarly to other listeners,
the Address/Port pair in the Tunnel section can be replaced with a
single SocketFrom statement. The following statements are allowed in
Backend subsection: Timeout, ConnTO, Disabled.
* Runtime log level control
The "poundctl" command can be used to inspect log level settings or to
change them without restarting pound.
- poundctl log [/]
Show global log level.
- poundctl log /L
Show log level for the listener L.
- poundctl log /[L] F
Set log level F. If argument is "/", global log level is
set. Otherwise, log level for the listener L is set.
- poundctl log -d /L
Clears log level setting for the listener L. As a result, the
listener will use global log level.
- poundctl log -d [/]
Set global log level to "null".
* Lua: access to the originator IP
Two new fields are available in the "http" table:
* http.rmt_ip
Request originator IP address (as string).
* http.fwd_ip
Request originator IP address (as string), determined using the
X-Forwarded-For (or similar) header. If the request bears no such
header or if the TrustedIP list is not declared, this is
equivalent to http.rmt_ip.
Version 4.22, 2026-03-29
* Remove spurious log messages.
* Metric backend: close connection after response.
* Support IPv4 mapped to IPv6 in ACLs.
It is no longer necessary to use ::ffff:<IP4> notation in ACLs to
match mapped IPv4 addresses. Using <IP4> is enough.
* Support for split Header and Host conditions is rewritten
A split "Header" condition is
Header "NAME" [OPTIONS] "PATTERN"
In previous versions, this construct was internally translated to a
"Header -re ..." statement, and that introduced several inconsistencies.
In particular, when using the "-re" option, "PATTERN" was treated as
anchored, i.e. as if it started with a "^". Besides, -exact and -prefix
were treated as equivalent. This is now fixed. The new implementation
strictly follows the logic of the statement: it compares each header whose name is "NAME" with "PATTERN" in accordance with the given OPTIONS.
This applies also to "Host" condition, which is equivalent to
Header "Host" [OPTIONS] "PATTERN"
* Bugfixes
** Fix durations on 32-bit architectures.
** Fix recognition of truncated request capture.
Version 4.21, 2026-03-14
* Changes in Lua API
** http.balancer
Balancer group of the currently selected backend. Setting this field
to a numeric value instructs pound to re-send the request to a backend
from the balancer group with the weight greater than or equal to the
value supplied.
** http.resendcount
Keeps number of resending attempts underwent by the current request.
** http.service.name
Name of the currently selected service. Assigning to this variable
instructs pound to send the current request to the named service.
Assigning a nil also implies to rerun service selection from the
beginning.
** http.service.locus
Location of the currently selected service in the configuration file.
* Setting ciphersuites for TLSv3
The syntax of the "Ciphers" statement (ListenHTTPs and Backend
sections) has been extended to allow for specifying ciphersuites for
TLSv3 protocol. The new syntax is:
Ciphers [typeopt] "cipherlist" ...
where optional typeopt option defines how to interpret the cipherlist
argument that follows it. Its possible values are:
-cipherlist
Sets the list of ciphers that affects only TLSv2 and prior protocols.
This is the default.
-ciphersuites
Sets the list of TLSv3 ciphersuites. It will be combined
with any TLSv1.2 and below cipher lists that may have been configured.
Notice, that a single "Ciphers" statement can set both TLSv2 and TLSv3
ciphersuites:
Ciphers "HIGH:@STRENGTH:!RSA" -ciphersuites "TLS_AES_256_GCM_SHA384"
* New configuration setting: WorkerStackSize
Sets worker thread stack size, in bytes.
* Lua compile-time check
The compile-time check for Lua no longer depends on pkg-config.
Version 4.20, 2026-02-06
* New selection statement: Method
This conditional statement evaluates to true, if the request method
matches the supplied pattern, e.g.:
Service
Method "POST"
...
End
* New internal backend: Success
Always returns a 200 response code. This is intended mainly for
handling special requests. For example, the service definition
below replies to the OPTIONS requests:
Service
Method "OPTIONS"
Rewrite response
SetHeader "Access-Control-Allow-Origin: example.com"
SetHeader "Access-Control-Allow-Methods: GET,POST,PUT"
SetHeader "Access-Control-Max-Age: 1800"
End
Success
End
* Changes in Lua API
** http.req.body
This field contains the captured content of the incoming request. For
it to be available, content capturing must be explicitly enabled for
the service on whose behalf the Lua code is called. Content capturing
is enabled by the following new configuration statement:
ContentCapture SIZE
where SIZE sets the upper limit on the captured content size. If the
actual content length is greater than this value, saved material is
discarded and http.req.body is set to nil.
** http.resend
Lua functions invoked in "Rewrite response" can set this variable to
'true' to have pound resend the modified request to backend. To avoid
dead loops, pound limits the number of such resends to 4 per request.
Version 4.19, 2025-12-11
* Support for Lua
Functions written in Lua can be used to implement complex request
matching conditions, modify requests and/or responses, and implement
new backends. You will need Lua version 5.3 or newer. By default,
configure will enable Lua support if it finds the necessary headers
and libraries. This can be controlled using --disable-lua and
--enable-lua options.
At runtime, Lua sources are loaded using Load statement in the Lua
global section of the configuration file:
Lua
Load "impl.lua"
End
A function returning boolean value can be used as a conditional:
LuaMatch "myfun" "arg"
Any number of arguments (all of string type) can be provided.
Arguments undergo usual expansions prior to being passed to the
function.
Two more similar statements are added:
LuaModify - Applies a Lua function to modify the request (or
response). It can be used in ListenHTTP,
ListenHTTPS, Service, Match and Rewrite statements.
LuaBackend - Calls a Lua function that implements a backend.
* Detached conditions
Detached condition is a set of conditional statements not associated
with any service, which is assigned a unique symbolic name. Detached
conditions are defined using the Condition statement in the global
scope of pound configuration file, e.g.:
Condition "protected"
Path -beg "/admin"
ACL -file "internal.acl"
BasicAuth "htpasswd"
End
Detached conditions can be invoked using the "Eval" statement, which
is allowed anyplace where the normal conditional is allowed. Result
of evaluation is cached and reused in subsequent Eval statements
referring to the same condition. E.g.:
Service
Eval "protected"
...
End
Detached conditions provide a convenient way to define conditional
statements with are used repeatedly in multiple Service statements.
* New request modification statement: DeleteQuery
Removes query part of the request URL.
* One-argument form of SetQueryParam
When used with one argument (name of a query parameter), SetQueryParam
causes removal of that query parameter.
* Percent encoding and decoding
The Path and QueryParam conditional statements accept new option
-decode. When given this option, the value will undergo
percent-decoding prior to comparison. E.g.:
QueryParam "t" -decode "?"
Similarly, SetPath and SetQueryParam statements accept new option
-encode. When given this option, the value will be percent-encoded
prior to setting it.
* Relative pathname in SendFile statement.
If the argument to SendFile statement is not an absolute file name, it
is resolved relative to pound include directory.
* Turning PID file off.
To disable PID file creation, use PIDFile "-".
Version 4.18, 2025-10-29
* Emacs mode for editing pound configuration files
Major mode for editing pound configuration files in GNU Emacs is
implemented in file src/pound-mode.el. Its installation and usage is
covered by Chapter 11 of the Pound Manual, entitled "Emacs Major Mode".
* Include statement accepts globbing patterns
If the argument to "Include" configuration statement is a shell
globbing pattern, all regular files matching that pattern will be
included, in lexicographical order.
* New configuration statement: LineBufferSize
Sets the line buffer size. Line buffer is used when reading request
line, backend response status line, and header fields in both requests
and responses. Thus, this value limits the maximum length allowed for
these parts of HTTP messages. By default, it is set to the internal
buffer size (4096), which is also its minimum allowed value.
This statement can be used in global scope and within ListenHTTP
(ListenHTTPS) sections.
* TBF statement
This conditional statement implements token bucket filter. Its
arguments are: the ID of the bucket (a string, subject to
backreference expansion and request accessor interpretation), maximum
allowed rate (requests per second) and a burst size (number of
requests). The statement evaluates to true if the token bucket accepts
the request and to false otherwise.
See Pound Manual, Section 4.6 "Rate-limiting", for a detailed
discussion.
* New request accessor: remoteip
%[remoteip 0] expands to the real originator IP;
%[remoteip 1] expands to the IP determined from the X-Forwarded-For
(or similar) header.
* Originator IP for ACL matching
By default, ACLs are applied to the IP address from which the request
was received. It is now possible to use the IP obtained from X-Forwarded-For
header, instead. To do so, use the -forwarded option keyword, e.g.:
ACL -forwarded -file "acl.lst"
* Changes in log format specifications
** Expansion of %v changed
The %v specifier now expands to the host name used in the request, as
obtained from the "Host" header, with port specification removed.
If you want the old expansion (name of the listener that served the
request), use "%{listener}N".
** Support for new specifiers
. %l Reserved for future use. Expands to single dash.
. %p Port number of the listener that served the request.
** Built-in formats changed accordingly:
3, "vhost_combined"
"%v:%p %a %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\""
4, "combined"
"%a %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\""
5, "detailed"
"%v:%p %a %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\"
(%{service}N -> %{backend}N) %{f}T sec"
* poundctl core
This command shows core pound statistics: server time, daemon version,
pid, and uptime, as well as worker threads configuration and
statistics.
* Openmetrics output
Metrics describing listeners and services are labeled by the listener
and service names, as well as by their ordinal numbers in the
configuration.
* Testsuite: optionally use multi-process model
If Perl is built without ithreads, testsuite harness switches to
multi-process model.
Version 4.17, 2025-07-29
* Tagging conditional statements
All conditional statements that match against a pattern can be tagged
using the following option:
-tag "T"
where T is an arbitrary string. This tag can then be used to refer to
a subexpression obtained as a result of matching, for example:
Path -tag "dir" -re "^/static(/.*)"
Header -tag "type" "Content-Type:([^/]+)/([^;]+)"
SetPath "/assets/$1(type).$2(type)$1(dir)"
* Changes to the "ACL" statements
Two new forms of the ACL statements are provided:
- ACL -file "NAME"
Reads ACL from the file NAME. The file shall contain a list of
CIDRs, one per input line. CIDRs need not be quoted. Empty lines
and comments are allowed.
The file is read once, at program startup.
- ACL -filewatch "NAME"
Same as above, but the file will be monitored for changes during
the runtime. If a change is detected, the file will be rescanned
and the ACL updated. To ensure file changes are noticed
immediately, pound relies on filesystem monitoring API provided by
the operating system - inotify on GNU/Linux systems and kqueue on
BSD. On systems not supporting either interface, the file will be
checked periodically. The interval between two successive checks is
defined by the WatcherTTL global directive.
The corresponding new forms are implemented for all ACL statements,
i.e.:
- Named ACLs:
ACL "name" -file "filename"
ACL "name" -filewatch "filename"
- Trusted IP lists:
TrustedIP -file "filename"
TrustedIP -filewatch "filename"
* Use of "-filewatch" with request matching directives
In addition to ACL, the -filewatch flag discussed above can be used with
the following request matching directives: Header, Path, Query, QueryParam,
StringMatch, URL.
* Changes to the "BasicAuth" statement
The statement takes an option: -filewatch or -file. The option
-filewatch is the default (see above). The -file option can be used
to disable file change monitoring.
* Changes to the "Header" statement
New statement form is introduced:
Header "FIELD" [OPTIONS] "VALUE"
In this form, pattern modification options apply to header value only,
e.g.
Header "Content-Type" -beg "text/"
* New special backend "SendFile"
This backend treats the path part of the request as local file name
and sends back the contents of that file, if it exists. Default
content type is "text/plain". Both parameters can be changed using
request (for file name), and response (for content type) rewriting.
The syntax is:
SendFile DIR
where DIR specifies the directory from which to serve files.
* Error file contents
Error file supplied with "Error", "ErrorFile", or any "ErrNNN"
directvie, can begin with HTTP headers. If so, these will be
sent along with the response, and the actual response contents will
begin after the empty line that terminates the headers.
* Error response rewriting
When a regular backend responds with an error, the content (body)
of that response can be replaced with an arbitrary custom page. For
this to work, the listener must define a custom page for the
status code in question using the ErrorFile statement, and error
response rewriting must be explicitly enabled. The latter is done
with the following statement:
RewriteErrors on
The statement can be used both in ListenHTTP (ListenHTTPS) and in
Service blocks, the latter overriding the former.
* Bugfixes
** Improper pattern handling in patterns read from file
When using -file with one of the following pattern types: -exact, -beg,
-end, -contain, only first pattern from the file was compiled using the
requested pattern type. Remaining ones were treated as POSIX regular
expressions.
Version 4.16, 2025-01-13
* Fix backend probing when compiled without support for dynamic backends.
* Reject requests with oversized chunk bodies.
* Handle errors that occur during evaluation of conditionals.
Version 4.15, 2024-11-17
* New configuration statement: IgnoreSRVWeight
Instructs pound to ignore weight value of an SRV record when
generating new backend from it. Priority of the generated backend is
copied from its matrix backend.
* New configuration statement: OverrideTTL
When used with dynamic backends, instructs pound to use the supplied
value as TTL, instead of the one returned in DNS response.
* Load balancing code revisited
Removed arbitrary limit on backend priority value. The allowed range
is now 1..65535.
Remove priority mapping for SRV-generated backends. SRV weights are
assigned to backend priorities verbatim.
* Fix access to freed memory in session handling code.
* Improve testsuite
Check for missing perl modules and skip tests if needed.
DNS-based tests are disabled by default, due to their experimental
nature. Use --enable-dns-tests to enable them.
The poundharness.pl script runs a self-test when invoked with the
--fakedns option, to avoid spurious test failures.
Version 4.14, 2024-10-13
* Dynamic backends
Dynamic backends are created and updated on the fly based on the
information from DNS. To declare backend as dynamic, use a
symbolic host name in its "Address" statement and add the "Resolve"
statement with one of the following values:
first Resolve the symbolic host name and use first IP from
the DNS response as the address of the created dynamic
backend. Thus, at most one dynamic backend will be
created.
all Resolve the symbolic host name and create one backend for
each address from the DNS response. This enables load
balancing between created backends. Each backend will be
assigned the same priority.
srv Obtain SRV records for the host name and use them to
generate regular backends. Each record produces new
dynamic backend of "Resolve all" type, which creates
regular backends as described above. The weight field
of the SRV record is mapped to the priority field of each
generated backend. The SRV priority field determines
the balancing group (see below) where the backend will
be hosted.
By default, both IPv4 and IPv6 addresses are looked for. You can
select the specific address family using the "Family" statement. Its
allowed values are:
any Use all address families available. This is the default.
inet Use only IPv4 addresses.
inet6 Use only IPv6 addresses.
For example:
Backend
Address "be0.example.net"
Port 8080
Resolve first
Family inet
End
Dynamic backends will be updated periodically, when the TTL of the
corresponding DNS records expires. If the hostname cannot be resolved
or a DNS failure occurs, next update will be scheduled in 600
seconds after the failure. This interval can be configured using the
"RetryInterval" statement in the "Backend" section, or globally, in
the "Resolver" section.
The "Resolver" section allows you to control how DNS lookups are
performed. It can contain the following directives:
CNAMEChain (integer) Maximum allowed length of a "CNAME
chain". CNAME chains are formed by DNS CNAME
records pointing to another CNAME. Although
prohibited by the RFC, such usage occurs
sometimes in the wild. By default, pound does
not accept CNAME chains. If you work with a
nameserver that uses them, set this statement
to a small integer value, defining maximum
number of CNAMEs in the chain that pound will
accept. The value of 2 or 3 should suffice in
most cases.
ConfigFile (string) Name of the resolver configuration file.
Default is "/etc/resolv.conf".
ConfigText
...
End The material within this section is read
verbatim and used as the content of the resolver
configuration file.
If both ConfigFile and ConfigText are used, the
last statement used wins.
Debug (boolean) Whether to enable DNS debugging info.
RetryInterval (integer) Interval in seconds, after which to
retry failed DNS queries or queries that
returned no RRs. This value is used unless the
backend defines its own retry interval value.
Dynamic backends can be controlled using poundctl. For example,
consider the following output from "poundctl list":
1. Listener http://192.0.2.1:80 enabled
0. Service active (5)
0. matrix "be0.example.com" 2 0 active