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

Differentiate between 'regular' offline-mode and offline-mode due to BungeeCord #51

Open
lucko opened this issue Jan 14, 2018 · 11 comments

Comments

@lucko
Copy link

lucko commented Jan 14, 2018

The "Online mode" statistic is a really nice thing to be able to refer to, however, it's usefulness is limited as the statistic doesn't truly represent the state. Servers which use BungeeCord will report as being 'offline' - when in most cases, they're are in fact authenticating, just via the proxy.

I notice the setting is currently represented by an integer (although I assume it may be converted to a boolean at some point internally??):
https://github.com/BtoBastian/bStats-Metrics/blob/master/bstats-bukkit/src/main/java/org/bstats/bukkit/Metrics.java#L215

Perhaps a third value could be added there using a value of 2 for Offline due to BungeeCord.

This would mean 'Online mode' would have the following possible values:

  • Online
  • Offline
  • Offline (BungeeCord)
@Bastian
Copy link
Owner

Bastian commented Jan 14, 2018

The problem is, that there's no reliable way to check if a server is running behind a Bungeecord proxy or not.

@lucko
Copy link
Author

lucko commented Jan 14, 2018

boolean isBungee = Bukkit.getServer().spigot().getConfig().getBoolean("settings.bungeecord", false);

@RadBuilder
Copy link

RadBuilder commented Jan 14, 2018

@lucko Still not a reliable way to check. The option can be false while using or not using BungeeCord.

@lucko
Copy link
Author

lucko commented Jan 14, 2018

Without the option set, your server effectively is running in offline mode, as the server doesn't attempt to authenticate itself, and it doesn't use the data forwarded by the proxy.

It absolutely is reliable.

In the case given above:

  • Online --> The server is authenticating itself.
  • Offline --> The server is not authenticating, at all.
  • Offline (Bungee) --> The server may or may not be authenticating, but we do at least know it's running behind a proxy - not just plain offline mode.

@ghost
Copy link

ghost commented Jan 14, 2018

my server in offline mode behind bungee with bungeecord true 🤔

@ryantheleach
Copy link

There's an additional issue that the server may be vanilla forge and entirely trusting bungee to auth.

But having at least some measure is better then none, but it would take a long, long time for the stats to correlate as people updated.

@Bastian
Copy link
Owner

Bastian commented Jan 15, 2018

That's indeed an other problem: If I change it now, the chart would be completely useless for quite a long time

  • Online -> Normal server with online mode true
  • Offline -> Maybe a server which uses an old bStats version and is behind a bungeecord, maybe it's not authenticated at all and maybe it's behind a bungeecord but hasn't the option enabled.
  • Offline (Bungeecord) -> The server may or not be authenticated, but at least it seems like it's using Bungeecord

I would rather create a new "Uses Bungeecord" pie-chart than modifying the old one. That's doesn't solve the issue with the online-mode chart ofc. and it may also contain false-positives.

@lucko
Copy link
Author

lucko commented Jan 15, 2018

If I change it now, the chart would be completely useless for quite a long time

You're effectively saying: I'm not going to bother to ever update my software because some people won't update to the new versions. In my opinion that is totally crazy. :)

A new chart will kind of solve it, but I still think it's less useful.

The aim is to be able to see the distribution of online mode servers to offline mode servers - without the added interference from offline mode due to a proxy. Adding a separate chart for Bungee/Not Bungee doesn't really solve that.

You're right, for a while the data won't be representative, but it's not representative at the moment either! (hence the reason for this issue) As more people update their bStats version, the data will become more accurate.

@ryantheleach
Copy link

Adding a chart for Bungee/Not Bungee would effectively solve it. As you can have the new counts that would be a somewhat accurate sample (disregarding biases)

As more things update, the sample size merely gets larger. You could always add a onlinemode-nobungee and a offlinemode-nobungee to that same new chart, and get the information you are looking for but in a smaller sample.

@ryantheleach
Copy link

ryantheleach commented Jan 18, 2018

@o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o It would be more for global tracking then anything, doesn't necessarily have to show on your plugins page.

If you would like to have things hidden from your plugins page, I suggest you make a separate issue allowing the customization of plugin pages.

Also, did you really need to choose an intentionally disruptive github username?

@Phoenix616
Copy link

There is another possible way to detect whether or not a server is using online-mode or offline-mode:
The UUID of a player which will always be a version 4 UUID for online-mode and a version 3 UUID for offline-mode. This requires at least one player being logged in though or some kind of accessing of the player files/cache.

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

No branches or pull requests

8 participants
@ryantheleach @Bastian @Phoenix616 @lucko @RadBuilder and others