From 78f65a910011652660ef8269b1a1245c143471bf Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Sun, 20 Oct 2024 21:54:21 +0200 Subject: [PATCH] Upgraded Squid image to ubuntu/squid:5.2-22.04_beta --- .../compatibility/ContainerImages.java | 4 +-- .../test/resources/docker/squid/squid.conf | 32 +++++++++++-------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/compatibility/ContainerImages.java b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/compatibility/ContainerImages.java index 1c313249e..0cb835b1f 100644 --- a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/compatibility/ContainerImages.java +++ b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/compatibility/ContainerImages.java @@ -103,8 +103,8 @@ public final class ContainerImages { .withFileFromClasspath("squid.conf", "docker/squid/squid.conf") .withDockerfileFromBuilder(builder -> builder - .from("sameersbn/squid:3.3.8-22") - .env("conf_dir", "/etc/squid3") + .from("ubuntu/squid:5.2-22.04_beta") + .env("conf_dir", "/etc/squid") .copy("squid.conf", "${conf_dir}/") //# user: squid; pwd: nopassword .run("echo \"squid:\\$apr1\\$.5saX63T\\$cMSoCJPqEfUw9br6zBdSO0\" > ${conf_dir}/htpasswd") diff --git a/httpclient5-testing/src/test/resources/docker/squid/squid.conf b/httpclient5-testing/src/test/resources/docker/squid/squid.conf index bf9c7a945..0f476df6c 100644 --- a/httpclient5-testing/src/test/resources/docker/squid/squid.conf +++ b/httpclient5-testing/src/test/resources/docker/squid/squid.conf @@ -17,17 +17,20 @@ http_port 8888 http_port 8889 -coredump_dir /var/spool/squid3 +coredump_dir /var/spool/squid -auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/htpasswd +auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/htpasswd +auth_param basic children 5 auth_param basic realm test-proxy -acl all src 0.0.0.0/0.0.0.0 -acl localnet src 10.0.0.0/8 # RFC1918 possible internal network -acl localnet src 172.16.0.0/12 # RFC1918 possible internal network -acl localnet src 192.168.0.0/16 # RFC1918 possible internal network -acl localnet src fc00::/7 # RFC 4193 local private network range -acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines +acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN) +acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN) +acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN) +acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines +acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN) +acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN) +acl localnet src fc00::/7 # RFC 4193 local private network range +acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines acl secure_port myport 8888 acl insecure_port myport 8889 @@ -57,14 +60,15 @@ http_access allow secure_port localnet http_access allow secure_port localhost http_access allow insecure_port authenticated +include /etc/squid/conf.d/*.conf + http_access deny all -http_reply_access allow all - -cache deny all - refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 -refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880 -refresh_pattern . 0 20% 4320 +refresh_pattern \/(Packages|Sources)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims +refresh_pattern \/Release(|\.gpg)$ 0 0% 0 refresh-ims +refresh_pattern \/InRelease$ 0 0% 0 refresh-ims +refresh_pattern \/(Translation-.*)(|\.bz2|\.gz|\.xz)$ 0 0% 0 refresh-ims +refresh_pattern . 0 20% 4320 \ No newline at end of file