frpc_full.ini 9.6 KB

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