haveachin / infrared

An ultra lightweight minecraft reverse proxy and idle placeholder
https://infrared.dev
GNU Affero General Public License v3.0
755 stars 61 forks source link

Changing the default port #215

Open lnxredir opened 1 month ago

lnxredir commented 1 month ago

Hello! I've started using infrared and it works wonderfully, the problem is I have a Alpha server running on my server and from what i've read it can't support versions bellow 1.6 (i think) so to keep the alpha server running normally using just my domain name, how can I change the default port from infrared while making it still work on more modern servers? Ill give an example bellow:

compose.yml

version: '3'

services:
  infrared:
    image: ghcr.io/haveachin/infrared:1.3.3
    container_name: infrared
    restart: unless-stopped
    stdin_open: true
    tty: true
    ports:
      - "25570:25570/tcp"
    volumes:
      - "./data/configs:/configs"
    expose:
      - "25570"
    environment:
      INFRARED_CONFIG_PATH: "/configs"

play.example.com.json

{
    "domainName": "play.example.com",
    "proxyTo": "192.168.3.4:25568",
    "listenTo": "0.0.0.0:25570",
    "disconnectMessage": "Goodbye",
    "offlineStatus": {
      "motd": "Server is currently offline :("
    }
}

I dont know if im doing something wrong but it doesn't work like it should. If i change it back to 25565 the server works but I cant run the alpha one.

haveachin commented 1 month ago

The configs look fine, but you need to use yourdomain.com:25570 to connect to Infrared if you change the port. So you also need to add the port at the end of the address. You might be able to mitigate this by also using a SRV record in your DNS settings