frpc_full.ini 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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, 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. [ssh_random]
  58. type = tcp
  59. local_ip = 127.0.0.1
  60. local_port = 22
  61. # if remote_port is 0, frps will assign a random port for you
  62. remote_port = 0
  63. # if you want to expose multiple ports, add 'range:' prefix to the section name
  64. # frpc will generate multiple proxies such as 'tcp_port_6010', 'tcp_port_6011' and so on.
  65. [range:tcp_port]
  66. type = tcp
  67. local_ip = 127.0.0.1
  68. local_port = 6010-6020,6022,6024-6028
  69. remote_port = 6010-6020,6022,6024-6028
  70. use_encryption = false
  71. use_compression = false
  72. [dns]
  73. type = udp
  74. local_ip = 114.114.114.114
  75. local_port = 53
  76. remote_port = 6002
  77. use_encryption = false
  78. use_compression = false
  79. [range:udp_port]
  80. type = udp
  81. local_ip = 127.0.0.1
  82. local_port = 6010-6020
  83. remote_port = 6010-6020
  84. use_encryption = false
  85. use_compression = false
  86. # 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
  87. [web01]
  88. type = http
  89. local_ip = 127.0.0.1
  90. local_port = 80
  91. use_encryption = false
  92. use_compression = true
  93. # http username and password are safety certification for http protocol
  94. # if not set, you can access this custom_domains without certification
  95. http_user = admin
  96. http_pwd = admin
  97. # if domain for frps is frps.com, then you can access [web01] proxy by URL http://test.frps.com
  98. subdomain = web01
  99. custom_domains = web02.yourdomain.com
  100. # locations is only available for http type
  101. locations = /,/pic
  102. host_header_rewrite = example.com
  103. # params with prefix "header_" will be used to update http request headers
  104. header_X-From-Where = frp
  105. [web02]
  106. type = https
  107. local_ip = 127.0.0.1
  108. local_port = 8000
  109. use_encryption = false
  110. use_compression = false
  111. subdomain = web01
  112. custom_domains = web02.yourdomain.com
  113. [plugin_unix_domain_socket]
  114. type = tcp
  115. remote_port = 6003
  116. # if plugin is defined, local_ip and local_port is useless
  117. # plugin will handle connections got from frps
  118. plugin = unix_domain_socket
  119. # params with prefix "plugin_" that plugin needed
  120. plugin_unix_path = /var/run/docker.sock
  121. [plugin_http_proxy]
  122. type = tcp
  123. remote_port = 6004
  124. plugin = http_proxy
  125. plugin_http_user = abc
  126. plugin_http_passwd = abc
  127. [plugin_socks5]
  128. type = tcp
  129. remote_port = 6005
  130. plugin = socks5
  131. plugin_user = abc
  132. plugin_passwd = abc
  133. [plugin_static_file]
  134. type = tcp
  135. remote_port = 6006
  136. plugin = static_file
  137. plugin_local_path = /var/www/blog
  138. plugin_strip_prefix = static
  139. plugin_http_user = abc
  140. plugin_http_passwd = abc
  141. [secret_tcp]
  142. # If the type is secret tcp, remote_port is useless
  143. # Who want to connect local port should deploy another frpc with stcp proxy and role is visitor
  144. type = stcp
  145. # sk used for authentication for visitors
  146. sk = abcdefg
  147. local_ip = 127.0.0.1
  148. local_port = 22
  149. use_encryption = false
  150. use_compression = false
  151. # user of frpc should be same in both stcp server and stcp visitor
  152. [secret_tcp_visitor]
  153. # frpc role visitor -> frps -> frpc role server
  154. role = visitor
  155. type = stcp
  156. # the server name you want to visitor
  157. server_name = secret_tcp
  158. sk = abcdefg
  159. # connect this address to visitor stcp server
  160. bind_addr = 127.0.0.1
  161. bind_port = 9000
  162. use_encryption = false
  163. use_compression = false
  164. [p2p_tcp]
  165. type = xtcp
  166. sk = abcdefg
  167. local_ip = 127.0.0.1
  168. local_port = 22
  169. use_encryption = false
  170. use_compression = false
  171. [p2p_tcp_visitor]
  172. role = visitor
  173. type = xtcp
  174. server_name = p2p_tcp
  175. sk = abcdefg
  176. bind_addr = 127.0.0.1
  177. bind_port = 9001
  178. use_encryption = false
  179. use_compression = false