I've seen some requests about restricting websocket users to certain ports, so this module allows you to do just that. Don't forget to read the wiki page
on Unreal's websocket support first. ;]
Since websocket support for non-SSL ports works right out of the box, you're going to need a new listen block for non-SSL connections from websocket users. I used port 8080 in my case, but you can really use as many as you want.
Example config blocks:
Code: Select all
//port 8443; // If you have an SSL listen block too
Now, if any websocket users connect to a port that isn't 8080
their IP will get GZ:Lined for the amount of seconds specified with zlinetime
(defaults to 60). The other way around is true as well; regular clients connecting to a websocket port will be awarded the same GZ:Line. I originally had to do that for websocket users because they aren't fully online yet, so the special frames wouldn't be formed and sent. This resulted in the client sending the GET command about 5 times and that resulted in 5 snotices too. =] I did the same for regular clients to remain consistent.
I may (will probs) add more possibilities for restrictions. =]
Get it here