diff --git a/README.md b/README.md index c2ec68b..465007f 100644 --- a/README.md +++ b/README.md @@ -40,8 +40,10 @@ we can set up local listeners as proxy servers, and forward requests to internet - dhcpd: a simple dhcp server that can detect existing dhcp server and avoid conflicts ## Protocols +
click to see details + |Protocol | Listen/TCP | Listen/UDP | Forward/TCP | Forward/UDP | Description |:-: |:-:|:-:|:-:|:-:|:- |Mixed |√|√| | |http+socks5 server @@ -162,6 +164,7 @@ glider -verbose -listen :8443 -forward SCHEME://HOST:PORT ``` #### Schemes +
click to see details @@ -284,6 +287,16 @@ Forwarder option scheme: FORWARD_URL#OPTIONS vmess://[security:]uuid@host:port?alterID=num#priority=200 vmess://[security:]uuid@host:port?alterID=num#priority=200&interface=192.168.1.99 vmess://[security:]uuid@host:port?alterID=num#priority=200&interface=eth0 + +Services: + dhcpd: service=dhcpd,INTERFACE,START_IP,END_IP + e.g.,service=dhcpd,eth1,192.168.50.100,192.168.50.199 + +Config file format(see `./glider.conf.example` as an example): + # COMMENT LINE + KEY=VALUE + KEY=VALUE + # KEY equals to command line flag name: listen forward strategy... ```
@@ -326,10 +339,6 @@ Forwarder option scheme: FORWARD_URL#OPTIONS ./glider -verbose -listen -dns=:53 -dnsserver=8.8.8.8:53 -forward ss://method:pass@server:port -dnsrecord=www.example.com/1.2.3.4 -listen on :53 as dns server, forward to 8.8.8.8:53 via ss server. - -Services: - dhcpd: service=dhcpd,INTERFACE,START_IP,END_IP - e.g.,service=dhcpd,eth1,192.168.50.100,192.168.50.199 ```
diff --git a/config.go b/config.go index 7a6df28..d84e137 100644 --- a/config.go +++ b/config.go @@ -277,6 +277,11 @@ func usage() { fmt.Fprintf(w, " vmess://[security:]uuid@host:port?alterID=num#priority=200&interface=eth0\n") fmt.Fprintf(w, "\n") + fmt.Fprintf(w, "Services:\n") + fmt.Fprintf(w, " dhcpd: service=dhcpd,INTERFACE,START_IP,END_IP\n") + fmt.Fprintf(w, " e.g.,service=dhcpd,eth1,192.168.50.100,192.168.50.199\n") + fmt.Fprintf(w, "\n") + fmt.Fprintf(w, "Config file format(see `"+app+".conf.example` as an example):\n") fmt.Fprintf(w, " # COMMENT LINE\n") fmt.Fprintf(w, " KEY=VALUE\n") @@ -318,8 +323,4 @@ func usage() { fmt.Fprintf(w, " "+app+" -verbose -listen -dns=:53 -dnsserver=8.8.8.8:53 -forward ss://method:pass@server:port -dnsrecord=www.example.com/1.2.3.4\n") fmt.Fprintf(w, " -listen on :53 as dns server, forward to 8.8.8.8:53 via ss server.\n") fmt.Fprintf(w, "\n") - fmt.Fprintf(w, "Services:\n") - fmt.Fprintf(w, " dhcpd: service=dhcpd,INTERFACE,START_IP,END_IP\n") - fmt.Fprintf(w, " e.g.,service=dhcpd,eth1,192.168.50.100,192.168.50.199\n") - fmt.Fprintf(w, "\n") } diff --git a/go.mod b/go.mod index 63f999c..0624a2c 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( golang.org/x/mod v0.4.0 // indirect golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb // indirect golang.org/x/sys v0.0.0-20201202213521-69691e467435 // indirect - golang.org/x/tools v0.0.0-20201203230154-39497347062d // indirect + golang.org/x/tools v0.0.0-20201204062850-545788942d5f // indirect gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect ) diff --git a/go.sum b/go.sum index c7cdf00..74652c4 100644 --- a/go.sum +++ b/go.sum @@ -145,8 +145,8 @@ golang.org/x/tools v0.0.0-20200425043458-8463f397d07c/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200808161706-5bf02b21f123/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201105001634-bc3cf281b174 h1:0rx0F4EjJNbxTuzWe0KjKcIzs+3VEb/Mrs/d1ciNz1c= golang.org/x/tools v0.0.0-20201105001634-bc3cf281b174/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201203230154-39497347062d h1:ChJAHTAuCcMx4RHS9P/KnYnJ1UEgJDZNRtvF0TJ0wbg= -golang.org/x/tools v0.0.0-20201203230154-39497347062d/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201204062850-545788942d5f h1:xZehGf1UH366KQnttgsBQf+bkEpQSVfG4AJX7EIxXAY= +golang.org/x/tools v0.0.0-20201204062850-545788942d5f/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=