WorldEditAxe / eaglerproxy

A standalone implemention of the BungeeCord plugin for EaglercraftX, now with online vanilla server support!
38 stars 93 forks source link

Bind proxy to server #21

Closed HackerYijia closed 10 months ago

HackerYijia commented 10 months ago

Dear WorldEditAxe,

I hope this message finds you well. I have a question regarding the functionality of your proxy. I was wondering if it would be possible for an administrator to edit the configuration so that when a user connects to the proxy, instead of choosing a server to connect to, the proxy automatically directs them to a predefined connection type (e.g., 2: offline connection) and the server IP address indicated in the configuration file.

I am particularly interested in your proxy due to its speed benefits compared to the original BungeeCord protocol. I believe it would be a better choice for my player base. However, the inconvenience arises when users are repeatedly prompted to reenter the same server details. It would greatly simplify the process if I could set a specific IP and connection type for them, allowing them to easily join by selecting the configured proxy.

I appreciate your attention to this matter and any insight you can provide. Thank you for your time and assistance.

Sincerely, NoxShadow YT.

HackerYijia commented 10 months ago

🥇 Please DM me on Discord: @IamNoxShadow#0

WorldEditAxe commented 10 months ago

Dear WorldEditAxe,

I hope this message finds you well. I have a question regarding the functionality of your proxy. I was wondering if it would be possible for an administrator to edit the configuration so that when a user connects to the proxy, instead of choosing a server to connect to, the proxy automatically directs them to a predefined connection type (e.g., 2: offline connection) and the server IP address indicated in the configuration file.

I am particularly interested in your proxy due to its speed benefits compared to the original BungeeCord protocol. I believe it would be a better choice for my player base. However, the inconvenience arises when users are repeatedly prompted to reenter the same server details. It would greatly simplify the process if I could set a specific IP and connection type for them, allowing them to easily join by selecting the configured proxy.

I appreciate your attention to this matter and any insight you can provide. Thank you for your time and assistance.

Sincerely, NoxShadow YT.

Hi there! You have to remove the default pre-added plugin in the plugins folder. Then, you want to edit config.ts to configure the vanilla server IP you'd like to connect to. Please note that this proxy is not a BungeeCord alternative, but rather a protocol proxy to allow EaglercraftX clients to connect to your existing public server without significantly modifying your server's configuration. IP forwarding is currently not implemented.

Refer to the following for configuration modification guidance: (bridge currently does nothing)

// from proxy/config.ts
// This folder contains options for both the bridge and networking adapter.
// Environment files and .env files are available here. Set the value of any config option to process.env.<ENV name>

import { Config } from "./launcher_types.js";

export const config: Config = {
  bridge: {
    enabled: false,
    motd: null,
  },
  adapter: {
    name: "EaglerProxy",
    bindHost: "0.0.0.0",
    bindPort: 8080,
    maxConcurrentClients: 20,
    skinUrlWhitelist: undefined,
    motd: "FORWARD",
    origins: {
      allowOfflineDownloads: true,
      originWhitelist: null,
      originBlacklist: null,
    },
    server: {
      host: "your-public-server-ip-here.com",
      port: 25565,
    },
    tls: undefined,
  },
};
HackerYijia commented 10 months ago

Hello! Is there a way that I can add mulitple servers, like a network?

WorldEditAxe commented 10 months ago

You have to force players to connect to a BungeeCord server.

HackerYijia commented 10 months ago

If I am using it for my server, I cant have EaglerProxy As A Service as my motd, can I change it?

HackerYijia commented 10 months ago

So how to change Motd?

HackerYijia commented 10 months ago

@WorldEditAxe

WorldEditAxe commented 10 months ago

remove the plugin

HackerYijia commented 10 months ago

Okie.

HackerYijia commented 10 months ago

Is there anyway to change the default timeout?

WorldEditAxe commented 10 months ago

for what?

HackerYijia commented 10 months ago

Websocket Connection Timeout. If it's editable.

WorldEditAxe commented 10 months ago

there's no timeout system in the proxy, you should configure that on whatever upstream server you're using

WorldEditAxe commented 10 months ago

Closing due to issue being stale.

HunterBoy344 commented 1 month ago

Deleting the EaglerProxy as a Service plugin gives the following error when running node index.js:

node:internal/modules/esm/resolve:264
    throw new ERR_MODULE_NOT_FOUND(
          ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/pi/eaglerproxy/build/plugins/EagProxyAAS/types.js' imported from /home/pi/eaglerproxy/build/proxy/Proxy.js
    at finalizeResolution (node:internal/modules/esm/resolve:264:11)
    at moduleResolve (node:internal/modules/esm/resolve:924:10)
    at defaultResolve (node:internal/modules/esm/resolve:1148:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:390:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:359:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:234:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:87:39)
    at link (node:internal/modules/esm/module_job:86:36) {
  code: 'ERR_MODULE_NOT_FOUND',
  url: 'file:///home/pi/eaglerproxy/build/plugins/EagProxyAAS/types.js'
}

Node.js v21.7.3

Any help would be appreciated!

HunterBoy344 commented 1 month ago

nvm i am very stupid I'm supposed to edit the stuff in the src folder

HunterBoy344 commented 1 month ago

nvm again, building with the plugin missing still results in the same error!!! please help!!!

WorldEditAxe commented 1 month ago

@HunterBoy344 Please report separate/unrelated issues in separate GitHub issues -- it makes issue tracking easier for me and others. I have opened a separate issue for you (#33); please use that issue to communicate moving forward (with regard to this issue).