Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SRV records may not be routed correctly. #172

Open
viasnake opened this issue Mar 8, 2023 · 3 comments
Open

SRV records may not be routed correctly. #172

viasnake opened this issue Mar 8, 2023 · 3 comments
Labels
bug Something isn't working high priority Should be addressed as soon as possible

Comments

@viasnake
Copy link

viasnake commented Mar 8, 2023

Describe the bug
When using SRV records, the domain of the target is referenced.
As a result, routing does not work correctly.

To Reproduce
OS: Ubuntu 22.04.2 LTS (ARM)
Infrared Version: ghcr.io/haveachin/infrared:2.0.0-alpha.13
Docker compose:

version: '3'

services:
  infrared:
    image: ghcr.io/haveachin/infrared:2.0.0-alpha.13
    volumes:
      - ./infrared:/infrared
    ports:
      - target: 25565
        published: 25565
        protocol: tcp
        mode: host
    environment:
      INFRARED_CONFIG_PATH: "/configs"
    deploy:
      mode: global

Infrared Config:
server.yml

java:
  gateways:
    default:
      listeners:
        default:
          bind: :25565
  servers:
    server1:
      gateways:
        - default
      domains:
        - "mc1.example.com"
      address: 192.0.2.1:25565
      sendProxyProtocol: true
    server2:
      gateways:
        - default
      domains:
        - "servers.example.com"
      address: 192.0.2.2:25565
      sendProxyProtocol: true
    server3:
      gateways:
        - default
      domains:
        - "*"
      address: 192.0.2.3:25565
      sendProxyProtocol: true

How do you trigger the bug/issue?:

  1. After a basic set-up of Infrared, set up the Infrared config.
  2. DNS configuration. Shown below is the case for example.com.
;; A Records
servers.example.com.	1	IN	A	203.0.113.1
servers.example.com.	1	IN	A	203.0.113.2
servers.example.com.	1	IN	A	203.0.113.3
servers.example.com.	1	IN	A	203.0.113.4

;; SRV Records
_minecraft._tcp.mc1.example.com.	1	IN	SRV	1 100 25565 servers.example.com.
  1. Connect to the Minecraft server at mc1.example.com. You will then be connected to 192.0.2.2:25565.

Expected behavior
If you connect on mc1.example.com, you will be routed to 192.0.2.1:25565.

Additional context
I have only checked this with the Java Edition; it is possible that the Bedrock Editon may behave similarly, but since the Bedrock Edition does not allow the use of SRV records, I don't think this will be an issue.

@viasnake viasnake added the bug Something isn't working label Mar 8, 2023
@haveachin
Copy link
Owner

Great issue description. I'll look into it as soon as I have the time.

@yoblex
Copy link

yoblex commented Apr 5, 2023

solved the problem?

@haveachin
Copy link
Owner

Not yet, I'm trying to fit in some time to catch up with the backlog of tickets as soon as I have the time. I would also really appreciate some more active maintainers, but I'll probably need to write some more documentation until someone is brave enough to touch the code 😕

@haveachin haveachin added the high priority Should be addressed as soon as possible label Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority Should be addressed as soon as possible
Projects
None yet
Development

No branches or pull requests

3 participants