1
0

frps_full_example.toml 6.0 KB

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