frpc_full.ini 12 KB

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