frpc_full.ini 6.7 KB

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