Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2016-06-30 12:22:21

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Message whitelist vs blacklist

So I tested around a bit and, as many probably know/guessed, it's not possible to sent custom messages.
Example:
connection.send("test", "hello");
Will never arrive at any client.

My question:
Why is the message broadcasting check a whitelist instead of blacklist?

Difference between white/blacklist

I do understand it's probably way too hard/much work to change the whitelist into a blacklist at this point, but I was just curious.
The reason why is because I think there are some nice things you can do with bots if you can let them communicate with each other "secretly" instead of having to place coins in a certain pattern to encode the message "Hello c:".

Offline

#2 2016-06-30 13:24:25, last edited by hummerz5 (2016-06-30 13:29:42)

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,853

Re: Message whitelist vs blacklist

Well, you should take a look at the PlayerIO server examples... strictly speaking, either one can be arranged. I think it's more naturally secure to have your "whitelist" situation. The server will only ever send information it has verified, or at least expects to float by.

meanwhile, in a "blacklist" situation, every valid message the server sends and the client is prepared to receive would have to have a special exception to prevent being falsified.

Strictly IMO, it's easier to have a whitelist where errors just mean it doesn't work, as opposed to a blacklist, where errors mean "security" loophole.

edit: at the same time, you could ask "why isn't there an open channel at all?" because all the dev would have to do in a blacklist situation to make things harmless, is to allow "public_bot" packets to be broadcast, for example.

I don't know. Perhaps they just don't see it as a viable step? I could see someone abusing that and flooding the broadcast, but then the server could just cut them off. perhaps it's just not fruitful.

Offline

#3 2016-06-30 23:13:04

XxAtillaxX
Member
Joined: 2015-11-28
Posts: 4,202

Re: Message whitelist vs blacklist

I wouldn't be surprised if this happens; the direction has always steadily increased towards destroying any creativity for non-trivial problem solving, with the sole miraculous exception of switches.


signature.png
*u stinky*

Offline

#4 2016-07-01 12:11:19

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: Message whitelist vs blacklist

hummerz5 wrote:

edit: at the same time, you could ask "why isn't there an open channel at all?" because all the dev would have to do in a blacklist situation to make things harmless, is to allow "public_bot" packets to be broadcast, for example.

This was kinda what I thought about while reading your post, yes. It would be minimal effort, and since you can (technically) pass an infinite amount of parameters, the first parameter can be your custom type, and all the rest actual parameters, problem solved?

hummerz5 wrote:

I could see someone abusing that and flooding the broadcast

The clients won't listen to these messages, so it won't increase any lag. And if you're afraid of server-load instead: You can already spam a million messages to the server, even the block placing ones. They just aren't sent through to the clients, so server load won't be a problem.

XxAtillaxX wrote:

the direction has always steadily increased towards destroying any creativity for non-trivial problem solving, with the sole miraculous exception of switches.

