1
0

frpc_full.ini 9.2 KB

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