[Privoxy-commits] [privoxy] 16/38: Add test scenario acl-multiple-ip-addresses-specified-without-destination
User Git
git at git.privoxy.org
Thu Apr 9 09:37:14 CEST 2026
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit 4822954157ecb630cc1cf5e33f360ef7883d6a9a
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Wed Apr 1 10:54:07 2026 +0200
Add test scenario acl-multiple-ip-addresses-specified-without-destination
---
.../data/DISABLED | 1 +
.../data/test1 | 33 +++++++++++++++
.../data/test2 | 47 ++++++++++++++++++++++
.../data/test3 | 29 +++++++++++++
.../data/test4 | 28 +++++++++++++
.../data/test5 | 28 +++++++++++++
.../data/test6 | 42 +++++++++++++++++++
.../privoxy.conf | 21 ++++++++++
.../templates/connect-failed | 1 +
9 files changed, 230 insertions(+)
diff --git a/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/DISABLED b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/DISABLED
new file mode 100644
index 00000000..da43e6a4
--- /dev/null
+++ b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/DISABLED
@@ -0,0 +1 @@
+# Don't disable any tests.
diff --git a/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test1 b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test1
new file mode 100644
index 00000000..cfa2aff8
--- /dev/null
+++ b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test1
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Connection: close
+Content-Type: text/html
+Content-Length: 14
+
+Blafaseldieda
+</data>
+</reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+Request from permitted IP address
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+</testcase>
diff --git a/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test2 b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test2
new file mode 100644
index 00000000..a66d4aaf
--- /dev/null
+++ b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test2
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<proxy-reply>
+<data>
+HTTP/1.1 503 Connect failed
+Content-Length: 49
+Content-Type: text/html
+Cache-Control: no-cache
+X-Ignore-Header: Date
+Date: Wed, 01 Apr 2026 07:30:49 GMT
+Last-Modified: Wed, 08 Jun 1955 12:00:00 GMT
+Expires: Sat, 17 Jun 2000 12:00:00 GMT
+Pragma: no-cache
+
+Could not connect to destination 127.0.1.2:1234.
+</data>
+</proxy-reply>
+
+<client>
+<name>
+Request from client address from denied network range that does not have an exception
+</name>
+<command>
+--interface 127.0.1.2 http://127.0.1.2:1234/%TESTNUMBER
+</command>
+<precheck>
+%PERL $TESTDIR/../../bind-to-address.pl 127.0.1.2
+</precheck>
+</client>
+
+<verify>
+<errorcode>
+0
+</errorcode>
+<strip>
+^Date
+</strip>
+</verify>
+
+</testcase>
diff --git a/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test3 b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test3
new file mode 100644
index 00000000..6c57b9a9
--- /dev/null
+++ b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test3
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP CONNECT
+HTTPS
+</keywords>
+</info>
+
+<client>
+<name>
+Request from denied client address to https address without https inspection enabled
+</name>
+<command>
+--interface 127.0.1.3 https://127.0.1.2/%TESTNUMBER
+</command>
+<precheck>
+%PERL $TESTDIR/../../bind-to-address.pl 127.0.1.3
+</precheck>
+</client>
+
+<verify>
+<errorcode>
+56
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test4 b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test4
new file mode 100644
index 00000000..52d70546
--- /dev/null
+++ b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test4
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<client>
+<name>
+Request from client address from denied network range
+</name>
+<command>
+--interface 127.0.1.3 http://127.0.0.1/%TESTNUMBER
+</command>
+<precheck>
+%PERL $TESTDIR/../../bind-to-address.pl 127.0.1.3
+</precheck>
+</client>
+
+<verify>
+<errorcode>
+52
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test5 b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test5
new file mode 100644
index 00000000..73e05f2c
--- /dev/null
+++ b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test5
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<client>
+<name>
+Request from client address from denied network range
+</name>
+<command>
+--head --interface 127.0.1.3 http://127.0.0.1/%TESTNUMBER
+</command>
+<precheck>
+%PERL $TESTDIR/../../bind-to-address.pl 127.0.1.3
+</precheck>
+</client>
+
+<verify>
+<errorcode>
+52
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test6 b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test6
new file mode 100644
index 00000000..f8919ddc
--- /dev/null
+++ b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/data/test6
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Connection: close
+Content-Type: text/html
+Content-Length: 14
+
+Blafaseldieda
+</data>
+</reply>
+
+<client>
+<server>
+http
+</server>
+<name>
+Request from client address from denied network range to destination that has an exception
+</name>
+<command>
+--interface 127.0.1.2 http://127.0.0.1:%HTTPPORT/%TESTNUMBER
+</command>
+<precheck>
+%PERL $TESTDIR/../../bind-to-address.pl 127.0.1.2
+</precheck>
+</client>
+
+<verify>
+<errorcode>
+0
+</errorcode>
+</verify>
+
+</testcase>
diff --git a/tests/cts/acl-multiple-ip-addresses-specified-without-destination/privoxy.conf b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/privoxy.conf
new file mode 100644
index 00000000..154aacff
--- /dev/null
+++ b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/privoxy.conf
@@ -0,0 +1,21 @@
+listen-address 127.0.0.1:9119
+
+debug 1 # Log the destination for each request Privoxy let through. See also debug 1024.
+debug 2 # show each connection status
+debug 4 # show tagging-related messages
+debug 8 # show header parsing
+debug 32 # debug force feature
+debug 64 # debug regular expression filters
+debug 128 # debug redirects
+debug 256 # debug GIF de-animation
+debug 512 # Common Log Format
+debug 1024 # Log the destination for requests Privoxy didn't let through, and the reason why.
+debug 4096 # Startup banner and warnings.
+debug 8192 # Non-fatal errors
+
+deny-access 127.0.1.1/24
+deny-access 127.0.1.1/16
+permit-access 127.0.0.1
+permit-access 127.0.1.2
+permit-access 127.0.1.1
+
diff --git a/tests/cts/acl-multiple-ip-addresses-specified-without-destination/templates/connect-failed b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/templates/connect-failed
new file mode 100644
index 00000000..1003e2c3
--- /dev/null
+++ b/tests/cts/acl-multiple-ip-addresses-specified-without-destination/templates/connect-failed
@@ -0,0 +1 @@
+Could not connect to destination @hostport at .
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Privoxy-commits
mailing list