frpc_full.ini 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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. # for authentication
  17. token = 12345678
  18. # set admin address for control frpc's action by http api such as reload
  19. admin_addr = 127.0.0.1
  20. admin_port = 7400
  21. admin_user = admin
  22. admin_passwd = admin
  23. # connections will be established in advance, default value is zero
  24. pool_count = 5
  25. # if tcp stream multiplexing is used, default is true, it must be same with frps
  26. tcp_mux = true
  27. # your proxy name will be changed to {user}.{proxy}
  28. user = your_name
  29. # decide if exit program when first login failed, otherwise continuous relogin to frps
  30. # default is true
  31. login_fail_exit = true
  32. # communication protocol used to connect to server
  33. # now it supports tcp and kcp and websocket, default is tcp
  34. protocol = tcp
  35. # specify a dns server, so frpc will use this instead of default one
  36. # dns_server = 8.8.8.8
  37. # proxy names you want to start divided by ','
  38. # default is empty, means all proxies
  39. # start = ssh,dns
  40. # heartbeat configure, it's not recommended to modify the default value
  41. # the default value of heartbeat_interval is 10 and heartbeat_timeout is 90
  42. # heartbeat_interval = 30
  43. # heartbeat_timeout = 90
  44. # 'ssh' is the unique proxy name
  45. # if user in [common] section is not empty, it will be changed to {user}.{proxy} such as 'your_name.ssh'
  46. [ssh]
  47. # tcp | udp | http | https | stcp | xtcp, default is tcp
  48. type = tcp
  49. local_ip = 127.0.0.1
  50. local_port = 22
  51. # true or false, if true, messages between frps and frpc will be encrypted, default is false
  52. use_encryption = false
  53. # if true, message will be compressed
  54. use_compression = false
  55. # remote port listen by frps
  56. remote_port = 6001
  57. # frps will load balancing connections for proxies in same group
  58. group = test_group
  59. # group should have same group key
  60. group_key = 123456
  61. [ssh_random]
  62. type = tcp
  63. local_ip = 127.0.0.1
  64. local_port = 22
  65. # if remote_port is 0, frps will assign a random port for you
  66. remote_port = 0
  67. # if you want to expose multiple ports, add 'range:' prefix to the section name
  68. # frpc will generate multiple proxies such as 'tcp_port_6010', 'tcp_port_6011' and so on.
  69. [range:tcp_port]
  70. type = tcp
  71. local_ip = 127.0.0.1
  72. local_port = 6010-6020,6022,6024-6028
  73. remote_port = 6010-6020,6022,6024-6028
  74. use_encryption = false
  75. use_compression = false
  76. [dns]
  77. type = udp
  78. local_ip = 114.114.114.114
  79. local_port = 53
  80. remote_port = 6002
  81. use_encryption = false
  82. use_compression = false
  83. [range:udp_port]
  84. type = udp
  85. local_ip = 127.0.0.1
  86. local_port = 6010-6020
  87. remote_port = 6010-6020
  88. use_encryption = false
  89. use_compression = false
  90. # 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
  91. [web01]
  92. type = http
  93. local_ip = 127.0.0.1
  94. local_port = 80
  95. use_encryption = false
  96. use_compression = true
  97. # http username and password are safety certification for http protocol
  98. # if not set, you can access this custom_domains without certification
  99. http_user = admin
  100. http_pwd = admin
  101. # if domain for frps is frps.com, then you can access [web01] proxy by URL http://test.frps.com
  102. subdomain = web01
  103. custom_domains = web02.yourdomain.com
  104. # locations is only available for http type
  105. locations = /,/pic
  106. host_header_rewrite = example.com
  107. # params with prefix "header_" will be used to update http request headers
  108. header_X-From-Where = frp
  109. [web02]
  110. type = https
  111. local_ip = 127.0.0.1
  112. local_port = 8000
  113. use_encryption = false
  114. use_compression = false
  115. subdomain = web01
  116. custom_domains = web02.yourdomain.com
  117. [plugin_unix_domain_socket]
  118. type = tcp
  119. remote_port = 6003
  120. # if plugin is defined, local_ip and local_port is useless
  121. # plugin will handle connections got from frps
  122. plugin = unix_domain_socket
  123. # params with prefix "plugin_" that plugin needed
  124. plugin_unix_path = /var/run/docker.sock
  125. [plugin_http_proxy]
  126. type = tcp
  127. remote_port = 6004
  128. plugin = http_proxy
  129. plugin_http_user = abc
  130. plugin_http_passwd = abc
  131. [plugin_socks5]
  132. type = tcp
  133. remote_port = 6005
  134. plugin = socks5
  135. plugin_user = abc
  136. plugin_passwd = abc
  137. [plugin_static_file]
  138. type = tcp
  139. remote_port = 6006
  140. plugin = static_file
  141. plugin_local_path = /var/www/blog
  142. plugin_strip_prefix = static
  143. plugin_http_user = abc
  144. plugin_http_passwd = abc
  145. [secret_tcp]
  146. # If the type is secret tcp, remote_port is useless
  147. # Who want to connect local port should deploy another frpc with stcp proxy and role is visitor
  148. type = stcp
  149. # sk used for authentication for visitors
  150. sk = abcdefg
  151. local_ip = 127.0.0.1
  152. local_port = 22
  153. use_encryption = false
  154. use_compression = false
  155. # user of frpc should be same in both stcp server and stcp visitor
  156. [secret_tcp_visitor]
  157. # frpc role visitor -> frps -> frpc role server
  158. role = visitor
  159. type = stcp
  160. # the server name you want to visitor
  161. server_name = secret_tcp
  162. sk = abcdefg
  163. # connect this address to visitor stcp server
  164. bind_addr = 127.0.0.1
  165. bind_port = 9000
  166. use_encryption = false
  167. use_compression = false
  168. [p2p_tcp]
  169. type = xtcp
  170. sk = abcdefg
  171. local_ip = 127.0.0.1
  172. local_port = 22
  173. use_encryption = false
  174. use_compression = false
  175. [p2p_tcp_visitor]
  176. role = visitor
  177. type = xtcp
  178. server_name = p2p_tcp
  179. sk = abcdefg
  180. bind_addr = 127.0.0.1
  181. bind_port = 9001
  182. use_encryption = false
  183. use_compression = false