1
0

frpc_full.ini 7.6 KB

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