-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not access web site on itself host via forwardproxy #12
Comments
When browse https://web.plus, caddy gives the vhost |
Thanks for the report!
The problem is most likely that Caddy receives:
which is proxying request that should have internally went to P.S. as a temporary workaround you can try using PAC files, to make browser use |
@jim3ma, what client software are you using? |
I think I know why this is happening. Caddy is programmed to handle requests by Host header, to choose the middleware chain it follows. For any Host that doesn't match one defined in the Caddyfile, it routes to a forwardproxy chain, if configured. But in this case, Caddy has a site defined for the Host name you're trying to access via a proxy. How would Caddy know which middleware chain to use? |
We could send all As an aside, here's another temporary workaround: add |
@mholt When chrome uses forwardproxy, chrome dials |
BTW, each vhost has the supported methods like POST, GET, DELETE. When match vhost, the supported methods should be considered. |
@sergeyfrolov |
Webservers generally don't do this, and there are setups that rely on this not being the case. Among other more general network configurations, the fact that webservers don't prioritize SNI in vhost matching is how Domain Fronting censorship circumvention technique works.
If supported methods are known for each vhost, then this might work. Currently, when |
How about a flag like |
The sni-first option is okay. |
e.g:
We have a forwardproxy for https://proxy.plus
on host A
, and a web site https://web.plus ( different from proxy.plus )on the same host
with caddy. P.S. enable tls always.When browse the https://web.plus via https://proxy.plus proxy, chrome says "ERR_TUNNEL_CONNECTION_FAILED".
Other web sites work okay via https://proxy.plus.
The text was updated successfully, but these errors were encountered: