frps.toml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. # A literal address or host name for IPv6 must be enclosed
  2. # in square brackets, as in "[::1]:80", "[ipv6-host]:http" or "[ipv6-host%zone]:80"
  3. # For single "bind_addr" field, no need square brackets, like "bind_addr = ::".
  4. bindAddr = "0.0.0.0"
  5. bindPort = 7000
  6. # udp port used for kcp protocol, it can be same with 'bind_port'.
  7. # if not set, kcp is disabled in frps.
  8. kcpBindPort = 7000
  9. # udp port used for quic protocol.
  10. # if not set, quic is disabled in frps.
  11. # quicBindPort = 7002
  12. # Specify which address proxy will listen for, default value is same with bind_addr
  13. # proxy_bind_addr = "127.0.0.1"
  14. # quic protocol options
  15. # transport.quic.keepalivePeriod = 10
  16. # transport.quic.maxIdleTimeout = 30
  17. # transport.quic.maxIncomingStreams = 100000
  18. # Heartbeat configure, it's not recommended to modify the default value
  19. # The default value of heartbeat_timeout is 90. Set negative value to disable it.
  20. # transport.heartbeatTimeout = 90
  21. # Pool count in each proxy will keep no more than maxPoolCount.
  22. transport.maxPoolCount = 5
  23. # If tcp stream multiplexing is used, default is true
  24. # transport.tcpMux = true
  25. # Specify keep alive interval for tcp mux.
  26. # only valid if tcpMux is true.
  27. # transport.tcpMuxKeepaliveInterval = 60
  28. # tcpKeepalive specifies the interval between keep-alive probes for an active network connection between frpc and frps.
  29. # If negative, keep-alive probes are disabled.
  30. # transport.tcpKeepalive = 7200
  31. # transport.tls.force specifies whether to only accept TLS-encrypted connections. By default, the value is false.
  32. tls.force = false
  33. # transport.tls.certFile = "server.crt"
  34. # transport.tls.keyFile = "server.key"
  35. # transport.tls.trustedCaFile = "ca.crt"
  36. # If you want to support virtual host, you must set the http port for listening (optional)
  37. # Note: http port and https port can be same with bind_port
  38. vhostHTTPPort = 80
  39. vhostHTTPSPort = 443
  40. # Response header timeout(seconds) for vhost http server, default is 60s
  41. # vhostHTTPTimeout = 60
  42. # tcpmuxHTTPConnectPort specifies the port that the server listens for TCP
  43. # HTTP CONNECT requests. If the value is 0, the server will not multiplex TCP
  44. # requests on one single port. If it's not - it will listen on this value for
  45. # HTTP CONNECT requests. By default, this value is 0.
  46. # tcpmuxHTTPConnectPort = 1337
  47. # If tcpmux_passthrough is true, frps won't do any update on traffic.
  48. # tcpmuxPassthrough = false
  49. # Configure the web server to enable the dashboard for frps.
  50. # dashboard is available only if webServer.port is set.
  51. webServer.addr = "127.0.0.1"
  52. webServer.port = 7500
  53. webServer.user = "admin"
  54. webServer.password = "admin"
  55. # webServer.tls.certFile = "server.crt"
  56. # webServer.tls.keyFile = "server.key"
  57. # dashboard assets directory(only for debug mode)
  58. # webServer.assetsDir = "./static"
  59. # Enable golang pprof handlers in dashboard listener.
  60. # Dashboard port must be set first
  61. webServer.pprofEnable = false
  62. # enablePrometheus will export prometheus metrics on webServer in /metrics api.
  63. enablePrometheus = true
  64. # console or real logFile path like ./frps.log
  65. log.to = "./frps.log"
  66. # trace, debug, info, warn, error
  67. log.level = "info"
  68. log.maxDays = 3
  69. # disable log colors when log.to is console, default is false
  70. log.disablePrintColor = false
  71. # DetailedErrorsToClient defines whether to send the specific error (with debug info) to frpc. By default, this value is true.
  72. detailedErrorsToClient = true
  73. # auth.method specifies what authentication method to use authenticate frpc with frps.
  74. # If "token" is specified - token will be read into login message.
  75. # If "oidc" is specified - OIDC (Open ID Connect) token will be issued using OIDC settings. By default, this value is "token".
  76. auth.method = "token"
  77. # auth.additionalScopes specifies additional scopes to include authentication information.
  78. # Optional values are HeartBeats, NewWorkConns.
  79. # auth.additionalScopes = ["HeartBeats", "NewWorkConns"]
  80. # auth token
  81. auth.token = "12345678"
  82. # oidc issuer specifies the issuer to verify OIDC tokens with.
  83. auth.oidc.issuer = ""
  84. # oidc audience specifies the audience OIDC tokens should contain when validated.
  85. auth.oidc.audience = ""
  86. # oidc skipExpiryCheck specifies whether to skip checking if the OIDC token is expired.
  87. auth.oidc.skipExpiryCheck = false
  88. # oidc skipIssuerCheck specifies whether to skip checking if the OIDC token's issuer claim matches the issuer specified in OidcIssuer.
  89. auth.oidc.skipIssuerCheck = false
  90. # userConnTimeout specifies the maximum time to wait for a work connection.
  91. # userConnTimeout = 10
  92. # Only allow frpc to bind ports you list. By default, there won't be any limit.
  93. allowPorts = [
  94. { start = 2000, end = 3000 },
  95. { single = 3001 },
  96. { single = 3003 },
  97. { start = 4000, end = 50000 }
  98. ]
  99. # Max ports can be used for each client, default value is 0 means no limit
  100. maxPortsPerClient = 0
  101. # If subDomainHost is not empty, you can set subdomain when type is http or https in frpc's configure file
  102. # When subdomain is est, the host used by routing is test.frps.com
  103. subDomainHost = "frps.com"
  104. # custom 404 page for HTTP requests
  105. # custom404Page = "/path/to/404.html"
  106. # specify udp packet size, unit is byte. If not set, the default value is 1500.
  107. # This parameter should be same between client and server.
  108. # It affects the udp and sudp proxy.
  109. udpPacketSize = 1500
  110. # Retention time for NAT hole punching strategy data.
  111. natholeAnalysisDataReserveHours = 168
  112. [[httpPlugins]]
  113. name = "user-manager"
  114. addr = "127.0.0.1:9000"
  115. path = "/handler"
  116. ops = ["Login"]
  117. [[httpPlugins]]
  118. name = "port-manager"
  119. addr = "127.0.0.1:9001"
  120. path = "/handler"
  121. ops = ["NewProxy"]