Skip to content

Commit 9486138

Browse files
committed
[CI-SKIP] Add technical diagrams
1 parent 65a379c commit 9486138

3 files changed

Lines changed: 105 additions & 6 deletions

File tree

CONTRIBUTING.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Contributing Guide
2+
3+
## Architectural overview
4+
5+
```mermaid
6+
graph TB
7+
subgraph "Minecraft Server Platforms"
8+
SPIGOT["Spigot/Paper<br/>(Bukkit Module)"]
9+
BUNGEE["BungeeCord<br/>(Proxy Module)"]
10+
VELOCITY["Velocity<br/>(Velocity Module)"]
11+
end
12+
13+
subgraph "FastLogin Core"
14+
CORE["FastLoginCore<br/>Main Logic Engine"]
15+
SESSION["LoginSession<br/>Session Management"]
16+
AUTH["AuthPlugin Hook<br/>Auth Integration"]
17+
RESOLVER["ProxyAgnosticMojangResolver<br/>Profile Resolution"]
18+
STORAGE["SQLStorage<br/>Database Layer"]
19+
ANTIBOT["AntiBotService<br/>Rate Limiting"]
20+
end
21+
22+
subgraph "Bedrock Support"
23+
FLOODGATE["FloodgateManagement<br/>Bedrock Players"]
24+
GEYSER["GeyserService<br/>Geyser Integration"]
25+
BEDROCK["BedrockService<br/>Base Service"]
26+
end
27+
28+
subgraph "External Services"
29+
MOJANG["Mojang API<br/>api.mojang.com"]
30+
SESSION_SERVER["Session Server<br/>sessionserver.mojang.com"]
31+
DATABASE[(SQL Database<br/>MySQL/SQLite)]
32+
end
33+
34+
subgraph "Async Processing"
35+
SCHEDULER["AbstractAsyncScheduler<br/>Thread Pool Management"]
36+
end
37+
38+
subgraph "Messaging"
39+
MESSAGES["ChannelMessage<br/>Proxy Messages <br/>(i.e. BungeeCord)"]
40+
NAMEKEY["NamespaceKey<br/>Message Routing"]
41+
end
42+
43+
SPIGOT -->|loads| CORE
44+
BUNGEE -->|loads| CORE
45+
VELOCITY -->|loads| CORE
46+
47+
CORE -->|manages| SESSION
48+
CORE -->|uses| AUTH
49+
CORE -->|resolves profiles| RESOLVER
50+
CORE -->|persists data| STORAGE
51+
CORE -->|checks rate limits| ANTIBOT
52+
CORE -->|handles bedrock| FLOODGATE
53+
54+
FLOODGATE -->|extends| BEDROCK
55+
GEYSER -->|extends| BEDROCK
56+
57+
RESOLVER -->|queries| MOJANG
58+
RESOLVER -->|verifies| SESSION_SERVER
59+
60+
STORAGE -->|connects to| DATABASE
61+
62+
CORE -->|schedules async| SCHEDULER
63+
64+
MESSAGES -->|uses| NAMEKEY
65+
CORE -->|sends via| MESSAGES
66+
67+
AUTH -.->|delegates to| SPIGOT
68+
AUTH -.->|delegates to| BUNGEE
69+
70+
ANTIBOT -->|rate limits| RESOLVER
71+
```

README.md

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,42 @@ Development builds contain the latest changes from the Source-Code. They are ble
3232
but also include features, enhancements and bug fixes that are not yet in a released version. If you click on the left
3333
side on `Changes`, you can see iterative change sets leading to a specific build.
3434

35-
~~You can download them from here: [CodeMC(Jenkins)](https://ci.codemc.org/job/Games647/job/FastLogin/)~~
36-
37-
Currently broken due changed usernames. Download it from [here](https://github.com/TuxCoding/FastLogin/releases)
38-
39-
35+
You can download them from here: [CodeMC(Jenkins)](https://ci.codemc.org/job/Games647/job/FastLogin/)
4036

4137
***
4238

39+
## Technical Authentication
40+
41+
```mermaid
42+
sequenceDiagram
43+
autonumber
44+
participant C as Client
45+
participant S as Server
46+
participant M as Mojang
47+
48+
C->>S: LOGIN_START (name)
49+
Note over S: DB: check if username is saved as premium
50+
S->>C: ENCRYPTION_REQUEST
51+
Note right of C: Offline clients terminates connection here
52+
Note right of C: In Offlinemode: LOGIN_SUCCESS is sent directly
53+
54+
rect rgb(240, 240, 240)
55+
C->>M: POST /session/minecraft/join
56+
C->>S: ENCRYPTION_RESPONSE
57+
Note right of C: Client starts encrypting
58+
end
59+
60+
Note over S: Decrypt and verify token
61+
S->>M: GET /hasJoined (async)
62+
M->>S: {uuid, name, skin}
63+
64+
Note over S: Server encrypts traffic
65+
Note over S: Inject skin and premium UUID
66+
S->>S: Re-inject LOGIN_START(name)
67+
68+
S->>C: LOGIN_SUCCESS
69+
```
70+
4371
## Commands
4472

4573
/premium [player] Label the invoker or the argument as paid account

bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/ConnectListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public void onServerConnected(ServerConnectedEvent serverConnectedEvent) {
235235

236236
// delay sending force command, because Paper will process the login event asynchronously
237237
// In this case it means that the force command (plugin message) is already received and processed while
238-
// player is still in the login phase and reported to be offline.
238+
// player is still in the login phase and reported to be offline
239239
Runnable loginTask = new ForceLoginTask(plugin.getCore(), player, server, session);
240240
plugin.getScheduler().runAsync(loginTask);
241241
}

0 commit comments

Comments
 (0)