Skip to content
Anim Mouse edited this page Jun 12, 2022 · 5 revisions

Disable dashboard

  1. Disable the dashboard by commenting or removing these lines in frps.ini
# frp dashboard
#dashboard_addr = ::
#dashboard_port = 8080
#dashboard_user = {{ .Envs.FRP_DASH_USER }}
#dashboard_pwd = {{ .Envs.FRP_DASH_PWD }}
#enable_prometheus = true
  1. Remove dashboard environment variables. fly secrets set -a app-name FRP_DASH_USER= FRP_DASH_PWD=

TLS termination at fly.io

If you want fly.io to handle TLS and certificates for you.

  1. Add these lines in frps.ini
vhost_http_port  = 8080

TLS passthrough

If you want your server to handle TLS and certificates so that the connection is end-to-end encrypted and you manage the certificates at your server. Take note that you will lose fly.io's HTTP level load balancing and instead use TCP level load balancing.

  1. Comment or remove these lines in fly.toml
# frp HTTP server (for dashboard or HTTP tunnel)
#[[services]]
#  internal_port = 8080
#  protocol = "tcp"
#
#  [services.concurrency]
#    hard_limit = 25
#    soft_limit = 20
#    type = "connections"
#
#  [[services.ports]]
#    handlers = ["http"]
#    port = 80
#
#  [[services.ports]]
#    handlers = ["tls", "http"]
#    port = 443
#
#  [[services.tcp_checks]]
#    grace_period = "1s"
#    interval = "1m"
#    restart_limit = 0
#    timeout = "2s"
  1. Add these lines in fly.toml
# frp HTTP tunnel
[[services]]
  internal_port = 8080
  protocol = "tcp"

  [services.concurrency]
    hard_limit = 25
    soft_limit = 20
    type = "connections"

  [[services.ports]]
    port = 80

# frp HTTPS tunnel
[[services]]
  internal_port = 8081
  protocol = "tcp"

  [services.concurrency]
    hard_limit = 25
    soft_limit = 20
    type = "connections"

  [[services.ports]]
    port = 443
  1. Add these lines in frps.ini
vhost_http_port  = 8080
vhost_https_port = 8081

Clone this wiki locally