frpc_full.ini 7.7 KB

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