Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for bedrock-protocol and latest bedrock versions #110

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b3b8a60
Update packages
FreezeEngine Mar 14, 2024
e538af6
Temp fix for empty hiddenPackets
FreezeEngine Mar 15, 2024
87b8220
Bedrock-node basic support
FreezeEngine Mar 15, 2024
7031031
win.setPosition error silenced
FreezeEngine Mar 15, 2024
9c31780
BigInt.toJSON
FreezeEngine Mar 15, 2024
67c0905
Add default packet filtering for bedrock-node
FreezeEngine Mar 19, 2024
d1bf992
New todo: add proxypass option
FreezeEngine Mar 19, 2024
db9b7e7
Support for new java versions
FreezeEngine Mar 19, 2024
eb3e07f
Brought back ProxyPass
FreezeEngine Mar 19, 2024
41309a8
New TODO: dynamic version loading
FreezeEngine Mar 19, 2024
ae00068
Minor issue fixed
FreezeEngine Mar 19, 2024
6e71ba5
Filtering support
FreezeEngine Mar 19, 2024
4106714
Dropped ProxyPass support
FreezeEngine Mar 19, 2024
fc737b8
Proper reading of client and server bound packets
FreezeEngine Mar 19, 2024
a734c95
New startPage label
FreezeEngine Mar 19, 2024
d734ea4
Added dynamic version loading
FreezeEngine Mar 19, 2024
ad042b0
Fixed small html error
FreezeEngine Mar 19, 2024
7c4c969
MSA Code auth implemented
FreezeEngine Mar 19, 2024
a8512c3
Removed JSON.stringify on proxy.capabilities
FreezeEngine Mar 19, 2024
6097d84
Implemented HexView and packet ids
FreezeEngine Mar 19, 2024
ba6c0ab
Better phrasing
FreezeEngine Mar 19, 2024
7950d7f
Scripting support (Bedrock)
FreezeEngine Mar 20, 2024
0634480
Update workflow
FreezeEngine Sep 28, 2024
94b67e9
Update dependencies
FreezeEngine Sep 28, 2024
9df5f22
1.21.4X
FreezeEngine Nov 21, 2024
40489dc
1.21.5X
FreezeEngine Dec 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,21 @@ jobs:
mv out/pakkit-darwin-x64 out/macos/pakkit-macos-x64

- name: Upload Windows artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{ github.ref != 'refs/heads/master' }}
with:
name: pakkit-windows-x64
path: out/windows/

- name: Upload Linux artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{ github.ref != 'refs/heads/master' }}
with:
name: pakkit-linux-x64
path: out/linux/

- name: Upload macOS artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{ github.ref != 'refs/heads/master' }}
with:
name: pakkit-macos-x64
Expand Down
Binary file removed data/proxypass-pakkit.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions html/mainPage/js/defaults.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"^bedrock-proxypass-json$": {
"^node-bedrock-protocol-.*$": {
"hiddenPackets": {
"serverbound": ["move_player", "player_action", "level_sound_event"],
"clientbound": ["level_chunk", "update_block", "network_chunk_publisher_update", "set_entity_motion", "move_entity_absolute", "set_entity_data", "level_sound_event"]
"serverbound": ["move_player", "player_action", "level_sound_event", "player_auth_input"],
"clientbound": ["level_chunk", "update_block", "network_chunk_publisher_update", "set_entity_motion", "move_entity_absolute", "set_entity_data", "level_sound_event", "move_entity_delta"]
},
"useExtendedPresets": false
},
Expand Down
1 change: 1 addition & 0 deletions html/mainPage/js/filteringLogic.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
exports.packetFilteredByFilterBox = function (packet, filter, hiddenPackets, inverseFiltering, regexFilter,
sharedVars) {
if(!hiddenPackets) return false;
if (hiddenPackets[packet.direction].includes(packet.meta.name)) {
return true
}
Expand Down
6 changes: 3 additions & 3 deletions html/mainPage/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ const sharedVars = {
proxyCapabilities: {},
ipcRenderer: require('electron').ipcRenderer,
packetList: document.getElementById('packetlist'),
hiddenPackets: undefined,
hiddenPackets: {},
scripting: undefined,
lastFilter: '',
hiddenPacketsAmount: 0,
store: new Store()
}

sharedVars.proxyCapabilities = JSON.parse(sharedVars.ipcRenderer.sendSync('proxyCapabilities', ''))
sharedVars.proxyCapabilities = sharedVars.ipcRenderer.sendSync('proxyCapabilities', '')

function getVersionSpecificVar(name, defaultValue) {
const versionId = 'version-' + sharedVars.proxyCapabilities.versionId
Expand All @@ -133,7 +133,7 @@ function getVersionSpecificVar(name, defaultValue) {
[name]: JSON.stringify(defaultValue)
})
}
return JSON.parse(sharedVars.store.get(versionId)[name])
return sharedVars.store.get(versionId)[name] ? JSON.parse(sharedVars.store.get(versionId)[name]) : sharedVars.store.get(versionId)[name]
}

