frpc_full.ini 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  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. # 'ssh' is the unique proxy name
  99. # if user in [common] section is not empty, it will be changed to {user}.{proxy} such as 'your_name.ssh'
  100. [ssh]
  101. # tcp | udp | http | https | stcp | xtcp, default is tcp
  102. type = tcp
  103. local_ip = 127.0.0.1
  104. local_port = 22
  105. # limit bandwidth for this proxy, unit is KB and MB
  106. bandwidth_limit = 1MB
  107. # true or false, if true, messages between frps and frpc will be encrypted, default is false
  108. use_encryption = false
  109. # if true, message will be compressed
  110. use_compression = false
  111. # remote port listen by frps
  112. remote_port = 6001
  113. # frps will load balancing connections for proxies in same group
  114. group = test_group
  115. # group should have same group key
  116. group_key = 123456
  117. # enable health check for the backend service, it support 'tcp' and 'http' now
  118. # frpc will connect local service's port to detect it's healthy status
  119. health_check_type = tcp
  120. # health check connection timeout
  121. health_check_timeout_s = 3
  122. # if continuous failed in 3 times, the proxy will be removed from frps
  123. health_check_max_failed = 3
  124. # every 10 seconds will do a health check
  125. health_check_interval_s = 10
  126. # additional meta info for each proxy
  127. meta_var1 = 123
  128. meta_var2 = 234
  129. [ssh_random]
  130. type = tcp
  131. local_ip = 127.0.0.1
  132. local_port = 22
  133. # if remote_port is 0, frps will assign a random port for you
  134. remote_port = 0
  135. # if you want to expose multiple ports, add 'range:' prefix to the section name
  136. # frpc will generate multiple proxies such as 'tcp_port_6010', 'tcp_port_6011' and so on.
  137. [range:tcp_port]
  138. type = tcp
  139. local_ip = 127.0.0.1
  140. local_port = 6010-6020,6022,6024-6028
  141. remote_port = 6010-6020,6022,6024-6028
  142. use_encryption = false
  143. use_compression = false
  144. [dns]
  145. type = udp
  146. local_ip = 114.114.114.114
  147. local_port = 53
  148. remote_port = 6002
  149. use_encryption = false
  150. use_compression = false
  151. [range:udp_port]
  152. type = udp
  153. local_ip = 127.0.0.1
  154. local_port = 6010-6020
  155. remote_port = 6010-6020
  156. use_encryption = false
  157. use_compression = false
  158. # 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
  159. [web01]
  160. type = http
  161. local_ip = 127.0.0.1
  162. local_port = 80
  163. use_encryption = false
  164. use_compression = true
  165. # http username and password are safety certification for http protocol
  166. # if not set, you can access this custom_domains without certification
  167. http_user = admin
  168. http_pwd = admin
  169. # if domain for frps is frps.com, then you can access [web01] proxy by URL http://web01.frps.com
  170. subdomain = web01
  171. custom_domains = web01.yourdomain.com
  172. # locations is only available for http type
  173. locations = /,/pic
  174. host_header_rewrite = example.com
  175. # params with prefix "header_" will be used to update http request headers
  176. header_X-From-Where = frp
  177. health_check_type = http
  178. # frpc will send a GET http request '/status' to local http service
  179. # http service is alive when it return 2xx http response code
  180. health_check_url = /status
  181. health_check_interval_s = 10
  182. health_check_max_failed = 3
  183. health_check_timeout_s = 3
  184. [web02]
  185. type = https
  186. local_ip = 127.0.0.1
  187. local_port = 8000
  188. use_encryption = false
  189. use_compression = false
  190. subdomain = web01
  191. custom_domains = web02.yourdomain.com
  192. # if not empty, frpc will use proxy protocol to transfer connection info to your local service
  193. # v1 or v2 or empty
  194. proxy_protocol_version = v2
  195. [plugin_unix_domain_socket]
  196. type = tcp
  197. remote_port = 6003
  198. # if plugin is defined, local_ip and local_port is useless
  199. # plugin will handle connections got from frps
  200. plugin = unix_domain_socket
  201. # params with prefix "plugin_" that plugin needed
  202. plugin_unix_path = /var/run/docker.sock
  203. [plugin_http_proxy]
  204. type = tcp
  205. remote_port = 6004
  206. plugin = http_proxy
  207. plugin_http_user = abc
  208. plugin_http_passwd = abc
  209. [plugin_socks5]
  210. type = tcp
  211. remote_port = 6005
  212. plugin = socks5
  213. plugin_user = abc
  214. plugin_passwd = abc
  215. [plugin_static_file]
  216. type = tcp
  217. remote_port = 6006
  218. plugin = static_file
  219. plugin_local_path = /var/www/blog
  220. plugin_strip_prefix = static
  221. plugin_http_user = abc
  222. plugin_http_passwd = abc
  223. [plugin_https2http]
  224. type = https
  225. custom_domains = test.yourdomain.com
  226. plugin = https2http
  227. plugin_local_addr = 127.0.0.1:80
  228. plugin_crt_path = ./server.crt
  229. plugin_key_path = ./server.key
  230. plugin_host_header_rewrite = 127.0.0.1
  231. plugin_header_X-From-Where = frp
  232. [plugin_https2https]
  233. type = https
  234. custom_domains = test.yourdomain.com
  235. plugin = https2https
  236. plugin_local_addr = 127.0.0.1:443
  237. plugin_crt_path = ./server.crt
  238. plugin_key_path = ./server.key
  239. plugin_host_header_rewrite = 127.0.0.1
  240. plugin_header_X-From-Where = frp
  241. [plugin_http2https]
  242. type = http
  243. custom_domains = test.yourdomain.com
  244. plugin = http2https
  245. plugin_local_addr = 127.0.0.1:443
  246. plugin_host_header_rewrite = 127.0.0.1
  247. plugin_header_X-From-Where = frp
  248. [secret_tcp]
  249. # If the type is secret tcp, remote_port is useless
  250. # Who want to connect local port should deploy another frpc with stcp proxy and role is visitor
  251. type = stcp
  252. # sk used for authentication for visitors
  253. sk = abcdefg
  254. local_ip = 127.0.0.1
  255. local_port = 22
  256. use_encryption = false
  257. use_compression = false
  258. # user of frpc should be same in both stcp server and stcp visitor
  259. [secret_tcp_visitor]
  260. # frpc role visitor -> frps -> frpc role server
  261. role = visitor
  262. type = stcp
  263. # the server name you want to visitor
  264. server_name = secret_tcp
  265. sk = abcdefg
  266. # connect this address to visitor stcp server
  267. bind_addr = 127.0.0.1
  268. bind_port = 9000
  269. use_encryption = false
  270. use_compression = false
  271. [p2p_tcp]
  272. type = xtcp
  273. sk = abcdefg
  274. local_ip = 127.0.0.1
  275. local_port = 22
  276. use_encryption = false
  277. use_compression = false
  278. [p2p_tcp_visitor]
  279. role = visitor
  280. type = xtcp
  281. server_name = p2p_tcp
  282. sk = abcdefg
  283. bind_addr = 127.0.0.1
  284. bind_port = 9001
  285. use_encryption = false
  286. use_compression = false
  287. [tcpmuxhttpconnect]
  288. type = tcpmux
  289. multiplexer = httpconnect
  290. local_ip = 127.0.0.1
  291. local_port = 10701
  292. custom_domains = tunnel1