frpc_full.ini 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. # [common] is integral section
  2. [common]
  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 "server_addr" field, no need square brackets, like "server_addr = ::".
  6. server_addr = 0.0.0.0
  7. server_port = 7000
  8. # The maximum amount of time a dial to server will wait for a connect to complete. Default value is 10 seconds.
  9. # dial_server_timeout = 10
  10. # dial_server_keepalive specifies the interval between keep-alive probes for an active network connection between frpc and frps.
  11. # If negative, keep-alive probes are disabled.
  12. # dial_server_keepalive = 7200
  13. # if you want to connect frps by http proxy or socks5 proxy or ntlm proxy, you can set http_proxy here or in global environment variables
  14. # it only works when protocol is tcp
  15. # http_proxy = http://user:passwd@192.168.1.128:8080
  16. # http_proxy = socks5://user:passwd@192.168.1.128:1080
  17. # http_proxy = ntlm://user:passwd@192.168.1.128:2080
  18. # console or real logFile path like ./frpc.log
  19. log_file = ./frpc.log
  20. # trace, debug, info, warn, error
  21. log_level = info
  22. log_max_days = 3
  23. # disable log colors when log_file is console, default is false
  24. disable_log_color = false
  25. # for authentication, should be same as your frps.ini
  26. # authenticate_heartbeats specifies whether to include authentication token in heartbeats sent to frps. By default, this value is false.
  27. authenticate_heartbeats = false
  28. # authenticate_new_work_conns specifies whether to include authentication token in new work connections sent to frps. By default, this value is false.
  29. authenticate_new_work_conns = false
  30. # auth token
  31. token = 12345678
  32. authentication_method =
  33. # oidc_client_id specifies the client ID to use to get a token in OIDC authentication if AuthenticationMethod == "oidc".
  34. # By default, this value is "".
  35. oidc_client_id =
  36. # oidc_client_secret specifies the client secret to use to get a token in OIDC authentication if AuthenticationMethod == "oidc".
  37. # By default, this value is "".
  38. oidc_client_secret =
  39. # oidc_audience specifies the audience of the token in OIDC authentication if AuthenticationMethod == "oidc". By default, this value is "".
  40. oidc_audience =
  41. # oidc_scope specifies the permisssions of the token in OIDC authentication if AuthenticationMethod == "oidc". By default, this value is "".
  42. oidc_scope =
  43. # oidc_token_endpoint_url specifies the URL which implements OIDC Token Endpoint.
  44. # It will be used to get an OIDC token if AuthenticationMethod == "oidc". By default, this value is "".
  45. oidc_token_endpoint_url =
  46. # oidc_additional_xxx specifies additional parameters to be sent to the OIDC Token Endpoint.
  47. # For example, if you want to specify the "audience" parameter, you can set as follow.
  48. # frp will add "audience=<value>" "var1=<value>" to the additional parameters.
  49. # oidc_additional_audience = https://dev.auth.com/api/v2/
  50. # oidc_additional_var1 = foobar
  51. # set admin address for control frpc's action by http api such as reload
  52. admin_addr = 127.0.0.1
  53. admin_port = 7400
  54. admin_user = admin
  55. admin_pwd = admin
  56. # Admin assets directory. By default, these assets are bundled with frpc.
  57. # assets_dir = ./static
  58. # connections will be established in advance, default value is zero
  59. pool_count = 5
  60. # if tcp stream multiplexing is used, default is true, it must be same with frps
  61. # tcp_mux = true
  62. # specify keep alive interval for tcp mux.
  63. # only valid if tcp_mux is true.
  64. # tcp_mux_keepalive_interval = 60
  65. # your proxy name will be changed to {user}.{proxy}
  66. user = your_name
  67. # decide if exit program when first login failed, otherwise continuous relogin to frps
  68. # default is true
  69. login_fail_exit = true
  70. # communication protocol used to connect to server
  71. # supports tcp, kcp, quic and websocket now, default is tcp
  72. protocol = tcp
  73. # set client binding ip when connect server, default is empty.
  74. # only when protocol = tcp or websocket, the value will be used.
  75. connect_server_local_ip = 0.0.0.0
  76. # quic protocol options
  77. # quic_keepalive_period = 10
  78. # quic_max_idle_timeout = 30
  79. # quic_max_incoming_streams = 100000
  80. # if tls_enable is true, frpc will connect frps by tls
  81. tls_enable = true
  82. # tls_cert_file = client.crt
  83. # tls_key_file = client.key
  84. # tls_trusted_ca_file = ca.crt
  85. # tls_server_name = example.com
  86. # specify a dns server, so frpc will use this instead of default one
  87. # dns_server = 8.8.8.8
  88. # proxy names you want to start separated by ','
  89. # default is empty, means all proxies
  90. # start = ssh,dns
  91. # heartbeat configure, it's not recommended to modify the default value
  92. # The default value of heartbeat_interval is 10 and heartbeat_timeout is 90. Set negative value
  93. # to disable it.
  94. # heartbeat_interval = 30
  95. # heartbeat_timeout = 90
  96. # additional meta info for client
  97. meta_var1 = 123
  98. meta_var2 = 234
  99. # specify udp packet size, unit is byte. If not set, the default value is 1500.
  100. # This parameter should be same between client and server.
  101. # It affects the udp and sudp proxy.
  102. udp_packet_size = 1500
  103. # include other config files for proxies.
  104. # includes = ./confd/*.ini
  105. # By default, frpc will connect frps with first custom byte if tls is enabled.
  106. # If DisableCustomTLSFirstByte is true, frpc will not send that custom byte.
  107. disable_custom_tls_first_byte = false
  108. # Enable golang pprof handlers in admin listener.
  109. # Admin port must be set first.
  110. pprof_enable = false
  111. # 'ssh' is the unique proxy name
  112. # if user in [common] section is not empty, it will be changed to {user}.{proxy} such as 'your_name.ssh'
  113. [ssh]
  114. # tcp | udp | http | https | stcp | xtcp, default is tcp
  115. type = tcp
  116. local_ip = 127.0.0.1
  117. local_port = 22
  118. # limit bandwidth for this proxy, unit is KB and MB
  119. bandwidth_limit = 1MB
  120. # where to limit bandwidth, can be 'client' or 'server', default is 'client'
  121. bandwidth_limit_mode = client
  122. # true or false, if true, messages between frps and frpc will be encrypted, default is false
  123. use_encryption = false
  124. # if true, message will be compressed
  125. use_compression = false
  126. # remote port listen by frps
  127. remote_port = 6001
  128. # frps will load balancing connections for proxies in same group
  129. group = test_group
  130. # group should have same group key
  131. group_key = 123456
  132. # enable health check for the backend service, it support 'tcp' and 'http' now
  133. # frpc will connect local service's port to detect it's healthy status
  134. health_check_type = tcp
  135. # health check connection timeout
  136. health_check_timeout_s = 3
  137. # if continuous failed in 3 times, the proxy will be removed from frps
  138. health_check_max_failed = 3
  139. # every 10 seconds will do a health check
  140. health_check_interval_s = 10
  141. # additional meta info for each proxy
  142. meta_var1 = 123
  143. meta_var2 = 234
  144. [ssh_random]
  145. type = tcp
  146. local_ip = 127.0.0.1
  147. local_port = 22
  148. # if remote_port is 0, frps will assign a random port for you
  149. remote_port = 0
  150. # if you want to expose multiple ports, add 'range:' prefix to the section name
  151. # frpc will generate multiple proxies such as 'tcp_port_6010', 'tcp_port_6011' and so on.
  152. [range:tcp_port]
  153. type = tcp
  154. local_ip = 127.0.0.1
  155. local_port = 6010-6020,6022,6024-6028
  156. remote_port = 6010-6020,6022,6024-6028
  157. use_encryption = false
  158. use_compression = false
  159. [dns]
  160. type = udp
  161. local_ip = 114.114.114.114
  162. local_port = 53
  163. remote_port = 6002
  164. use_encryption = false
  165. use_compression = false
  166. [range:udp_port]
  167. type = udp
  168. local_ip = 127.0.0.1
  169. local_port = 6010-6020
  170. remote_port = 6010-6020
  171. use_encryption = false
  172. use_compression = false
  173. # Resolve your domain names to [server_addr] so you can use http://web01.yourdomain.com to browse web01 and http://web02.yourdomain.com to browse web02
  174. [web01]
  175. type = http
  176. local_ip = 127.0.0.1
  177. local_port = 80
  178. use_encryption = false
  179. use_compression = true
  180. # http username and password are safety certification for http protocol
  181. # if not set, you can access this custom_domains without certification
  182. http_user = admin
  183. http_pwd = admin
  184. # if domain for frps is frps.com, then you can access [web01] proxy by URL http://web01.frps.com
  185. subdomain = web01
  186. custom_domains = web01.yourdomain.com
  187. # locations is only available for http type
  188. locations = /,/pic
  189. # route requests to this service if http basic auto user is abc
  190. # route_by_http_user = abc
  191. host_header_rewrite = example.com
  192. # params with prefix "header_" will be used to update http request headers
  193. header_X-From-Where = frp
  194. health_check_type = http
  195. # frpc will send a GET http request '/status' to local http service
  196. # http service is alive when it return 2xx http response code
  197. health_check_url = /status
  198. health_check_interval_s = 10
  199. health_check_max_failed = 3
  200. health_check_timeout_s = 3
  201. [web02]
  202. type = https
  203. local_ip = 127.0.0.1
  204. local_port = 8000
  205. use_encryption = false
  206. use_compression = false
  207. subdomain = web01
  208. custom_domains = web02.yourdomain.com
  209. # if not empty, frpc will use proxy protocol to transfer connection info to your local service
  210. # v1 or v2 or empty
  211. proxy_protocol_version = v2
  212. [plugin_unix_domain_socket]
  213. type = tcp
  214. remote_port = 6003
  215. # if plugin is defined, local_ip and local_port is useless
  216. # plugin will handle connections got from frps
  217. plugin = unix_domain_socket
  218. # params with prefix "plugin_" that plugin needed
  219. plugin_unix_path = /var/run/docker.sock
  220. [plugin_http_proxy]
  221. type = tcp
  222. remote_port = 6004
  223. plugin = http_proxy
  224. plugin_http_user = abc
  225. plugin_http_passwd = abc
  226. [plugin_socks5]
  227. type = tcp
  228. remote_port = 6005
  229. plugin = socks5
  230. plugin_user = abc
  231. plugin_passwd = abc
  232. [plugin_static_file]
  233. type = tcp
  234. remote_port = 6006
  235. plugin = static_file
  236. plugin_local_path = /var/www/blog
  237. plugin_strip_prefix = static
  238. plugin_http_user = abc
  239. plugin_http_passwd = abc
  240. [plugin_https2http]
  241. type = https
  242. custom_domains = test.yourdomain.com
  243. plugin = https2http
  244. plugin_local_addr = 127.0.0.1:80
  245. plugin_crt_path = ./server.crt
  246. plugin_key_path = ./server.key
  247. plugin_host_header_rewrite = 127.0.0.1
  248. plugin_header_X-From-Where = frp
  249. [plugin_https2https]
  250. type = https
  251. custom_domains = test.yourdomain.com
  252. plugin = https2https
  253. plugin_local_addr = 127.0.0.1:443
  254. plugin_crt_path = ./server.crt
  255. plugin_key_path = ./server.key
  256. plugin_host_header_rewrite = 127.0.0.1
  257. plugin_header_X-From-Where = frp
  258. [plugin_http2https]
  259. type = http
  260. custom_domains = test.yourdomain.com
  261. plugin = http2https
  262. plugin_local_addr = 127.0.0.1:443
  263. plugin_host_header_rewrite = 127.0.0.1
  264. plugin_header_X-From-Where = frp
  265. [secret_tcp]
  266. # If the type is secret tcp, remote_port is useless
  267. # Who want to connect local port should deploy another frpc with stcp proxy and role is visitor
  268. type = stcp
  269. # sk used for authentication for visitors
  270. sk = abcdefg
  271. local_ip = 127.0.0.1
  272. local_port = 22
  273. use_encryption = false
  274. use_compression = false
  275. # user of frpc should be same in both stcp server and stcp visitor
  276. [secret_tcp_visitor]
  277. # frpc role visitor -> frps -> frpc role server
  278. role = visitor
  279. type = stcp
  280. # the server name you want to visitor
  281. server_name = secret_tcp
  282. sk = abcdefg
  283. # connect this address to visitor stcp server
  284. bind_addr = 127.0.0.1
  285. bind_port = 9000
  286. use_encryption = false
  287. use_compression = false
  288. [p2p_tcp]
  289. type = xtcp
  290. sk = abcdefg
  291. local_ip = 127.0.0.1
  292. local_port = 22
  293. use_encryption = false
  294. use_compression = false
  295. [p2p_tcp_visitor]
  296. role = visitor
  297. type = xtcp
  298. server_name = p2p_tcp
  299. sk = abcdefg
  300. bind_addr = 127.0.0.1
  301. bind_port = 9001
  302. use_encryption = false
  303. use_compression = false
  304. [tcpmuxhttpconnect]
  305. type = tcpmux
  306. multiplexer = httpconnect
  307. local_ip = 127.0.0.1
  308. local_port = 10701
  309. custom_domains = tunnel1
  310. # route_by_http_user = user1