Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
reidsneo opened this issue Nov 11, 2024 · 1 comment

Comments

@reidsneo
Copy link

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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants