Graham
f3b7b8d07a
Remove urgent requests from prefetch queue
...
This stops us from responding twice if a prefetch request is upgraded to
urgent by the client.
Signed-off-by: Graham <gpe@openrs2.org>
5 months ago
Graham
e3a73291a9
Verify usernameHash and serverKey match
...
Signed-off-by: Graham <gpe@openrs2.org>
9 months ago
Graham
6d43e0392e
Add initial GAMELOGIC packet support
...
Signed-off-by: Graham <gpe@openrs2.org>
9 months ago
Graham
651b2f8b5f
Update Guice
...
Signed-off-by: Graham <gpe@openrs2.org>
9 months ago
Graham
9d3282ca3a
Simplify reference counting in Js5Service
...
Spotted by Polar.
Signed-off-by: Graham <gpe@openrs2.org>
1 year ago
Graham
4ef349d0ac
Add CoroutineExceptionHandler to LoginChannelHandler
...
Signed-off-by: Graham <gpe@openrs2.org>
2 years ago
Graham
db1ecf3c00
Read after sending ExchangeSessionKey to the client
...
We're expecting GAMELOGIN to be sent after exchanging the session key.
Signed-off-by: Graham <gpe@openrs2.org>
2 years ago
Graham
c0056f9cb1
Update kotlinter
...
Signed-off-by: Graham <gpe@openrs2.org>
2 years ago
Graham
dc8fcd09f6
Flesh out LoginChannelHandler
...
This commit adds initial support for negotiating the ISAAC session key,
creating accounts, and checking world suitability.
Signed-off-by: Graham <gpe@openrs2.org>
2 years ago
Graham
e2ceef0a32
Fix case
...
Signed-off-by: Graham <gpe@openrs2.org>
2 years ago
Graham
851ef8e4e9
Separate LoginResponse and Js5LoginResponse
...
I'm currently working on a CreateResponse class, which is even more
distinct from LoginResponse - so I've decided to separate it. For
consistency, separating the JS5 login responses seems sensible too.
Signed-off-by: Graham <gpe@openrs2.org>
2 years ago
Graham
4c309a0f50
Split protocol packages into upstream/downstream packages
2 years ago
Graham
73defefef4
Create codecs with dependency injection
...
This will allow the RSA private key to be injected in the login packet
codec.
2 years ago
Graham
c43d48f71b
Rename LOGIN_DOWNSTREAM_JS5REMOTE to JS5REMOTE_DOWNSTREAM
...
I've also removed the comment - I'm going to have to do something
similar for CREATE_DOWNSTREAM, and I think it's a bit more obvious with
the more distinctive name.
2 years ago
Graham
0c2108d750
Add separate Protocol for INIT_JS5REMOTE_CONNECTION responses
...
This allows us to deal with a single corner case of the same opcode
being used for two slightly different login response packets, depending
on the request.
2 years ago
Graham
67f3dbaf57
Update dependencies
...
Signed-off-by: Graham <gpe@openrs2.org>
2 years ago
Graham
660c12676e
Only remove handlers from pipeline if future is successful
...
If the future is not successful the channel may have been closed. The
pipeline of a closed channel is empty, so attempting to remove handlers
from it would cause an exception.
Signed-off-by: Graham <gpe@openrs2.org>
2 years ago
Graham
f38253f2fc
Add else branch to non-exhaustive when statements
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
85f497f619
Treat a world list checksum of 0 as 1
...
This fixes a 1 in 2^32 chance that we'll fail to fetch the world list on
startup.
Of course, updating the player counts will still be borked if we get a
collision, but at least the client won't break entirely.
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
8ff91b5ee2
Implement world list packet
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
3889c8a034
Terminate all threads if the server fails to bind to a port
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
21cf2526c5
Format Http.kt
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
65194fae43
Rename poll to removeFirstOrNull
...
This is more consistent with the Kotlin standard library.
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
493886a8bd
Improve error messages in CrossDomainChannelHandler
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
a50e0ea998
Restrict supported HTTP methods
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
a8d048de00
Remove pipelining support from the crossdomain handler
...
It isn't necessary.
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
86a84c6986
Serve .jar files with the correct MIME type
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
89f7a192f9
Optimise inbound message matcher creation
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
29693a39cf
Add timeout support for all services on the RS2 port
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
a43e98e8f4
Add HTTP keep-alive support
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
03fc499566
Improve robustness of reference counting in JaggrabChannelHandler
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
620808cb97
Improve the HTTP implementation
...
This commit adds support for:
* Version negotiation.
* HEAD requests.
* Friendly error messages.
* More robust reference counting.
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
92a01b6262
Add cross-domain policy support
...
Required by the most recent versions of the Java plugin (before it was
killed).
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
440711def0
Fix JAGGRAB request parsing
...
The paths aren't prefixed with a slash, unlike HTTP.
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
fbb9694feb
Close JS5 connection if an invalid file is requested
...
This mimics the behaviour of the OSRS server.
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
bc018a3b0f
Add initial JAGGRAB, JS5 and HTTP servers
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago