frpc_full.ini 10 KB

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