Forwardproxy do not block websites

1. The problem I’m having:

I`ve built Caddy with forwardproxy plugin from the caddy2 branch using that command

xcaddy build --with github.com/caddyserver/forwardproxy@caddy2

I added the blocked website in Caddyfile.
I am launching Caddy on my local machine.
But when I go to a blocked website via a browser, it works as usual.

2. Error messages and/or full log output:

no errors

{"level":"info","ts":1691700550.863602,"msg":"using provided configuration","config_file":"./Caddyfile","config_adapter":""}
{"level":"warn","ts":1691700550.8641882,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"./Caddyfile","line":5}
{"level":"info","ts":1691700550.869654,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"info","ts":1691700550.869654,"logger":"http.auto_https","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":443}
{"level":"info","ts":1691700550.869654,"logger":"http.auto_https","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
{"level":"info","ts":1691700550.869654,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc0004d3380"}
{"level":"info","ts":1691700550.869654,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:C:\\Users\\ыва\\AppData\\Roaming\\Caddy"}
{"level":"info","ts":1691700550.8702059,"logger":"http","msg":"enabling HTTP/3 listener","addr":":443"}
{"level":"info","ts":1691700550.8702059,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1691700550.8702059,"logger":"http.log","msg":"server running","name":"remaining_auto_https_redirects","protocols":["h1","h2","h3"]}
{"level":"info","ts":1691700550.8707547,"msg":"autosaved config (load with --resume flag)","file":"C:\\Users\\ыва\\AppData\\Roaming\\Caddy\\autosave.json"}
{"level":"info","ts":1691700550.8707547,"msg":"serving initial configuration"}
{"level":"info","ts":1691700550.8707547,"logger":"tls","msg":"finished cleaning storage units"}

3. Caddy version:

v2.7.2 h1:QqThyoyUFAv1B7A2NMeaWlz7xmgKqU49PXBX08A+6xg=

4. How I installed and ran Caddy:

clone a relevant master branch

a. System environment:

Windows 10

b. Command:

caddy run

c. Service/unit/compose file:


d. My complete Caddy config:

:443
route {
	forward_proxy {
		basic_auth user1 0NtCL2JPJBgPPMmlPcJ
		ports 80 443
		acl {
			deny facebook.com agame.com
			allow all
		}
	}
}

5. Links to relevant resources:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.