spacemeowx2 / slp-server-rust

Switch-lan-play Server written in Rust
https://github.com/spacemeowx2/switch-lan-play
115 stars 16 forks source link

disable graphql? #7

Open htynkn opened 4 years ago

htynkn commented 4 years ago

I try to setup a server. when I access ${ip}:11451, it shows a graphql page.

Is there any way to disable it if I don't want to use admin feature

strikeru97 commented 4 years ago

Same thinking

igromanru commented 4 years ago

There are two possibilities that you can do right now.

  1. Make a fork and disable it by yourself in code.
  2. Use a reverse proxy to overwrite the path.
EsteveSegura commented 4 years ago

Another way to do it is just block TCP port.... iptables -A INPUT -i eth0 -p tcp -m tcp --dport 11451 -j DROP

The whole program still working on UDP

igromanru commented 4 years ago

Another way to do it is just block TCP port.... iptables -A INPUT -i eth0 -p tcp -m tcp --dport 11451 -j DROP

The whole program still working on UDP

It's not a good solution, because you're blocking the information page this way.
The info page it pretty important to see how many people are online. e.g.: http://frog-skins.com:11451/info

EsteveSegura commented 4 years ago

Another way to do it is just block TCP port.... iptables -A INPUT -i eth0 -p tcp -m tcp --dport 11451 -j DROP The whole program still working on UDP

It's not a good solution, because you're blocking the information page this way. The info page it pretty important to see how many people are online. e.g.: http://frog-skins.com:11451/info

You can still using in local, and showing up using another way.... a simple website, for example.

igromanru commented 4 years ago

using another way.... a simple website, for example.

I'm sure it's easier as setup an simple reverse proxy in front of it /s

GreatWizard commented 4 years ago

lan-play.com use the graphql server in order to request info and compute a good ping thanks to WebSockets And there is more info stored in graphql in the future .. like the number of players on each game etc :) so no please don't disable graphql for the queries. You shouldn't block graphql communication for all that purposes.

But I guess the playground page should be optional? And we should avoid mutations from any external connection? idk if it's already the case or not

igromanru commented 4 years ago

or make it accessible via password or something.
I heard space is working on an authentication, so it would be nice if it would be accessible via the same credentials.