Commit graph

220 commits

Author SHA1 Message Date
Anon
ff9aa62702 Add configurable authlib-injector API path and HTTP support for Yggdrasil auth
Re-implements the changes from PR #2890, adapted for the current codebase
which uses System.Text.Json.Nodes and HttpClient instead of the legacy
Json.JSONData and hand-rolled SslStream HTTP client.

Changes:
- Settings.cs: Convert AuthlibServer from struct to class with
  [TomlDoNotInlineObject]; convert Host to a property that parses
  'host:port' syntax; add AuthlibInjectorAPIPath (default '/api/yggdrasil')
  for servers that use a different prefix (e.g. Drasl uses '/authlib-injector');
  add UseHttps (default true) so local/dev auth servers without TLS work.

- ConfigComments.resx: Add descriptive inline comments for the new
  AuthlibServer fields (Host, Port, AuthlibInjectorAPIPath, UseHttps).

- ProtocolHandler.cs: Replace three hardcoded '/api/yggdrasil/...' paths
  with AuthlibInjectorAPIPath-based paths (authenticate, refresh, join).
  Replace hand-rolled TcpClient+SslStream HTTP in DoHTTPSRequest with
  HttpClient+SocketsHttpHandler (ConnectCallback routes through ProxyHandler).
  Add useHttps parameter so HTTP-only auth servers are supported.

- KeyUtils.cs: Add AuthServerSupportsProfileKeys() that fetches the
  authlib-injector metadata endpoint and checks feature.enable_profile_key.
  Update GetNewProfileKeys() to skip key fetch when the auth server does not
  support profile keys; build the cert URL dynamically using AuthlibInjectorAPIPath
  for Yggdrasil; always fetch real certs instead of returning a dummy response.
  Remove MakeDummyResponse() which is no longer needed.

