Giter Club home page Giter Club logo

discord-ipc-proxy's Introduction

discord-ipc-proxy

A tool to analyze the Discord's IPC/WebSocket communication between server and client. Acts as a middleware between an application (browser, game) and Discord.

Usage

  1. Clone this repo.
  2. npm i to fetch all needed dependencies.
  3. npm start to launch proxy.
  4. Launch Discord. It shouldn't be launched before launching proxy.

The proxy will periodically output to its STDOUT a JSON-formatted messages about the communication between Discord IPC/WS servers and applications connecting to them. This can be used by 3rd-party software to visualize it in more human-readable way (GUI, colorized CLI).

About

This package was designed to help with the development of Discord WebSocket/IPC protocol reimplementations, trying to create a universal bridge that passes entire communication to the another client or server. A diagram showing how it should initialize looks as below:

sequenceDiagram
  participant OS as Operating system
  actor C as Browser/Application
  actor B as IPC Bridge
  actor S as Discord
  activate OS;
  activate B;
  critical setup server
    B->>OS: Initialize server, reserve port/path.
  option all in use or taken
    B--XB: Throw error, clean-up
    B--XOS: End process life
  end
  activate S;
  S->>OS: Initialize server, reserve port/path.
  C->>B: (Open connection)
  activate C;
  critical setup client
    B->S: (Open connection, reuse params/origin)
  option server unavailable
    B->B: "Null proxying" (receives messages but doesn't proxy them)
    B--XOS: End process life
  option closure by Discord
    S->>B: Close with "n" code
    B->>C: Close with "n" code
  option closure by client
    C->>B: Close with "n" code
    B->>S: Close with "n" code
  end
  deactivate C;
  deactivate S;
  deactivate B;
  deactivate OS;
Loading

discord-ipc-proxy's People

Contributors

spacingbat3 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

discord-ipc-proxy's Issues

URIError: Unable to parse 'address' to 'URL' class.

PS D:\Usuario\Documents\Programming\Misc stuff\discord-ipc-proxy> npm start

> [email protected] start
> tsc && node dist/index.js

{"evt":"listening","transport":"ws","receiver":"both","port":6463,"timestamp":[886,493887800]}
D:\Ixogamer\Documents\Programming\Misc stuff\discord-ipc-proxy\dist\index.js:41
            throw new URIError("Unable to parse 'address' to 'URL' class.");
                  ^

URIError: Unable to parse 'address' to 'URL' class.
    at D:\Ixogamer\Documents\Programming\Misc stuff\discord-ipc-proxy\dist\index.js:41:19
    at getServer (D:\Ixogamer\Documents\Programming\Misc stuff\discord-ipc-proxy\dist\index.js:43:7)
    at D:\Ixogamer\Documents\Programming\Misc stuff\discord-ipc-proxy\dist\index.js:67:24
    at new Promise (<anonymous>)
    at D:\Ixogamer\Documents\Programming\Misc stuff\discord-ipc-proxy\dist\index.js:66:27
    at tryUntil (D:\Ixogamer\Documents\Programming\Misc stuff\discord-ipc-proxy\dist\index.js:20:23)
    at tryUntil (D:\Ixogamer\Documents\Programming\Misc stuff\discord-ipc-proxy\dist\index.js:24:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async tryUntil (D:\Ixogamer\Documents\Programming\Misc stuff\discord-ipc-proxy\dist\index.js:24:20)
    at async tryUntil (D:\Ixogamer\Documents\Programming\Misc stuff\discord-ipc-proxy\dist\index.js:24:20)

Node.js v18.17.0
PS D:\Usuario\Documents\Programming\Misc stuff\discord-ipc-proxy>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.