haveachin/infrared

Infrared cannot show motd when server is not reachable

xhyrom opened this issue · 1 comments

Describe the bug
Infrared doesn't want to show motd when the server is offline, but when I connect it shows message.

To Reproduce
What OS are you using? Ubuntu 20.04
What version of Infrared are you using? rewrite (v2.0.0-alpha.10)
What do your Infrared proxy config(s) look like?


# This are recommended defaults that can be overridden by individual proxy configs.
# Feel free to change these values to your liking.
#
defaults:
  # Defaults for all Bedrock proxies.
  #
  bedrock:
    # Gateways are entrypoints of the proxy. All clients need to connect though a gateways.
    #
    gateway:
      # Listeners listen to a specific port (or address:port) of your system.
      #
      listener:
        # Compression for the protocol. This must be the same as in server you are trying to proxy to.
        # Valid compressions are:
        # - flate
        # - snappy
        #
        compression: flate

        # This is the ping response that clients see of your server. This cannot be handled at
        # server level due to a limitation of the bedrock protocol. See https://wiki.vg/Raknet_Protocol#Unconnected_Pong
        #
        pingStatus:
          # The edition of the minecraft server. Accepted values are: 
          # - MCPE (Pocket Edition; default for normal Bedrock Edition server)
          # - MCEE (Education Edition)
          #
          edition: MCPE
          
          # The protocol version number. For more info see https://wiki.vg/Bedrock_Protocol_version_numbers
          #
          protocolVersion: 544
          
          # Name of the version
          #
          versionName: "1.19.20.0"
          playerCount: 0
          maxPlayerCount: 10
          gameMode: SURVIVAL
          gameModeNumeric: 1
          motd: |
            Powered by Infrared
            Join!
      
      # The message that is displayed to a client when they try to connect via an invalid domain.
      #
      serverNotFoundMessage: Sorry {{username}}, but a server for {{serverDomain}} does not exist.

    # Servers are server configurations that redirect players to a minecraft server.
    #
    server:
      # Dial timeout is the amount of time the proxy waits until is declares the server as unreachable.
      #
      dialTimeout: 1s
      
      # The message that is displayed to a client when the server is unreachable.
      #
      dialTimeoutMessage: Sorry {{username}}, but the server is not reachable.
  
  # Defaults for all Java Proxies
  #
  java:
    gateway:
      listener:
        # The message that is displayed to a client when they try to connect via an invalid domain.
        #
        serverNotFoundMessage: Sorry {{username}}, but {{serverDomain}} was not found.

        # The Java Edition has a different approach to handling status pings, than the Bedrock Edition.
        # This makes it possible to display a custom message to clients if the domain that they want
        # to connect though has a server configuration behind it.
        #
        serverNotFoundStatus:
          versionName: Infrared
          # The protocol number. For more info see https://wiki.vg/Protocol_version_numbers
          #
          protocolNumber: 0
          maxPlayerCount: 0
          playerCount: 0
          iconPath: icons/default.png
          motd: |
            Powered by Infrared
            §c{{serverDomain}} was not found.
    server:
      overrideAddress: true
      dialTimeout: 1s
      dialTimeoutMessage: Sorry {{username}}, but the server is not reachable.
      # This is the message that is status response displayed to the client if the server is not
      # has a valid config but is not reachable.
      #
      dialTimeoutStatus:
        versionName: Infrared
        protocolNumber: 0
        maxPlayerCount: 0
        playerCount: 0
        iconPath: icons/default.png
        motd: |
          Powered by Infrared
          §6Server at {{serverDomain}} is not responding.
      
      # Infrared caches the server ping response so that status pings don't spam the minecraft server.
      # This is the Time To Live of the cache.
      #
      statusCacheTTL: 10s

java:
  # Channel Capacity (ChanCap) is the capacity of a single channel
  # You can think about channels like queues to this would translate
  # to queue size. These describe the amount of connections that can
  # be buffed before the proxy starts dropping connections.
  #
  chanCaps:
    # The capacity of the channel from the gateway to the processing nodes
    # If this is unset or 0
    #
    connProcessor: 100
    
    # The capacity of the channel from the processing nodes to the server gateway
    #
    server: 100
    
    # The capacity of the channel from the server gateway to the connection pool
    #
    connPool: 10
  
  # Processing nodes are the place where most of the processing is handled.
  processingNode:
    # Count describes the number of processing nodes that concurrently process
    # incoming connections. By increasing the count of processing nodes you can
    # tremendously reduce the effect of DDoS effects at the cost of performance.
    # If your CPU has a lot of threads then feel free to increase this number.
    #
    count: 10
    
    # This is the amount of time a client has to get processed before it get's disconnected
    # from the proxy. If you don't expect players form other continents you should decrease
    # this to some 100ms. If players have issues to connect you should increase this in small increments.
    #
    clientTimeout: 300ms
  
  # Middleware configurations
  middlewares:
    # Rate limiter limits the amount of request a single IP can do in a specific windows of time.
    rateLimiter:
      # The request limit it the amount of requests a single IP can make in a specific window of time.
      #
      requestLimit: 1
      
      # This is the window of time in that a single IP can make a specific amount of requests.
      #
      windowLength: 50ms

# See Java above
#
bedrock:
  chanCap:
    connProcessor: 100
    server: 100
    connPool: 10
  processingNode:
    count: 10
    clientTimeout: 1000ms
  middlewares:
    rateLimiter:
      requestLimit: 1
      windowLength: 50ms

How do you trigger the bug/issue? shut down server, refresh server list

Expected behavior
Show nice motd server is not reachable.

Screenshots (Optional)
If applicable, add screenshots to help explain your problem.
A copy of your logs would be nice, but please be sure to censor any information that you don't want to be public.
image

Should work now with v2.0.0-alpha.13