Update README.md
This commit is contained in:
1 parent
e970073a93
commit
a352ff2926
1 file changed
+130
-130
@@ -1,130 +1,130 @@
|
|||||||
# Onyx but... Open Source
|
# Onyx but... Open Source
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="./img/onyx-banner.png" alt="Onyx reversed by the community" width="25%">
|
<img src="./img/onyx-banner.png" alt="Onyx reversed by the community" width="25%">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="./img/deobf.jpg" alt="Deobfuscation" width="42%">
|
<img src="./img/deobf.jpg" alt="Deobfuscation" width="42%">
|
||||||
<img src="./img/onyxclient.png" alt="Onyx logo" width="31%">
|
<img src="./img/onyxclient.png" alt="Onyx logo" width="31%">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
OpenOnyx is the Onyx 1.8.9 client, **fully deobfuscated** and extended with new
|
OpenOnyx is the Onyx 1.8.9 client, **deobfuscated, with some parts that claude refused to deobfuscate** and extended with new
|
||||||
features. The runnable client lives in `run/`; the readable source of the original
|
features. The runnable client lives in `run/`; the readable source of the original
|
||||||
client is in `src/`.
|
client is in `src/`.
|
||||||
|
|
||||||
- [Codeberg](https://codeberg.org/Claude-French-Industries/OpenOnyx)
|
- [Codeberg](https://codeberg.org/Claude-French-Industries/OpenOnyx)
|
||||||
- [GitHub](https://github.com/OpenAi-Italian-Industries/OpenOnyx)
|
- [GitHub](https://github.com/OpenAi-Italian-Industries/OpenOnyx)
|
||||||
|
|
||||||
## play
|
## play
|
||||||
|
|
||||||
**Windows:** double-click `run/run.bat`.
|
**Windows:** double-click `run/run.bat`.
|
||||||
|
|
||||||
**Linux (x86-64):** `cd run && ./run.sh`. It needs Bash, Java 21 and a PrismLauncher
|
**Linux (x86-64):** `cd run && ./run.sh`. It needs Bash, Java 21 and a PrismLauncher
|
||||||
install with the Minecraft 1.8 assets; it searches PrismLauncher's Java first. Override
|
install with the Minecraft 1.8 assets; it searches PrismLauncher's Java first. Override
|
||||||
locations with `JAVA_BIN=/path/to/java ASSETS_DIR=/path/to/assets ./run.sh`.
|
locations with `JAVA_BIN=/path/to/java ASSETS_DIR=/path/to/assets ./run.sh`.
|
||||||
|
|
||||||
Both launchers need **Java 21**. The bundled `run/jre/` is used when Git LFS fetched it
|
Both launchers need **Java 21**. The bundled `run/jre/` is used when Git LFS fetched it
|
||||||
(install Git LFS before cloning); otherwise `run.bat` falls back to Temurin 21 in
|
(install Git LFS before cloning); otherwise `run.bat` falls back to Temurin 21 in
|
||||||
`C:\Program Files\Eclipse Adoptium\`. `run.bat` links your vanilla launcher's 1.8
|
`C:\Program Files\Eclipse Adoptium\`. `run.bat` links your vanilla launcher's 1.8
|
||||||
assets (`%APPDATA%\.minecraft\assets`) into `run/assets/` on first start.
|
assets (`%APPDATA%\.minecraft\assets`) into `run/assets/` on first start.
|
||||||
|
|
||||||
The launchers use generational ZGC. Measured on this client, GC pauses dropped from up
|
The launchers use generational ZGC. Measured on this client, GC pauses dropped from up
|
||||||
to ~40 ms with the default G1 (felt as stutter) to under 0.05 ms, with higher FPS.
|
to ~40 ms with the default G1 (felt as stutter) to under 0.05 ms, with higher FPS.
|
||||||
|
|
||||||
## deobfuscation status
|
## deobfuscation status
|
||||||
|
|
||||||
Everything below is produced from the untouched jars in `original/` by `tools/build.sh`.
|
Everything below is produced from the untouched jars in `original/` by `tools/build.sh`.
|
||||||
|
|
||||||
- **Classes:** all 630 are renamed into purpose-based packages (`openonyx.features.combat`,
|
- **Classes:** all 630 are renamed into purpose-based packages (`openonyx.features.combat`,
|
||||||
`openonyx.render`, `openonyx.ui`, …). 609 have descriptive names; 21 small helpers keep
|
`openonyx.render`, `openonyx.ui`, …). 609 have descriptive names; 21 small helpers keep
|
||||||
`*Support_NNN`-style names because there was too little to name them by.
|
`*Support_NNN`-style names because there was too little to name them by.
|
||||||
- **Strings:** every encrypted string is decrypted; no decoder calls remain.
|
- **Strings:** every encrypted string is decrypted; no decoder calls remain.
|
||||||
- **Members:** 2,456 fields and 1,437 methods are renamed. Names come from setting labels,
|
- **Members:** 2,456 fields and 1,437 methods are renamed. Names come from setting labels,
|
||||||
record components, enum constants, event handlers, getters/setters and types, plus the
|
record components, enum constants, event handlers, getters/setters and types, plus the
|
||||||
hand-chosen core API names in `mappings/member-names.tsv` (settings, `Module`,
|
hand-chosen core API names in `mappings/member-names.tsv` (settings, `Module`,
|
||||||
`Render2D`, `Animation`, theme, shaders, `KillAura`, …).
|
`Render2D`, `Animation`, theme, shaders, `KillAura`, …).
|
||||||
- **Junk removed:** 5,098 no-op `ObfuscationMarker` calls; 7,588 disguised constants
|
- **Junk removed:** 5,098 no-op `ObfuscationMarker` calls; 7,588 disguised constants
|
||||||
(`5 >> 2`, `--3`, `true ^ true`) folded; the obfuscator's parameter shuffling undone
|
(`5 >> 2`, `--3`, `true ^ true`) folded; the obfuscator's parameter shuffling undone
|
||||||
in the decompiled source; private methods it had hidden as "synthetic" restored
|
in the decompiled source; private methods it had hidden as "synthetic" restored
|
||||||
(about 24,000 lines that decompilers would otherwise skip).
|
(about 24,000 lines that decompilers would otherwise skip).
|
||||||
- **Mappings:** `mappings/onyx-mappings.tsv` lists every class, field and method rename
|
- **Mappings:** `mappings/onyx-mappings.tsv` lists every class, field and method rename
|
||||||
(original owner, name, descriptor → recovered name).
|
(original owner, name, descriptor → recovered name).
|
||||||
|
|
||||||
`src/` is the decompiled, deobfuscated source of the original client (630 files,
|
`src/` is the decompiled, deobfuscated source of the original client (630 files,
|
||||||
~65,000 lines, decompiled with Vineflower). It is the reference for reading and
|
~65,000 lines, decompiled with Vineflower). It is the reference for reading and
|
||||||
understanding the client. The game itself runs from bytecode: decompiled obfuscated code
|
understanding the client. The game itself runs from bytecode: decompiled obfuscated code
|
||||||
does not recompile cleanly as-is, so new code is compiled separately and patched in.
|
does not recompile cleanly as-is, so new code is compiled separately and patched in.
|
||||||
|
|
||||||
## project layout
|
## project layout
|
||||||
|
|
||||||
```text
|
```text
|
||||||
original/ untouched input jars: onyx.jar, mc.jar, mc-linux.jar
|
original/ untouched input jars: onyx.jar, mc.jar, mc-linux.jar
|
||||||
run/ the game: run.bat, run.sh, client/ (built jars), rt/ (libraries, natives), jre/
|
run/ the game: run.bat, run.sh, client/ (built jars), rt/ (libraries, natives), jre/
|
||||||
src/ deobfuscated source of the original client (reference)
|
src/ deobfuscated source of the original client (reference)
|
||||||
patches/ source of the new features (openonyx.patch)
|
patches/ source of the new features (openonyx.patch)
|
||||||
mappings/ class-renames.tsv, member-names.tsv (inputs) and onyx-mappings.tsv (output)
|
mappings/ class-renames.tsv, member-names.tsv (inputs) and onyx-mappings.tsv (output)
|
||||||
tools/ Deobfuscate, Patch, VerifyJar, RenameClasses, PatchLinuxRuntime and build.sh
|
tools/ Deobfuscate, Patch, VerifyJar, RenameClasses, PatchLinuxRuntime and build.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
## building
|
## building
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
tools/build.sh # rebuild run/client/ and mappings/onyx-mappings.tsv
|
tools/build.sh # rebuild run/client/ and mappings/onyx-mappings.tsv
|
||||||
tools/build.sh --src # also regenerate src/
|
tools/build.sh --src # also regenerate src/
|
||||||
```
|
```
|
||||||
|
|
||||||
Run it with Java 21 (`JAVA_HOME` or `java` on `PATH`); on Windows use Git Bash. The first
|
Run it with Java 21 (`JAVA_HOME` or `java` on `PATH`); on Windows use Git Bash. The first
|
||||||
run downloads ASM 9.7.1 and Vineflower 1.12.0 from Maven Central into `tools/lib/`.
|
run downloads ASM 9.7.1 and Vineflower 1.12.0 from Maven Central into `tools/lib/`.
|
||||||
The build runs these steps:
|
The build runs these steps:
|
||||||
|
|
||||||
1. **Remap** (`tools/Deobfuscate.java`): renames, string decryption and cleanups on
|
1. **Remap** (`tools/Deobfuscate.java`): renames, string decryption and cleanups on
|
||||||
`onyx.jar`. The same mapping is applied to `mc.jar` and `mc-linux.jar`, whose hooks
|
`onyx.jar`. The same mapping is applied to `mc.jar` and `mc-linux.jar`, whose hooks
|
||||||
call into the client.
|
call into the client.
|
||||||
2. **Patch** (`tools/Patch.java`): adds the new settings and hooks. Each edit locates
|
2. **Patch** (`tools/Patch.java`): adds the new settings and hooks. Each edit locates
|
||||||
its spot by instruction pattern and stops the build if the pattern is missing.
|
its spot by instruction pattern and stops the build if the pattern is missing.
|
||||||
3. **Compile** `patches/src` against the patched jars.
|
3. **Compile** `patches/src` against the patched jars.
|
||||||
4. **Verify** (`tools/VerifyJar.java`): every field/method reference in the client
|
4. **Verify** (`tools/VerifyJar.java`): every field/method reference in the client
|
||||||
(Windows and Linux sets) must resolve, and every method must pass ASM's bytecode
|
(Windows and Linux sets) must resolve, and every method must pass ASM's bytecode
|
||||||
verifier.
|
verifier.
|
||||||
|
|
||||||
To rename more of the client, add lines to `mappings/member-names.tsv` or
|
To rename more of the client, add lines to `mappings/member-names.tsv` or
|
||||||
`mappings/class-renames.tsv` and rebuild. To add a feature, put the code in
|
`mappings/class-renames.tsv` and rebuild. To add a feature, put the code in
|
||||||
`patches/src/openonyx/patch` and wire it in from `tools/Patch.java`.
|
`patches/src/openonyx/patch` and wire it in from `tools/Patch.java`.
|
||||||
|
|
||||||
`-Donyx.selftest=<world>` (on a throwaway `--gameDir`) is a smoke test. It joins the
|
`-Donyx.selftest=<world>` (on a throwaway `--gameDir`) is a smoke test. It joins the
|
||||||
world, screenshots the Record animation editor and two block animations, checks the
|
world, screenshots the Record animation editor and two block animations, checks the
|
||||||
inventory manager's Optimized mode against the integrated server, and quits.
|
inventory manager's Optimized mode against the integrated server, and quits.
|
||||||
|
|
||||||
The Linux runtime uses the Legacy Fabric LWJGL 2 build. Its `mc-linux.jar` (made from
|
The Linux runtime uses the Legacy Fabric LWJGL 2 build. Its `mc-linux.jar` (made from
|
||||||
`mc.jar` by `tools/PatchLinuxRuntime.java`) limits Onyx packet events to the client
|
`mc.jar` by `tools/PatchLinuxRuntime.java`) limits Onyx packet events to the client
|
||||||
connection and uses Java NIO instead of Netty epoll.
|
connection and uses Java NIO instead of Netty epoll.
|
||||||
|
|
||||||
## static security review
|
## static security review
|
||||||
|
|
||||||
The original `onyx.jar` was reviewed without executing it or making network requests:
|
The original `onyx.jar` was reviewed without executing it or making network requests:
|
||||||
|
|
||||||
- No persistence, startup registration, native loading, arbitrary class loading, RAT
|
- No persistence, startup registration, native loading, arbitrary class loading, RAT
|
||||||
command channel, webhook, Discord bot token or credential-file harvesting was found.
|
command channel, webhook, Discord bot token or credential-file harvesting was found.
|
||||||
- Network code targets Microsoft/Xbox/Minecraft authentication, Mojang skin lookup,
|
- Network code targets Microsoft/Xbox/Minecraft authentication, Mojang skin lookup,
|
||||||
configured Minecraft proxies, and Discord's local IPC socket.
|
configured Minecraft proxies, and Discord's local IPC socket.
|
||||||
- The only local HTTP listener is the loopback OAuth callback on `127.0.0.1:1337`.
|
- The only local HTTP listener is the loopback OAuth callback on `127.0.0.1:1337`.
|
||||||
- `ProcessBuilder` is used by the optional Windows Spotify/media integration (a fixed
|
- `ProcessBuilder` is used by the optional Windows Spotify/media integration (a fixed
|
||||||
temporary PowerShell script) and the macOS integration (a fixed AppleScript), to read
|
temporary PowerShell script) and the macOS integration (a fixed AppleScript), to read
|
||||||
now-playing metadata and cover art.
|
now-playing metadata and cover art.
|
||||||
- File access is limited to client configuration, temporary media integration files and
|
- File access is limited to client configuration, temporary media integration files and
|
||||||
user-selected UI/configuration files. The UI reads and writes the clipboard.
|
user-selected UI/configuration files. The UI reads and writes the clipboard.
|
||||||
|
|
||||||
This is a static review, not a guarantee against behaviour that only appears under an
|
This is a static review, not a guarantee against behaviour that only appears under an
|
||||||
unobserved runtime condition.
|
unobserved runtime condition.
|
||||||
|
|
||||||
## contributing
|
## contributing
|
||||||
|
|
||||||
Contributions, renames, cleanup patches and bug reports are welcome. Open an issue or
|
Contributions, renames, cleanup patches and bug reports are welcome. Open an issue or
|
||||||
submit a pull request on Codeberg.
|
submit a pull request on Codeberg.
|
||||||
|
|
||||||
## legal
|
## legal
|
||||||
|
|
||||||
OpenOnyx is an independent community project and is not an official Minecraft product.
|
OpenOnyx is an independent community project and is not an official Minecraft product.
|
||||||
Minecraft is a trademark of Mojang Studios and Microsoft Corporation. Third-party files
|
Minecraft is a trademark of Mojang Studios and Microsoft Corporation. Third-party files
|
||||||
and libraries retain their respective licenses.
|
and libraries retain their respective licenses.
|
||||||
Reference in new issue
Block a user