frpc_full.ini 7.7 KB

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