StrangeLoopGames / EcoSuggestions

Repo for storing Eco game suggestions, separate from EcoIssues
35 stars 1 forks source link

[SUGGESTION] Option to override URL used for in-game links #94

Open BlazeGuy2 opened 6 years ago

BlazeGuy2 commented 6 years ago

From @shadow7412 on April 27, 2018 1:39

I'm hosting an eco server, and have DNS set up for it. However when people click on in-game links, instead of being taken to my neat https://eco.example.com they are taken instead to http://1.2.3.4:19337

I would like, if possible, a server setting that overrides the base url for all such interactions. Ideally, this setting should reside inside a file so that it can be easily edited (as I'm running the server on a headless ubuntu, I don't have access to the UI).

Lastly, if left blank, it should probably default to its current behaviour.

Copied from original issue: StrangeLoopGames/EcoIssues#7450

BlazeGuy2 commented 6 years ago

From @Elliander on April 27, 2018 19:38

Yeah, I noticed this as well. When I host, I see a local IP address and would prefer it if I could designate an alternative location - such as a domain I own.

BlazeGuy2 commented 6 years ago

From @Chi-Yu on May 11, 2018 23:17

Seeing that browser developers are working on warning users more and more about insecure connections and using non-default ports also sometimes triggers security warnings, I'd really like to see this feature implemented.

Also, there are servers behind NAT which reportedly build those links with incorrect IP addresses from the local address space such as 192.168.*.* which of course won't work outside the local network.

Implementing this feature request should also help those people with broken NAT configurations.

BlazeGuy2 commented 6 years ago

From @aawilson on May 18, 2018 22:12

There was a mention in the 7.4.5 update around this, but no mention of any config, has anyone experimented with it and found out what mechanism they used to, quote, "[fix] webserver link from using the wrong address"?

aawilson commented 6 years ago

Not sure why this gets moved to the suggestion box. It is a bug, as far as anyone who works with webservers on a regular basis is concerned. But whatever helps you organize.

Chi-Yu commented 6 years ago

As long as the server reports an appropriate IP address and port which work in the player's browser (firewall issues aside), why would it be a bug? It's merely a missing feature that a specific group of people would like to see.

aawilson commented 6 years ago

For one thing, it doesn't necessarily do that. There are plenty of setups where the IP address accessible to the player is not calculable server-side, thanks to the nature of web. The server I play on has this problem, even with the "fix" in 7.4.5: It uses the IP address that the A record points to, and thus does use the IP address that the users would connect to, but the server in question is a vhost setup that uses the Host header to distinguish between the vhosts and proxy appropriately. When it receives the bare IP, it serves a default vhost, and not Eco. This is typically resolved by either accepting a Host header equivalent, or by allowing a specific hostname to be specified in server config (or both, like in the case where you want to accept a Host header, but whitelist it with a default so people can't spoof it for things like generating email links)

BurningEnlightenment commented 6 years ago

I would also like to see this, because I have an nginx acting as TLS reverse proxy in front of my dockerized eco server.

@SeanAtr0n @metachronism do you think this would be a suitable first contribution task? Would you accept a pr regarding this?

shadow7412 commented 4 years ago

I'm thinking about starting up another eco server. Has there been any thoughts about this, or has it fallen to the bottom of the backlog?

mirasrael commented 4 years ago

It is already implemented as WebServerUrl in server network settings

shadow7412 commented 4 years ago

Yep, I just confirmed this. There's no mention of it currently in Network.eco or Network.eco.template. I'm not sure if it's on the UI because I'm running the server in a headless linux server. Thanks :)