diff --git a/.gitignore b/.gitignore
index b4efa16..745c86c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
node_modules/
+node_modules_windows/
start.bat
-out/
\ No newline at end of file
+out/
diff --git a/data/proxypass-pakkit.jar b/data/proxypass-pakkit.jar
new file mode 100644
index 0000000..a485478
Binary files /dev/null and b/data/proxypass-pakkit.jar differ
diff --git a/html/js/jsonTree.js b/html/js/jsonTree.js
index 359cc3d..4d20650 100644
--- a/html/js/jsonTree.js
+++ b/html/js/jsonTree.js
@@ -4,7 +4,7 @@
*
* Copyright 2017 Vera Lobacheva (http://iamvera.com)
* Released under the MIT license (LICENSE.txt)
- * Modied for Pakkit because the original seems to be abandoned and doesn't escape HTML properly
+ * Modified for Pakkit because the original seems to be abandoned and doesn't escape HTML properly
*/
const escapeHtml = require('escape-html');
@@ -226,9 +226,9 @@ var jsonTree = (function() {
template = function(label, val) {
var str = '\
\
- "' +
- escapeHtml(label) +
- '" : \
+ ' +
+ escapeHtml(JSON.stringify(label)) +
+ ' : \
\
\
' +
diff --git a/html/mainPage/index.html b/html/mainPage/index.html
index e3f7de9..1930c63 100644
--- a/html/mainPage/index.html
+++ b/html/mainPage/index.html
@@ -43,7 +43,7 @@
Quick actions
-
+
diff --git a/html/mainPage/script.js b/html/mainPage/script.js
index 44fabea..765c1f2 100644
--- a/html/mainPage/script.js
+++ b/html/mainPage/script.js
@@ -2,9 +2,21 @@ const { ipcRenderer } = require('electron');
const Clusterize = require('clusterize.js');
// const escapeHtml = require('escape-html'); Already defined in my customised version of jsonTree (I just added HTML escaping)
+const proxyCapabilities = JSON.parse(ipcRenderer.sendSync('proxyCapabilities', ''));
+
+if (!proxyCapabilities.modifyPackets) {
+ document.getElementById("editAndResend").style.display = "none";
+}
+
var currentPacket = undefined;
var currentPacketType = undefined;
-var hiddenPackets = []; // ["update_time", "position", "position", "keep_alive", "keep_alive", "rel_entity_move", "position_look", "look", "position_look", "map_chunk", "update_light", "entity_action", "entity_update_attributes", "unload_chunk", "unload_chunk", "update_view_position", "entity_metadata"];
+var hiddenPackets = [
+ // TODO: Do this properly
+ // JE
+ "update_time", "position", "position", "keep_alive", "keep_alive", "rel_entity_move", "position_look", "look", "position_look", "map_chunk", "update_light", "entity_action", "entity_update_attributes", "unload_chunk", "unload_chunk", "update_view_position", "entity_metadata",
+ // BE
+ "network_stack_latency_packet", "level_chunk_packet", "move_player_packet", "player_auth_input_packet", "network_chunk_publisher_update_packet", "client_cache_blob_status_packet", "client_cache_miss_response_packet", "move_entity_delta_packet", "set_entity_data_packet", "set_time_packet", "set_entity_data_packet", "set_entity_motion_packet", "add_entity_packet", "level_event_packet", "level_sound_event2_packet", "update_attributes_packet", "entity_event_packet", "remove_entity_packet", "mob_armor_equipment_packet", "mob_equipment_packet", "update_block_packet", "player_action_packet"
+];
var dialogOpen = false;
var allPackets = [];
@@ -62,6 +74,7 @@ function refreshPackets() {
packetsAdded++;
}
} */
+ var allPacketsHTML = [];
allPackets.forEach(function(packet) {
// noUpdate is true as we want to manually update at the end
addPacketToDOM(packet, true);
@@ -86,12 +99,12 @@ function addPacketToDOM(packet, noUpdate) {
${escapeHtml(packet.meta.name)}${escapeHtml(trimData(packet.data))}
`]);
- if (!noUpdate) {
+ /* if (!noUpdate) {
clusterize.append(allPacketsHTML.slice(-1)[0]);
if (wasScrolledToBottom) {
packetlist.parentElement.scrollTop = packetlist.parentElement.scrollHeight;
}
- }
+ } */
packetsUpdated = true;
// packetlist.style.paddingTop = offScreenCount * 30 + "px"; // TODO: Make it so you can view these packets
/* if (offScreenCount % 2 == 0) {
@@ -152,6 +165,11 @@ function resendEdited(id, newValue) {
}
function editAndResend(id) {
+ if (!proxyCapabilities.modifyPackets) {
+ alert("Edit and Resend is unavailable");
+ return;
+ }
+
dialogOpen = true;
document.getElementById("dialog-overlay").className = "dialog-overlay active";
document.getElementById("dialog").innerHTML =
diff --git a/html/mainPage/style.css b/html/mainPage/style.css
index 59a396b..079cccc 100644
--- a/html/mainPage/style.css
+++ b/html/mainPage/style.css
@@ -135,7 +135,15 @@ div.dialog {
text-decoration: none;
}
-
+#tabcontent {
+ box-sizing: border-box;
+ position: fixed;
+ height: calc(100% - 48px);
+ width: calc(100% - 16px);
+ z-index: 1;
+ display: block;
+ background: rgb(36, 36, 36);
+}
diff --git a/html/startPage/index.html b/html/startPage/index.html
index 79bd6f8..b871494 100644
--- a/html/startPage/index.html
+++ b/html/startPage/index.html
@@ -11,19 +11,19 @@
pakkit
- pakkit is an advanced packet monitor proxy for Minecraft: Java Edition and Minecraft: Bedrock Edition based on node-minecraft-protocol and ProxyPass. Bedrock support coming soon (hopefully)
+ pakkit is an advanced packet monitor proxy for Minecraft: Java Edition nd Minecraft: Bedrock Edition based on node-minecraft-protocol and ProxyPass.