Tested against a local Drasl instance with authlib-injector 1.2.7 on a
1.21.11 Minecraft server — full auth flow (login, profile key fetch, session
join) confirmed working end-to-end.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 00:15:32 +01:00
Anon
4fb4c018e4
Merge pull request #2781 from a08381/authlib-multi-user 2026-03-22 16:36:20 +01:00
Anon
5b9cc4aa0e Tested the client against 1.21.11 on .net 10. Created a integration testing skill (end-to-end). 2026-03-21 21:02:13 +01:00
Anon
8b20973b02 Temporarily removed WebSocket bot because of a false positive virus detection. I will make it in to a standalone bot later. 2025-05-22 13:56:27 +02:00
a08381
efe23eb1f9 add Yggdrasil authlib multi-user selection. 2024-08-11 01:43:46 +08:00
breadbyte
08551097c6
Add Sentry Error Tracking (#2670)
* Add Sentry Error Tracking

* Omit personally identifiable information and add additional sentry context

* Remove debug message

* Make sentry opt-out and add related notices and strings

Also add Minecraft Version to error context

* Update build to send release info to sentry

* Adjust sentry error tracking

- Send the user-friendly Minecraft Version in the error logs
- Capture exceptions in more parts of the application

We now capture exceptions from the following locations:
- Protocol18 (1.8+) Packet errors
- Errors during client initialization phase (When client is about to start, session keys are NEVER sent to sentry)

* Make Sentry DSN configurable and repository-specific

The Sentry DSN will automatically be filled out on the main repository through the Github Actions build.

* Update build-and-release.yml

Update sed command

* style: change variable name

nitpick, just to make it a little bit more descriptive

* Add Sentry branding in README.

* remove old code (merge conflict)
2024-06-22 06:41:13 +08:00
yaggod
d0caf4c9ee fixed typo in word heAlper lol 2024-04-16 21:21:08 +03:00
Polaris_Light
a97096cddf ImplPlayerSection 2023-11-16 00:04:56 +08:00
Polaris_Light
3c97193b70 AddYggdrasilLogin 2023-11-12 21:04:20 +08:00
ReinforceZwei
a8200b6e14
Add setting for allowing non-English name in player list (#2556)
Non-vanilla server may have player name other than English, for example Chinese server can have player name in Chinese. This setting allow MCC to display those non-English name in the player list.
2023-08-02 14:00:11 +08:00
Anon
1efa55206f Re-added WebSocketChat bot and improved it, no longer using WebsocketSharp library 2023-05-27 19:46:28 +02:00
Anon
413cb1860d Implemented Items Collector bot 2023-05-20 21:44:18 +02:00
BruceChen
3735cab9dd Fix 1.19.3 message signature issue 2023-01-29 22:39:11 +08:00
ReinforceZwei
cc92cd66d4 Switch to https for translation file download 2023-01-19 18:20:45 +08:00
BruceChen
92a911ce99 Disable forge by default 2023-01-16 14:47:17 +08:00
BruceChen
ced65122f1 Trim 2023-01-14 21:07:09 +08:00
BruceChen
ba0d9ba3fc merge brigadier-dev into milutinke:1.19.3 2023-01-14 20:42:15 +08:00
BruceChen
fe0b268878 1.19.3 Message signing support. 2023-01-13 16:12:10 +08:00
BruceChen
7ee08092d4 legacy color support 2022-12-14 14:45:51 +08:00
BruceChen
94a3c92b36 Bug fix 2022-12-11 16:30:45 +08:00
BruceChen
5e11ed3896 Tooltip support & Bug fix 2022-12-11 13:00:19 +08:00
BruceChen
28827b720a Support downloading updates via command. 2022-12-01 22:55:48 +08:00
BruceChen
2331590588 Store the text resources of the setting file separately. 2022-11-30 16:22:48 +08:00
breadbyte
bde5f76d62
add en-us to available languages
fixes #2341
2022-11-16 12:51:49 +08:00
BruceChen
5a540f646c Update doc 2022-11-07 11:15:19 +08:00
BruceChen
0b5a562f7f [SKIP_DEPLOY] Support account alias in configs 2022-11-06 16:20:38 +08:00
BruceChen
c0266685a8 Fix ServerList bug again 2022-11-05 21:30:15 +08:00
BruceChen
fc30e38e78 Fix ServerList bug 2022-11-05 21:15:16 +08:00
BruceChen
ae23ead4c3 [SKIP_BUILD] FIx "/reco" and "/connect" not working properly 2022-11-05 20:27:10 +08:00
BruceChen
e954801a0d Fix AutoDig 2022-11-01 16:37:50 +08:00
BruceChen
077e3a5e9f
Crowdin localization support (#2310)
* Switching to use resource files

* Update Crowdin configuration file

* Code cleanup
2022-10-28 11:13:20 +08:00
BruceChen
4925689496
Revert "Added the Web Socket Chat Bot" 2022-10-25 16:23:25 +08:00
Anon
477da50fe0
Merge branch 'master' into rpc 2022-10-24 20:45:40 +00:00
Milutinke
1272ffda0b Added a Telegram Bridge chat bot. 2022-10-24 15:35:24 +02:00
BruceChen
d4f8dd0bfb Upgrade AutoFishing & Bug fix 2022-10-21 19:05:49 +08:00
Milutinke
12b317644d Transalted and added detailed comments and instructions and a reference to the documentation article.
Fully tested, ready for merge.
2022-10-21 12:25:33 +02:00
Milutinke
ec27ec53d7 Implemented the Discord Bridge Chat Bot. TODO: Translate 2022-10-21 02:29:47 +02:00
Milutinke
ed910aa9c7 Added the Web Socket Chat Bot. 2022-10-20 19:29:35 +02:00
BruceChen
e9f227ca5b Bug fix 2022-10-17 10:03:01 +08:00
BruceChen
db6d6c80bf Bug fix 2022-10-16 20:37:07 +08:00
Anon
e44973e900
Merge branch 'master' into farmbot 2022-10-14 16:00:46 +00:00
BruceChen
89b7110839 Update Map Bot 2022-10-13 19:34:49 +08:00
Milutinke
6524fe1734 Added Farmer Bot. Fixed a bug in the configuration. Moved Reload and Bots command to the Commands folder. 2022-10-12 12:56:56 +02:00
Milutinke
77500deef2 Added the bot. 2022-10-11 22:47:06 +02:00
BruceChen
f567cadc47 Bug fix 2022-10-09 07:57:28 +08:00
BruceChen
c57ac183d5 Add AutoDig ChatBot 2022-10-08 17:56:32 +08:00
BruceChen
4cb95731bf Bugfix 2022-10-08 10:06:11 +08:00
BruceChen
e44192ab7b Update translations 2022-10-06 18:12:32 +08:00
BruceChen
bdcc22b465 Add update detection 2022-10-06 14:53:05 +08:00
BruceChen
7f2ede8ad2 Delete unused sample files 2022-10-05 20:41:37 +08:00