Explorar el Código

update README

fatedier hace 3 años
padre
commit
ccb85a9926
Se han modificado 2 ficheros con 29 adiciones y 2 borrados
  1. 26 2
      README.md
  2. 3 0
      conf/frpc_full.ini

+ 26 - 2
README.md

@@ -24,12 +24,13 @@ frp also has a P2P connect mode.
     * [Forward DNS query request](#forward-dns-query-request)
     * [Forward Unix domain socket](#forward-unix-domain-socket)
     * [Expose a simple HTTP file server](#expose-a-simple-http-file-server)
-    * [Enable HTTPS for local HTTP(s) service](#enable-https-for-local-https-service)
+    * [Enable HTTPS for local HTTP(S) service](#enable-https-for-local-https-service)
     * [Expose your service privately](#expose-your-service-privately)
     * [P2P Mode](#p2p-mode)
 * [Features](#features)
     * [Configuration Files](#configuration-files)
     * [Using Environment Variables](#using-environment-variables)
+    * [Split Configures Into Different Files](#split-configures-into-different-files)
     * [Dashboard](#dashboard)
     * [Admin UI](#admin-ui)
     * [Monitor](#monitor)
@@ -412,6 +413,27 @@ export FRP_SSH_REMOTE_PORT="6000"
 
 `frpc` will render configuration file template using OS environment variables. Remember to prefix your reference with `.Envs`.
 
+### Split Configures Into Different Files
+
+You can split multiple proxy configs into different files and include them in the main file.
+
+```ini
+# frpc.ini
+[common]
+server_addr = x.x.x.x
+server_port = 7000
+includes=./confd/*.ini
+```
+
+```ini
+# ./confd/test.ini
+[ssh]
+type = tcp
+local_ip = 127.0.0.1
+local_port = 22
+remote_port = 6000
+```
+
 ### Dashboard
 
 Check frp's status and proxies' statistics information by Dashboard.
@@ -624,10 +646,12 @@ admin_addr = 127.0.0.1
 admin_port = 7400
 ```
 
-Then run command `frpc reload -c ./frpc.ini` and wait for about 10 seconds to let `frpc` create or update or delete proxies.
+Then run command `frpc reload -c ./frpc.ini` and wait for about 10 seconds to let `frpc` create or update or remove proxies.
 
 **Note that parameters in [common] section won't be modified except 'start'.**
 
+You can run command `frpc verify -c ./frpc.ini` before reloading to check if there are config errors.
+
 ### Get proxy status from client
 
 Use `frpc status -c ./frpc.ini` to get status of all proxies. The `admin_addr` and `admin_port` fields are required for enabling HTTP API.

+ 3 - 0
conf/frpc_full.ini

@@ -102,6 +102,9 @@ meta_var2 = 234
 # It affects the udp and sudp proxy.
 udp_packet_size = 1500
 
+# include other config files for proxies.
+# includes = ./confd/*.ini
+
 # 'ssh' is the unique proxy name
 # if user in [common] section is not empty, it will be changed to {user}.{proxy} such as 'your_name.ssh'
 [ssh]