function setVersionSpecificVar(name, value) {
Expand Down
203 changes: 74 additions & 129 deletions html/startPage/index.html
Original file line number Diff line number Diff line change
@@ -1,129 +1,74 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>pakkit</title>
<link href="style.css" rel="stylesheet">
<!-- https://electronjs.org/docs/tutorial/security#csp-meta-tag -->
<meta content="script-src 'self' 'unsafe-inline';" http-equiv="Content-Security-Policy"/>
<link href="../scrollbar.css" rel="stylesheet" type="text/css"/>
<link href="../shared.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<h1 class='title'>pakkit</h1>
<p>pakkit is an advanced packet monitor proxy for Minecraft: Java Edition and Minecraft: Bedrock Edition based on
node-minecraft-protocol and ProxyPass.</p>
<form onsubmit="startProxy(event)">
<ul class="form-wrapper">
<li class="form-row">
<label for="platform">Platform:</label>
<select id="platform" onchange="platformChange()">
<option value="java">Java Edition</option>
<option value="bedrock">Bedrock Edition (beta)</option>
</select>
</li>
<li class="form-row">
<label for="version">Version:</label>
<select id="version">
<option value="1.20.1">1.20.1</option>
<option value="1.20">1.20</option>
<option value="1.19.4">1.19.4</option>
<option value="1.19.3">1.19.3</option>
<option value="1.19.2">1.19.2</option>
<option value="1.19.1">1.19.1</option>
<option value="1.19">1.19</option>
<option value="1.18.2">1.18.2</option>
<option value="1.18">1.18(.1)</option>
<option value="1.17.1">1.17.1</option>
<option value="1.17">1.17</option>
<option value="21w07a">21w07a</option>
<option value="1.16.4">1.16.4/1.16.5</option>
<option value="1.16.3">1.16.3</option>
<option value="1.16.2">1.16.2</option>
<option value="1.16.1">1.16.1</option>
<option value="1.16">1.16</option>
<option value="20w13b">20w13b</option>
<option value="1.15.2">1.15.2</option>
<option value="1.15.1">1.15.1</option>
<option value="1.15">1.15</option>
<option value="1.14.4">1.14.4</option>
<option value="1.14.3">1.14.3</option>
<option value="1.14.1">1.14.1</option>
<option value="1.14">1.14</option>
<option value="1.13.2">1.13.2</option>
<option value="1.13.2-pre2">1.13.2-pre2</option>
<option value="1.13.2-pre1">1.13.2-pre1</option>
<option value="1.13.1">1.13.1</option>
<option value="1.13">1.13</option>
<option value="17w50a">17w50a</option>
<option value="1.12.2">1.12.2</option>
<option value="1.12.1">1.12.1</option>
<option value="1.12">1.12</option>
<option value="1.12-pre4">1.12-pre4</option>
<option value="17w18b">17w18b</option>
<option value="17w15a">17w15a</option>
<option value="1.11.2">1.11.2</option>
<option value="1.11">1.11</option>
<option value="16w35a">16w35a</option>
<option value="1.10.2">1.10.2</option>
<option value="1.10.1">1.10.1</option>
<option value="1.10">1.10</option>
<option value="1.10-pre1">1.10-pre1</option>
<option value="16w20a">16w20a</option>
<option value="1.9.4">1.9.4</option>
<option value="1.9.2">1.9.2</option>
<option value="1.9.1-pre2">1.9.1-pre2</option>
<option value="1.9">1.9</option>
<option value="15w40b">15w40b</option>
<option value="1.8.8">1.8.x</option>
<option value="1.7.10">1.7.10</option>
</select>
<select disabled id="version-bedrock" style="display: none;">
<option value="1.15.2">1.16.221</option>
</select>
</li>
<li class="form-row">
<label for="connect-address">Connect address:</label>
<input id="connect-address" name="connect-address" placeholder="127.0.0.1" type="text" value="127.0.0.1"/>
</li>
<li class="form-row">
<label for="connect-port">Connect port:</label>
<input id="connect-port" name="connect-port" placeholder="25565" type="text" value="25565"/>
</li>
<div id="auth-row">
<li class="form-row">
<label for="auth-online">Auth method:</label>
<span>Enable online mode?</span>
</span>
<li class="form-row">
<label></label>
<span>
<label class="switch" style="padding: 0;">
<input id="auth-online" type="checkbox" value="auth-online"/>
<span class="slider round"></span>
</label>
</span>
</li>
</div>
<li class="form-row topspacer">
<label for="listen-port">Listen port:</label>
<input id="listen-port" name="listen-port" placeholder="25566" type="text" value="25566"/>
</li>
<!-- <li class="form-row" id="consent-row" style="display: none;">
<label for="consent">Consent:<br>
<label class="switch" style="padding: 0;">
<input id="consent" type="checkbox" value="consent"/>
<span class="slider round"></span>
</label>
</label>
<p>Allow pakkit to use my auth token from launcher_profiles.json for logging in to online mode servers.</p>
</li> -->
<li class="form-row">
<label></label>
<span class="start"><input id="start" type="submit" value="Start!"/></span>
</li>
</ul>
</form>
<script src="script.js"></script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>pakkit</title>
<link href="style.css" rel="stylesheet">
<!-- https://electronjs.org/docs/tutorial/security#csp-meta-tag -->
<meta content="script-src 'self' 'unsafe-inline';" http-equiv="Content-Security-Policy"/>
<link href="../scrollbar.css" rel="stylesheet" type="text/css"/>
<link href="../shared.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<h1 class='title'>pakkit</h1>
<p>pakkit is an advanced packet monitor for both Minecraft Java and Bedrock Edition, based on PrismarineJS
minecraft-protocol and bedrock-protocol.</p>
<form onsubmit="startProxy(event)">
<ul class="form-wrapper">
<li class="form-row">
<label for="platform">Platform:</label>
<select id="platform" onchange="platformChange()">
<option value="java">Java Edition</option>
<option value="bedrock">Bedrock Edition</option>
</select>
</li>
<li class="form-row">
<label for="version">Version:</label>
<select id="version"></select>
<select id="version-bedrock" style="display: none;"></select>
</li>
<li class="form-row">
<label for="connect-address">Connect address:</label>
<input id="connect-address" name="connect-address" placeholder="127.0.0.1" type="text" value="127.0.0.1"/>
</li>
<li class="form-row">
<label for="connect-port">Connect port:</label>
<input id="connect-port" name="connect-port" placeholder="25565" type="text" value="25565"/>
</li>
<div id="auth-row">
<li class="form-row">
<label for="auth-online">Auth method:</label>
<span>Enable online mode?</span>
</li>
<li class="form-row">
<label></label>
<span>
<label class="switch" style="padding: 0;">
<input id="auth-online" type="checkbox" value="auth-online"/>
<span class="slider round"></span>
</label>
</span>
</li>
</div>
<li class="form-row topspacer">
<label for="listen-port">Listen port:</label>
<input id="listen-port" name="listen-port" placeholder="25566" type="text" value="25566"/>
</li>
<!-- <li class="form-row" id="consent-row" style="display: none;">
<label for="consent">Consent:<br>
<label class="switch" style="padding: 0;">
<input id="consent" type="checkbox" value="consent"/>
<span class="slider round"></span>
</label>
</label>
<p>Allow pakkit to use my auth token from launcher_profiles.json for logging in to online mode servers.</p>
</li> -->
<li class="form-row">
<label></label>
<span class="start"><input id="start" type="submit" value="Start!"/></span>
</li>
</ul>
</form>
<script src="script.js"></script>
</body>
</html>
Loading