Configuring Cloudflare

Cloudflare, the shining beacon of hope that works tirelessly to make the web a better place for all. I’m head over heels for Cloudflare!

The initial action is to create subdomains with the cloud proxy disabled. Afterwards, the certificates can be obtained using sing-box.

Once you have obtained your certificates, be sure to enable Cloudflare cloud proxy for WebSocket traffic to proxy them through the CDN.

SSL/TLS settings:

Choose SSL/TLS settings from the left-hand menu and configure them as shown below:

Firewall Rules:

With Cloudflare firewall rules, you can restrict inbound connections to certain countries. Create a firewall rule if you provide services to certain countries.

WAF can limit inbound connections from specific countries.
Iran-only traffic is allowed.

It is important to note that this rule applies to traffic proxied by CDN.