小太
4f6a3e9c36
Merge remote-tracking branch 'upstream/master' into tournaments-frontend
...
Conflicts:
package.json
2014-03-10 12:15:35 +11:00
Guangcong Luo
e2b57563a6
Optimized team sending
...
Teams are now sent using our new packTeam/unpackTeam code, rather
than JSON. This compresses teams from an average of 2000 bytes to
an average of 500 bytes.
2014-03-05 23:30:16 -05:00
Tyler Stark
bff353cc58
Second Pass at cleaning up the code. These are pretty safe edits that include adding 0 to decimal values, fixing variables that are declared multiple times, and removing duplicate keys
2014-02-09 23:38:57 -06:00
Tyler Stark
afb3dc0c09
First pass at code quality: adding semicolons.
2014-02-09 20:35:42 -06:00
小太
f9101abbe7
Merge remote-tracking branch 'upstream/master' into tournaments-frontend
...
Conflicts:
package.json
2014-02-03 00:24:23 +11:00
Guangcong Luo
2cf7f32970
Revert "Make team checking asynchronous"
...
This reverts commit a8d63fd791 .
Conflicts:
config/commands.js
2014-01-12 13:49:03 -08:00
Guangcong Luo
9b66292832
Revert "Multiprocess team validator"
...
This reverts commit ce7cc3bf66 .
2014-01-12 13:47:11 -08:00
Guangcong Luo
a39fdd6006
Split off team validation to team-validator.js
...
This is the first step in a refactor to split team validation into
its own process.
2014-01-09 17:35:19 -08:00
Guangcong Luo
7755803f39
Better comments for sockets.js
2014-01-02 22:14:54 -08:00
The Immortal
40bf78a86f
Revert previous change
2013-12-26 23:50:56 -08:00
Guangcong Luo
462f6b138d
Gen 6 formats are no longer beta after Pokebank
2013-12-26 23:09:47 -08:00
小太
d5d179611b
Merge branch 'tournaments' into tournaments-frontend
...
Conflicts:
rooms.js
2013-12-12 18:41:53 +11:00
Guangcong Luo
33c31a41de
Refactor an unnecessary closure
2013-11-13 19:51:42 -08:00
Guangcong Luo
466359023f
Load balance connections to proxy processes
...
Instead of handling all connections in the master process, we now
use Node's cluster module to push them to worker processes. These
worker processes are pretty lightweight and do nothing but proxy
connections so far.
2013-11-13 18:44:44 -08:00
Guangcong Luo
4892e03362
Loosen the ResourceMonitor connection thresholds
2013-09-24 20:00:32 -07:00
Guangcong Luo
6a2add8898
ipbans.txt now supports CIDR format
...
This introduces a new file cidr.js, which handles matching CIDR IP
blocks. It replaces our dependency on node-ip.
The old proxy IP system is also moved to cidr.js.
2013-09-21 14:15:11 -07:00
小太
250aeb3260
Merge branch 'tournaments' into tournaments-frontend
...
Conflicts:
app.js
2013-09-16 16:05:45 +10:00
Guangcong Luo
975d5cf76a
More detailed banned messages
2013-09-15 20:59:47 -07:00
Guangcong Luo
de7d5310e2
IPs listed on Spamhaus's SBL are now locked rather than banned.
2013-09-14 09:12:33 -07:00
Guangcong Luo
d92035acdf
Support Spamhaus DNSBL
...
Now, by default, any IP on the Spamhaus DNSBL list will be automatically
banned.
2013-09-13 10:13:35 -07:00
Guangcong Luo
dcc24cdabd
Show a message to banned users.
2013-09-13 10:13:35 -07:00
Guangcong Luo
ae62e9e737
Update ResourceMonitor to control bandwidth
2013-09-01 02:37:35 -07:00
Joimer
1b0c9da330
Improve CMD command block
2013-08-27 13:11:02 +02:00
Joimer
750720c88f
Move emergency socket message logging to a higher level
2013-08-27 13:05:32 +02:00
Joimer
dcd8009e2c
ResourceMonitor: Fix weird start-up race condition
2013-08-27 11:54:54 +02:00
Joimer
248f425479
Fix ResourceMonitor.countCmd
2013-08-27 11:49:58 +02:00
Joimer
2f3a5d6ab3
Add ResourceMonitor control to cmd command
2013-08-27 11:20:22 +02:00
Joimer
0347866a19
Make sure the IO is totally blocked for a rejected connection
2013-08-27 10:54:57 +02:00
Joimer
24b0721f5f
Proper error logging for emergency mode file logs
2013-08-27 10:23:41 +02:00
Joimer
10a7050c0a
Emergency mode connection logging
2013-08-27 10:20:48 +02:00
Joimer
36db1bc9d4
Memory usage control: Add memory usage report command
...
Admin-only, this command will show you the server's memory usage.
Additionally, you can use ResourceMonitor.sizeOfObject in any
scope to find out how many bytes does an object weigh.
2013-08-16 21:34:01 +02:00
小太
18c52f7b40
Load tournaments/frontend.js from app.js
2013-08-09 17:54:31 +10:00
Guangcong Luo
950eafa544
Fix hole in throttler
...
Previously, /cmd was exempt from the throttler. This allowed an
amplification attack by sending a lot of /cmd's in one message,
which was responsible for the recent DoS attacks.
/cmd is now throttled normally, except for userdetails, which
happens instantly but is limited to once/message, so it can't
be used for anywhere near as much amplification.
2013-07-26 13:45:50 -07:00
Guangcong Luo
73a5ab895c
Consolidate battle initialization
...
Preparing for a battle is now done in User.prototype.prepBattle
2013-07-26 13:45:50 -07:00
Guangcong Luo
cc3aa7d566
Resource Monitor
2013-07-24 21:55:33 -07:00
Guangcong Luo
976ed33c3c
ipbans are now automatically loaded
...
/loadbanlist no longer needs to be called except to update the
banlist.
2013-07-14 18:00:53 -07:00
Guangcong Luo
365e3dbbbc
A lobby room is no longer required to exist
...
Without a lobby room, joining your server will default to displaying
the room list.
2013-07-14 17:59:48 -07:00
Guangcong Luo
a6608e5817
Refactor: Remove typeof ... === 'undefined'
2013-07-14 11:37:01 -07:00
Guangcong Luo
562d1edbba
Refactor: Data is no longer a global
...
It can still be accessed with Tools.data or Tools.mod(mod).data
2013-07-14 11:37:01 -07:00
Guangcong Luo
2a0981fc83
Refactor: sendData no longer a global
...
user.send and connection.send are already abstraction layers over
socket.write, so another abstraction layer is unnecessary.
2013-07-14 11:37:01 -07:00
Guangcong Luo
76530e66ec
Refactor: lockdown now a property of Rooms.global
...
(and no longer a global)
2013-07-13 19:15:31 -07:00
Guangcong Luo
15297f2c0f
Less logging
2013-07-12 22:32:10 -07:00
Guangcong Luo
b4d20a0939
Fix toName and explicitly document its guarantees
2013-06-14 18:04:45 -07:00
Cathy J. Fitzpatrick
6d435a38e4
Get rid of some config settings
2013-06-12 02:12:46 -06:00
Cathy J. Fitzpatrick
9f1f47c4ce
Introduce globals explicitly
2013-06-11 19:14:32 -06:00
Cathy J. Fitzpatrick
c9c9e21c91
Patch over a faye-websocket bug
2013-06-11 17:05:07 -06:00
Cathy J. Fitzpatrick
2a98fd4bb2
Check for another SockJS bug
2013-06-09 02:32:40 -06:00
Cathy J. Fitzpatrick
0d828d5e1a
Fix proxyip code
2013-06-02 18:17:53 -06:00
Cathy J. Fitzpatrick
a3b7850dc6
Fix a proxyip bug
2013-06-02 17:16:04 -05:00
Cathy J. Fitzpatrick
5174e0d939
More sophisticated proxyip feature
2013-06-02 16:10:42 -06:00