frpc_full.ini 6.7 KB

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