frpc_full.ini 8.8 KB

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