Set up a specific Cloudflare CDN IP to access Cloudflare proxy websites or APIs

What is the name of the domain?

example.com

What is the issue you’re encountering

There are no Cloudflare CDN common nodes in mainland China, and the speed of accessing websites proxied by Cloudflare CDN is very limited. Using third-party tools, you can get a Cloudflare CDN IP with relatively low latency. I hope that all websites accessed from Cloudflare CDN can be accessed through this IP with low latency. In the HTTPS request, how should I set the request content to ensure that all websites using Cloudflare CDN are accessed through the fastest IP? I tried to modify the Host but it didn’t work.

What feature, service or problem is this related to?

I don’t know

The answer is the same as when asked here.

1 Like

For example, 3proxy can proxy all traffic to the cloudflare ip to the fastest access ip selected by CloudflareSpeedtest.

So I want to know, how can I directly specify the Cloudflare IP of the target website in the HTTPS request. In this way, the target website can be accessed quickly without Cloudflare allocating a CDN IP to access.

I’m not sure what you are trying to do.

Cloudflare doesn’t “allocate” an IP address as part of the HTTP request, that’s done by DNS. You can’t make a request to a Cloudflare site just using the IP address since all Cloudflare proxy IP addresses will answer for all sites, so a host header is required. And as I said before, those IP addresses are all anycast so there’s no geographical advantage for any particular IP address.

The only exception is where ISPs may route plan IP address ranges differently. Here you may be able to cheat and set your own DNS resolver or hosts file to return an Enterprise plan IP address for your Cloudflare hosted free plan site (or any Cloudflare hosted site), that may give a traffic priority or better routing advantage. But that will only work for you, not your users who can only get the IP address through the Cloudflare DNS.

I don’t know much about Cloudflare’s CDN operation rules, so my expression may be wrong. Because Cloudflare’s IP segment is public, I just want to set a fixed IP belonging to Cloudflare to access the website using Cloudflare proxy, which will make my loading speed faster than direct access.

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