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