1.0.16 • Published 4 years ago

diepbuddy-client v1.0.16

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

diepbuddy-client

NPM version license

Description

I created this project to use glitch projects as proxies. diepbuddy-client will automatically connect to your WebSocket server and will emit 'login'.

To create a bot you simply emit 'Bot open' with the partylink. diepbuddy-client will either respond with the 'Bot accept' or 'Bot error' event.

Im using this for Diep.io Tool.

Works well in combination with https://github.com/Cazka/diepbuddy-server.

Installation

npm install diepbuddy-client

How to use

The following example creates a HTTP server listening on port 3000 and runs diepbuddy-client.

const express = require('express');
const app = express();
const BuddyManager = require('diepbuddy-client')();
app.get('/', (request, response) => {
    response.send('x');
});
app.listen(3000);

Set the enviromental variable SERVERURL and AUTHKEY if you use any.

The Protocol

4 datatypes are used: uint8, uint16, string and ArrayBuffers/Uint8Array

Strings will always end with 00.

Serverbound Packets

IDDescription
00login
08heartbeat
23bot accept
24bot message
25bot close
26bot error

08 heartbeat

OffsetSize(s)Value TypeDescription
+01 byteuint8packet id

23 bot accept

OffsetSize(s)Value TypeDescription
+01 byteuint8packet id
+12 bytesuint16index
+3n bytesStringlink

24 bot message

OffsetSize(s)Value TypeDescription
+01 byteuint8packet id
+12 bytesuint16index
+3n bytesUint8Arrayclientbound from bot

25 bot close

OffsetSize(s)Value TypeDescription
+01 byteuint8packet id
+12 bytesuint16index

26 bot error

OffsetSize(s)Value TypeDescription
+01 byteuint8packet id
+12 bytesuint16index
+3n bytesStringlink

Clientbound Packets

IDDescription
08heartbeat
20bot open
21bot send
22bot close

08 heartbeat

OffsetSize(s)Value TypeDescription
+01 byteuint8packet id

20 bot open

OffsetSize(s)Value TypeDescription
+01 byteuint8packet id
+1n bytesStringlink

20 bot send

OffsetSize(s)Value TypeDescription
+01 byteuint8packet id
+12 bytesuint16index
+3n bytesUint8Arrayserverbound from bot

22 bot close

OffsetSize(s)Value TypeDescription
+01 byteuint8packet id
+12 bytesuint16index
1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.11

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.10

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.2

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago