frpc_full.ini 9.5 KB

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