frpc_full.ini 9.1 KB

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