Xihao
Xihao

Reputation: 122

How to setup Cloudflare tunnel and work with HTTP proxy

What I tried is setting up the Cloudflare tunnel using docker and on the Cloudflare tunnel dashboard, I set my public domain pointing to my localhost network’s http proxy server. (http://my-public.domain.com -> http://192.168.1.2:3456).

If I run below command on my local and it works showing 302:

curl -x 192.168.1.2:3456 www.example.com -v

...
HTTP/1.1 302 Found

If I use the public domain that I setup on cloudflare tunnel, it won't work and show HTTP/1.1 409 Conflict

curl -x my-public.domain.com:80 www.example.com -v
* Mark bundle as not supporting multiuse
< HTTP/1.1 409 Conflict
< Date: Fri, 12 May 2023 01:08:24 GMT
< Content-Type: text/plain; charset=UTF-8
< Content-Length: 16
< Connection: close
< X-Frame-Options: SAMEORIGIN
< Referrer-Policy: same-origin
< Cache-Control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Expires: Thu, 01 Jan 1970 00:00:01 GMT
< Server: cloudflare
< CF-RAY: randome-string
< 
* Closing connection 0
error code: 1001

I also try the policy rule set to bypass but same result not working.

Upvotes: 0

Views: 1096

Answers (0)

Related Questions