1
0

frpc_full.ini 8.1 KB

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