Would personally not agree to that (though they haven't always helped either). But that discussion is for another topic.

Off-topic: I noticed I can now close the topic myself... Maybe I should watch other sections of the forums too...

Offline

#5 2016-07-01 12:45:49

DarkDragon4900
Member
Joined: 2015-03-17
Posts: 251

Re: Message whitelist vs blacklist

It's all in the server. If you were to edit the serverside code and add your custom message to it so it broadcasts it to everyone, it would work. But you could use existing messages to send whatever kind of message you're trying to send, just as it is possible (and been proven to be possible, obviously) to send files over EE, using normal messages. In this case, block messages.

Offline

#6 2016-07-01 13:22:16

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,853

Re: Message whitelist vs blacklist

@den RE server load
I feel like this might just tie into however playerIO chooses to handle that sort of stuff. I mean, they limit a message response to like 200 ms or something. Do they limit how many messages in total (as a rate)?

Would it not be possible for misuse to come from simply plugging the server on the outbound train? I mean, you've got someone with an OK internet flooding the server, which then has to broadcast to (say) 40 other people. I guess the server probably has that capability though.

Another possibility: I have 1.5 mbps download speed. Or whatever. If someone uploads any more than that, they'd be outpacing me, right? Then the game would lose connection.

Offline

#7 2016-07-01 18:07:20

Zumza
Member
From: root
Joined: 2015-02-17
Posts: 4,656

Re: Message whitelist vs blacklist

why not just pm the bots?


Everybody edits, but some edit more than others

Offline

#8 2016-07-01 18:11:22

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,853

Re: Message whitelist vs blacklist

^Well uh

hmm

/thread then I guess

Offline

#9 2016-07-01 20:27:42, last edited by Tomahawk (2016-07-01 20:27:58)

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

Re: Message whitelist vs blacklist

PMing would just be a bad substitute. Imagine having to send and then parse messages made up of different combinations of strings, ints, byte arrays and bools - annoying af.

If EE's gonna grow, with unity around the corner, it might as well be able to handle increased traffic amounting to a DoS.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

#10 2016-07-01 21:22:27

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,853

Re: Message whitelist vs blacklist

Well, that's one way to think about it. I'd think we'd just encode everything to Base64 and string them along. Kinda UDPish

Actually, it wouldn't be too hard to write a PlayerIO Message-to-Base64 function.

Unity != Increased traffic, but I get where you're going

Offline

#11 2016-07-01 21:29:08

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: Message whitelist vs blacklist

DarkDragon4900 wrote:

It's all in the server. If you were to edit the serverside code and add your custom message to it so it broadcasts it to everyone, it would work. But you could use existing messages to send whatever kind of message you're trying to send, just as it is possible (and been proven to be possible, obviously) to send files over EE, using normal messages. In this case, block messages.

Don't messages get blocked when the parameters are invalid?

hummerz5 wrote:

I mean, they limit a message response to like 200 ms or something. Do they limit how many messages in total (as a rate)?

Is that for all messages? Even move messages and stuff? I thought it was EE server-side to prevent chat spam.
Because there's no delay required between a normal chat message and a PM chat message (right?)

Offline

#12 2016-07-01 21:31:07, last edited by hummerz5 (2016-07-01 23:23:21)

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,853

Re: Message whitelist vs blacklist

den3107 wrote:

Don't messages get blocked when the parameters are invalid?

I think they either check the params and ignore it for inconsistencies, or they get server-side runtime errors. Either way, it's not so much actively "blocked" as ignored.

den3107 wrote:

Is that for all messages? Even move messages and stuff? I thought it was EE server-side to prevent chat spam.

Sorry, I didn't explain well. [IIRC*] PlayerIO limits the execution time for messages.

edit: I guess I could make a game and test how long it'll let me execute... but eh
edit2: isn't the whole converting to base64 awfully similar to what PlayerIO already does to facilitate connections? Run down the messages, decide what data type it is, convert it to .. binary? dunno

Imagine having to send and then parse messages made up of different combinations of strings, ints, byte arrays and bools - annoying af

Well if that's all that's holding you back, I wrote a neat little PioC.Message - to - base64 class. All the bot has to do is split and send 'em. Although, it could probably be improved with START/END signals... and maybe message #/length... but it's existing! //forums.everybodyedits.com/img/smilies/big_smile

Offline

#13 2016-07-02 11:41:25, last edited by DarkDragon4900 (2016-07-02 12:49:52)

DarkDragon4900
Member
Joined: 2015-03-17
Posts: 251

Re: Message whitelist vs blacklist

den3107 wrote:
DarkDragon4900 wrote:

It's all in the server. If you were to edit the serverside code and add your custom message to it so it broadcasts it to everyone, it would work. But you could use existing messages to send whatever kind of message you're trying to send, just as it is possible (and been proven to be possible, obviously) to send files over EE, using normal messages. In this case, block messages.

Don't messages get blocked when the parameters are invalid?

They do because the purpose of the server is to receive the messages, read their type and parameters and decide what to do with them. The serverside code has a switch (message.Type) pretty much similar to that in a client, where it broadcasts the received messages to everyone in the room or sends it to a specific person, (or does other things with it).
But I guess that they could simply add something like Broadcast(m.Type, params object[] parameters);
It's easy to make a playerio server to see how it works. Maybe you should give it a try.

e.g.

Oh and no, it just sends the message to everyone else. I'm not aware of how it sends it but it doesn't convert it to binary. Unless it's done deep within the Game Library.dll

Offline

#14 2016-07-02 14:00:28

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,853

Re: Message whitelist vs blacklist

DarkDragon4900 wrote:

Unless it's done deep within the Game Library.dll

or deep within the computer it's running on. :B (At some point, it'll be binary to send)
Idk. Just reading through some community remakes of the client suggested some pretty deep stuff, just not quite binary I suppose. Something about an API request to a web page. Never did quite figure that out.

Offline

