1
0

frpc_full.ini 5.2 KB

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