diff --git a/man/3proxy.cfg.5 b/man/3proxy.cfg.5 index 4296e5e..2cb85db 100644 --- a/man/3proxy.cfg.5 +++ b/man/3proxy.cfg.5 @@ -928,7 +928,9 @@ one service's connections alone, e.g. connlim 5 60 * * * @1080 .br denies the sixth concurrent connection of the service on port 1080, -whatever it connects to. For any field * +whatever it connects to. A comma ends an entry, so several services are +listed by repeating it: *@1080,*@1090 names the two, and a bare +@1080,1090 would leave 1090 a destination port. For any field * sign means ANY. If access list is empty it\'s assumed to be .br allow * diff --git a/tests/cases/viaport.py b/tests/cases/viaport.py index 4c6305b..0a1e037 100644 --- a/tests/cases/viaport.py +++ b/tests/cases/viaport.py @@ -97,3 +97,19 @@ def run(t): "log\nallow * * * 443@\nnot_a_command\n") t.contains(out, "Invalid port or port range", "a service with nothing after the @ is refused") + + # several services in one rule: the entry repeated with each + sev1, sev2 = t.free_port(), t.free_port() + t.start("viaport_both", f""" + log + auth iponly + deny * * * @{sev1},@{sev2} + allow * + proxy -p{sev1} + proxy -p{sev2} + """, ports=[sev1, sev2]) + + t.ne(200, t.http(url, proxy=f"127.0.0.1:{sev1}").status, + "the first service a repeated entry names is refused") + t.ne(200, t.http(url, proxy=f"127.0.0.1:{sev2}").status, + "and so is the second")