frpc_full.ini 5.3 KB

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