Skip to content

Block2222/EaglerRelayJS_hotfix_modpack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EaglerRelayJS

Eaglercraft relay server implementation written in TypeScript

Note

Most of the code was ported directly from the original java implementation, so there will probably be some bugs I missed.

Features:

  • Base relay server
  • IP forwarding
  • Origin whitelist
  • Join code customization
  • STUN / TURN server support
  • Rate limiting

Usage:

Standalone

$ npm install -g eaglerrelayjs
$ mkdir -p relay
$ cd relay
$ eaglerrelayjs --port 8080

Existing App

import http from 'http';
import express from 'express';
import { EaglerSPRelay } from 'eaglerrelayjs';

const app = express();
const server = http.createServer(app);
const relay = new EaglerSPRelay({ debug: true });

app.use((_req, res) => {
  res.set('Content-Type', 'text/plain');
  res.status(426).end('Upgrade Required');
});

server.on('upgrade', (req, socket, head) => relay.handleUpgrade(req, socket, head));
server.listen(8080);

Contributing:

Contributions are welcome, but please keep the code style consistent.

About

temp fix for modpack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 96.5%
  • JavaScript 3.5%