2

Is it possible to restrict HTML5 WebSocket to a LAN network?

For example, I would have a live website, at http://example.com, and all users on the same local network would need to be treated as a group. Similarly, these same users would NOT be able to see or affect any actions of users outside of the LAN.

I have looked into wrappers such as NowJS, and this has built-in support for "groups", but I'm not sure if this is what I'm after.

Any ideas?

4

1 回答 1

1

如果您有权访问用户的 IP 地址,则可以检查前三个段是否相同并将其用作分组标准。但我想这可能只适用于没有 NAT 的办公室局域网。

于 2011-08-11T09:53:05.983 回答