suriyun-production / mmorpg-kit-docs

This is document for MMORPG KIT project (https://www.assetstore.unity3d.com/#!/content/110188?aid=1100lGeN)
https://suriyun-production.github.io/mmorpg-kit-docs
49 stars 10 forks source link

[Suggestion] WsClientWrapper support native url without must using ip and port option #2610

Open reidsneo opened 2 weeks ago

reidsneo commented 2 weeks ago

Is your feature request related to a problem? Please describe. I think on the WsClientWrapper need to be updated to support native URL without converting a DNS to IP Address first see this example wsClient = new WsTransportClient(clientEventQueue, ipAddresses[indexOfAddress], port); why? because of in real world setup we might be add a 3rd party Proxy service in front of our setup, let's say Cloudflare, Stormwall for DDOS protection etc... where converting the domain.com to IP is not working on this case, IP will always change so do with the port dynamically

Describe the solution you'd like I would like to have an option in network configuration part to be able entry something like this In CentralServer setup & MapSpawn setup From IP Port

To Use Native URL [checkbox] (If checked form will only require to put URL field) URL wss://gs.domain.com

which is completely ignore IP and Port setup but use URL instead and do not have to covert domain to ip anymore.

Describe alternatives you've considered Another solution is open the basic issue above is we have to enter IP and Port which in certain situation we do not have to do that just by using ws:// or wss:// protocol directly

Additional context For the consideration, when we hosting the game server on the specific ip and port, to me that is not good on this perspective :

  1. for office or certain network company will block specific port other than 443 and 80 (default http https)
  2. when we move server we just need to change the ip address in DNS instead of change in client part gs.domain.com -> oldip gs.domain.com -> newip
insthync commented 2 weeks ago

Okay, I am currently make change to WebSocket transport, for that part you may check it here https://github.com/insthync/LiteNetLibManager/blob/main/Scripts/Transports/WebSocket/WebSocketTransport.cs#L81