Skip to content

Serving proxy.pac does not seem to work or needs authenticationΒ #165

@jmfrank63

Description

@jmfrank63

I am not certain if this is just a question or a bug.

I am unable to get any proxy.pac to serve with the latest v2.10.0 h1:fonubSaQKF1YANl8TXqGcn4IbIRUDdfAkpcsfI/vX5U= version (built with xcaddy).

Here is my config:

:8443 https:// example.com {
	tls /path/to/ssl_chain.crt \
 /path/to/ssl_private_key.key
	log {
		level DEBUG
		output file /var/log/caddy/caddy.log
		format console
	}

	forward_proxy {
		basic_auth username password
		hide_ip
		hide_via
		serve_pac /proxy.pac
		# probe_resistance
	}
}
:8080 http://example.com {
	log {
		level DEBUG
		output file /var/log/caddy/caddy.log
		format console
	}

	forward_proxy {
		basic_auth username password
		hide_ip
		hide_via
		serve_pac /proxy.pac
		# probe_resistance
	}
}

I tried with and without auth with and without hid_ip and hide_via and also with and without /proxy.pac but to no avail.

curl -v http://example.com:8080/proxy.pac would not serve anything. It just hung I also tried curl -v http://example.com/proxy.pac and other https combinations, but I did not manage to get a single pac file.

I could, of course, create one and serve it statically, but I don't know if this is the purpose of the directive.

Additionally, since I could not get any pac file, I don't know if authentication required, which I got when basic_auth was enabled, is expected behaviour or due to the fact that no pac file is served at all? I am not sure if requiring auth for the pac file is intended.

If you need any additional information, please let me know, I will provide what is needed.

Also, if this turns out to be a bug, and not my stupidity, I am willing to investigate and put in a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions