1
0

frpc_full.ini 9.9 KB

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