frpc_full.ini 9.8 KB

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