Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Server setup:

  1. IP1 (where the game is located) (game.example.net) (not proxied)
  2. IP2 (where the website is located) (www.example.net) (proxied)

Currently when a user tries to enter game.example.net on the website, he connects directly to the game server which redirects him to www.example.net, but I want to remove this step and instead make Cloudflare redirect him.

But that is where the issue is, if I proxy the traffic, it works but then the game does not work since it's not on a http protocol. Is there somehow a way to make a workaround which exposes the IP on all ports except 80 on this specific subdomain?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
794 views
Welcome To Ask or Share your Answers For Others

1 Answer

As you already know, Cloudflare only supports web ports (http/https) through its proxy. As long as the proxy is turned on (Orange cloud) for the DNS record, it will point to Cloudflare IP, and not your game server IP, so it wouldn't be possible to proxy a specific port.

However, just quite recently they've release Spectrum, that allows you to proxy any TPC/UDP port, which means you can proxy your game server ports through it (source). Spectrum is only available for paid plans, and it's charged on usage basis. It's a quite costly workaround, so I suggest to continue with your initial configuration.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...