# The socket bind address for all services except admin. 127.0.0.1 is the
# default for local testing, for public servers use 0.0.0.0 instead.
bind = 127.0.0.1

# The public host name or IP address. Used to forward clients from the login
# server to the world server. The default value will only allow local connections.
public = 127.0.0.1

# Login server configuration
login {
  # UDP listening port
  port = 51000

  # Account usernames that don't exist yet will be automatically created in the
  # database. Useful for test servers and development testing.
  create-missing-accounts = yes
}

# World server configuration
world {
  # UDP listening port
  port = 51001

  # The name of the server as displayed in the server browser.
  server-name = PSForever

  # How the server is displayed in the server browser.
  # One of: released beta development
  server-type = released
}

# Admin API configuration
admin {
  # TCP listening port
  port = 51002

  # The socket bind address
  bind = 127.0.0.1
}

# Database configuration
database {
  # The hostname of the PostgreSQL server.
  host = localhost

  # The TCP port to connect to the database with.
  port = 5432

  # The username to connect to the SQL server with.
  username = psforever

  # The password to connect to the SQL server with.
  password = psforever

  # The database name to use on the SQL server.
  database = psforever

  # The SSL configuration of the database connection.
  # One of: disable prefer require verify-full
  sslmode = prefer
}

anti-cheat {
  # The distance (squared) threshold that triggers if the reported hit location
  # of a shot does not match the object being hit's location on the server
  # One of 1-1000000 (sqrt 10000 = ~100 ingame units)
  hit-position-discrepancy-threshold = 10000
}

network {
  session {
    # The maximum amount of time since the last inbound packet from a UDP session
    # before it is dropped.
    inbound-grace-time = 1 minute

    # The maximum amount of time since the last outbound packet for a UDP session
    # before it is dropped. Can be used as a watchdog for hung server sessions.
    outbound-grace-time = 1 minute
  }
}

developer {
  net-sim {
    # Enable artificial packet unreliability. Used for development testing.
    # Active equally on upstream and downstream packets.
    enable = no

    # The percentage of outgoing and incoming packets that are dropped.
    loss = 0.02

    # The time a packet is buffered before being delivered to simulate delay.
    # The artificial delay is in addition to any real network latency.
    delay = 150 milliseconds

    # The percentage chance that a packet will be ordered randomly in the delay
    # buffer. If the delay is too small then packets won't be reordered.
    reorder-chance = 0.005

    # If a packet is reordered, the maximum time in the future or the past where
    # it will randomly appear.
    reorder-time = 150 milliseconds
  }
}

kamon {
  # Enables reporting of metrics to Kamon.io
  enable = no

  environment.service = "PSForever"
  apm.api-key = ""
}

include "akka"
include "dispatchers"