#15 2016-07-02 14:45:36

AlphaJon
Member
From: Who knows
Joined: 2015-07-21
Posts: 1,297

Re: Message whitelist vs blacklist

There are no custom messages, because if you play from the flash, you can't send them, and the client would just throw the custom messages away becaise it doesn't know what to do with them.
So the only way to communicate via custom messages would be bot to bot or custom client, so you can easily see how this isn't useful for gameplay.

Offline

#16 2016-07-02 21:50:57

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: Message whitelist vs blacklist

DarkDragon4900 wrote:
smart stuff

That's exactly what I insinuated, and I actually had looking into server setup examples to try and find a way to send custom messages.

AlphaJon wrote:

There are no custom messages, because if you play from the flash, you can't send them, and the client would just throw the custom messages away becaise it doesn't know what to do with them.
So the only way to communicate via custom messages would be bot to bot or custom client, so you can easily see how this isn't useful for gameplay.

The whole point of the concept is for easy bot-to-bot communication, where some bot ideas could really benefit from this concept to create quite fun gamemodes, making it actually useful for gameplay, just indirectly.

How would people feel to poll and see if the people on this sub-forum would like such a reserved "bot" message type? Perhaps just maybe they'll do something with it.

Offline

#17 2016-07-02 22:09:51

AlphaJon
Member
From: Who knows
Joined: 2015-07-21
Posts: 1,297

Re: Message whitelist vs blacklist

den3107 wrote:

The whole point of the concept is for easy bot-to-bot communication, where some bot ideas could really benefit from this concept to create quite fun gamemodes, making it actually useful for gameplay, just indirectly.

How would people feel to poll and see if the people on this sub-forum would like such a reserved "bot" message type? Perhaps just maybe they'll do something with it.

I don't know, if you feel like needing bots on both sides for it, it leaves the scope of EE, because nothing happens ingame.

Offline

#18 2016-07-02 22:25:41

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,853

Re: Message whitelist vs blacklist

den3107 wrote:

How would people feel to poll and see if the people on this sub-forum would like such a reserved "bot" message type? Perhaps just maybe they'll do something with it.

lol I just ask people to tell me they exist and I got like < 5 people. So I hope your poll works out better.

Instead of the classic lobby-and-forget, perhaps you could have the demand-builds-up and /then/ lobby-and-remember. Long story short, I don't think you have more than a couple of people who want the feature. But, if you sold it to them etc

Offline

#19 2016-07-03 11:02:53, last edited by DarkDragon4900 (2016-07-03 11:04:15)

DarkDragon4900
Member
Joined: 2015-03-17
Posts: 251

Re: Message whitelist vs blacklist

AlphaJon wrote:

There are no custom messages, because if you play from the flash, you can't send them, and the client would just throw the custom messages away becaise it doesn't know what to do with them.
So the only way to communicate via custom messages would be bot to bot or custom client, so you can easily see how this isn't useful for gameplay.

As I mentioned earlier, you can send custom messages but you cant receive them. The server doesn't know what to do with them.
And it would be rather useful. We could use multiple bots for BALs instead of one.

Anyway, the only way we can send custom messages through EE atm is to use the existing messages to send our own.

Offline

#20 2016-07-03 14:45:35

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,853

Re: Message whitelist vs blacklist

DarkDragon4900 wrote:

We could use multiple bots for BALs instead of one

I think the key here is that you could use multiple bots from other computers without having to bring up your own network connection/port/whatever. PlayerIO would handle the connecting. That's really the only benefit.

Really, we could go around swapping IPs and ports to get the same effect, but I'm not sure about the security implications

Offline

#21 2016-07-03 15:44:38

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

Re: Message whitelist vs blacklist

Or set up some external server for bots to communicate through.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

#22 2016-07-03 16:07:15

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,853

Re: Message whitelist vs blacklist

Tomahawk wrote:

Or set up some external server for bots to communicate through.

Oh yeah, that'd probably be easier.

Well, I guess we solved this mystery 100%. If someone's partial to PlayerIO, then set up a playerIO server using the same Room IDs that bots connect to, forward all messages. /thread (second time)

Probably could throw them all into one room, even.

Offline

hummerz51467558435611040

Board footer

Powered by FluxBB

[ Started around 1732426584.4382 - Generated in 0.162 seconds, 12 queries executed - Memory usage: 1.74 MiB (Peak: 2.01 MiB) ]