mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
doc: update documents for ver0.4
This commit is contained in:
1 parent
e7dd21289f
commit
ee6eec0b52
18 files changed
+19
-16
No files matched your search
@@ -0,0 +1,5 @@
|
||||
|
||||
# Verbose mode, print logs
|
||||
verbose=True
|
||||
|
||||
listen=:8443
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
# Verbose mode, print logs
|
||||
verbose=True
|
||||
|
||||
listen=:8443
|
||||
|
||||
forward=socks5://192.168.1.10:1080
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
# Verbose mode, print logs
|
||||
verbose=True
|
||||
|
||||
listen=:8443
|
||||
|
||||
# first connect forwarder1 then forwarder2 then internet
|
||||
forward=http://forwarder1:8080,socks5://forwarder2:1080
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
# Verbose mode, print logs
|
||||
verbose=True
|
||||
|
||||
listen=:8443
|
||||
|
||||
# first connect forwarder1 then forwarder2 then internet
|
||||
forward=http://forwarder1:8080,socks5://forwarder2:1080
|
||||
forward=http://1.1.1.1:8080
|
||||
|
||||
# Round Robin mode: rr
|
||||
# High Availability mode: ha
|
||||
strategy=rr
|
||||
|
||||
# Used to connect via forwarders, if the host is unreachable, the forwarder
|
||||
# will be set to disabled.
|
||||
# MUST be a HTTP website server address, format: HOST[:PORT]. HTTPS NOT SUPPORTED.
|
||||
checkwebsite=www.apple.com
|
||||
|
||||
# check duration(seconds)
|
||||
checkduration=30
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
# Verbose mode, print logs
|
||||
verbose=True
|
||||
|
||||
listen=:8443
|
||||
|
||||
# NOTE HERE:
|
||||
# Specify a rule file
|
||||
rulefile=office.rule
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
|
||||
# first connect forwarder1 then forwarder2 then internet
|
||||
forward=http://forwarder1:8080,socks5://forwarder2:1080
|
||||
forward=http://1.1.1.1:8080
|
||||
|
||||
# Round Robin mode: rr
|
||||
# High Availability mode: ha
|
||||
strategy=rr
|
||||
|
||||
checkwebsite=www.apple.com
|
||||
checkduration=30
|
||||
|
||||
|
||||
# matches abc.com and *.abc.com
|
||||
domain=abc.com
|
||||
|
||||
# matches 1.1.1.1
|
||||
ip=1.1.1.1
|
||||
|
||||
# matches 192.168.100.0/24
|
||||
cidr=192.168.100.0/24
|
||||
|
||||
domain=example1.com
|
||||
domain=example2.com
|
||||
domain=example3.com
|
||||
ip=2.2.2.2
|
||||
ip=3.3.3.3
|
||||
cidr=172.16.0.0/24
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
# matches abc.com and *.abc.com
|
||||
domain=abc.com
|
||||
|
||||
ip=127.0.0.1
|
||||
cidr=192.168.0.0/24
|
||||
cidr=192.168.1.0/24
|
||||
cidr=172.16.0.0/24
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
|
||||
# Verbose mode, print logs
|
||||
verbose=True
|
||||
|
||||
listen=:8443
|
||||
|
||||
# first connect forwarder1 then forwarder2 then internet
|
||||
forward=http://forwarder1:8080,socks5://forwarder2:1080
|
||||
forward=http://1.1.1.1:8080
|
||||
|
||||
# Round Robin mode: rr
|
||||
# High Availability mode: ha
|
||||
strategy=rr
|
||||
|
||||
checkwebsite=www.apple.com
|
||||
checkduration=30
|
||||
|
||||
|
||||
# NOTE HERE:
|
||||
# Specify a rule file
|
||||
rulefile=bypass.rule
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
# Verbose mode, print logs
|
||||
verbose=True
|
||||
|
||||
listen=:8443
|
||||
|
||||
# NOTE HERE:
|
||||
# specify a rule file
|
||||
rulefile=office.rule
|
||||
|
||||
# specify another rule file
|
||||
rulefile=home.rule
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
|
||||
forward=http://forwarder4:8080
|
||||
|
||||
# first connect forwarder1 then forwarder2 then internet
|
||||
forward=http://forwarder5:8080,socks6://forwarder3:1080
|
||||
|
||||
|
||||
# Round Robin mode: rr
|
||||
# High Availability mode: ha
|
||||
strategy=rr
|
||||
|
||||
checkwebsite=www.apple.com
|
||||
checkduration=30
|
||||
|
||||
|
||||
# matches 192.168.0.0/16
|
||||
cidr=192.168.0.0/16
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
|
||||
forward=http://forwarder1:8080
|
||||
|
||||
# first connect forwarder2 then forwarder3 then internet
|
||||
forward=http://forwarder2:8080,socks5://forwarder3:1080
|
||||
|
||||
|
||||
# Round Robin mode: rr
|
||||
# High Availability mode: ha
|
||||
strategy=rr
|
||||
|
||||
checkwebsite=www.apple.com
|
||||
checkduration=30
|
||||
|
||||
|
||||
# matches 172.16.0.0/24
|
||||
cidr=172.16.0.0/24
|
||||
@@ -0,0 +1,92 @@
|
||||
|
||||
# Glider Configuration Examples
|
||||
|
||||
## 1. Simple Proxy Service
|
||||
Just listen on 8443 as HTTP/SOCKS5 proxy on the same port, forward all requests directly.
|
||||
|
||||
```
|
||||
Clients --> Listener --> Internet
|
||||
```
|
||||
|
||||
- [simple_proxy_service](1.simple_proxy_service)
|
||||
|
||||
## 2. One remote upstream proxy
|
||||
|
||||
```
|
||||
Clients --> Listener --> Forwarder --> Internet
|
||||
```
|
||||
|
||||
- [one_forwarder](2.one_forwarder)
|
||||
|
||||
## 3. One remote upstream PROXY CHAIN
|
||||
|
||||
```
|
||||
Clients --> Listener --> Forwarder1 --> Forwarder2 --> Internet
|
||||
```
|
||||
|
||||
- [forward_chain](3.forward_chain)
|
||||
|
||||
## 4. Multiple upstream proxies
|
||||
|
||||
```
|
||||
|Forwarder ----------------->|
|
||||
Clients --> Listener --> | | Internet
|
||||
|Forwarder --> Forwarder->...|
|
||||
```
|
||||
|
||||
- [multiple_forwarders](4.multiple_forwarders)
|
||||
|
||||
|
||||
## 5. With Rule File: Default Direct, Rule file use forwarder
|
||||
|
||||
Default:
|
||||
```
|
||||
Clients --> Listener --> Internet
|
||||
```
|
||||
Destinations specified in rule file:
|
||||
```
|
||||
|Forwarder ----------------->|
|
||||
Clients --> Listener --> | | Internet
|
||||
|Forwarder --> Forwarder->...|
|
||||
```
|
||||
|
||||
- [rule_default_direct](5.rule_default_direct)
|
||||
|
||||
|
||||
## 6. With Rule File: Default use forwarder, rule file use direct
|
||||
|
||||
Default:
|
||||
```
|
||||
|Forwarder ----------------->|
|
||||
Clients --> Listener --> | | Internet
|
||||
|Forwarder --> Forwarder->...|
|
||||
```
|
||||
|
||||
Destinations specified in rule file:
|
||||
```
|
||||
Clients --> Listener --> Internet
|
||||
```
|
||||
|
||||
- [rule_default_forwarder](6.rule_default_forwarder)
|
||||
|
||||
|
||||
## 7. With Rule File: multiple rule files
|
||||
|
||||
Default:
|
||||
```
|
||||
Clients --> Listener --> Internet
|
||||
```
|
||||
Destinations specified in rule file1:
|
||||
```
|
||||
|Forwarder1 ----------------->|
|
||||
Clients --> Listener --> | | Internet
|
||||
|Forwarder2 --> Forwarder3->...|
|
||||
```
|
||||
Destinations specified in rule file2:
|
||||
```
|
||||
|Forwarder4 ----------------->|
|
||||
Clients --> Listener --> | | Internet
|
||||
|Forwarder5 --> Forwarder6->...|
|
||||
```
|
||||
|
||||
- [rule_multiple_rule_files](7.rule_multiple_rule_files)
|
||||
@@ -0,0 +1,103 @@
|
||||
##########################################
|
||||
# __ _ _ ___ ____ ___
|
||||
# / /`_ | | | | | | \ | |_ | |_)
|
||||
# \_\_/ |_|__ |_| |_|_/ |_|__ |_| \
|
||||
#
|
||||
# Glider is a forward proxy with multiple protocols support.
|
||||
#
|
||||
# We can set up local listeners as proxy, and forward requests to internet via forwarders.
|
||||
#
|
||||
# |Forwarder ----------------->|
|
||||
# Listener --> | | Internet
|
||||
# |Forwarder --> Forwarder->...|
|
||||
#
|
||||
# -----------------------------------------------------------
|
||||
#
|
||||
# This is a sample configuration file for glider.
|
||||
#
|
||||
# Format is one option per line, legal options are the same
|
||||
# as the options legal on the command line. See "glider -help" for details.
|
||||
#
|
||||
# Comment line starts with "#", values set in the format:
|
||||
# KEY=VALUE
|
||||
#
|
||||
# -----------------------------------------------------------
|
||||
|
||||
# Verbose mode, print logs
|
||||
verbose=True
|
||||
|
||||
# LISTENERS
|
||||
# ---------
|
||||
# Local listeners, we can set up multiple listeners on different port with
|
||||
# different protocols.
|
||||
|
||||
# listen on 8443, serve as http/socks5 proxy on the same port.
|
||||
listen=:8443
|
||||
|
||||
# listen on 8448 as a ss server.
|
||||
# listen=ss://AEAD_CHACHA20_POLY1305:pass@:8448
|
||||
|
||||
# listen on 8080 as a http proxy server.
|
||||
listen=http://:8080
|
||||
|
||||
# listen on 1080 as a socks5 proxy server.
|
||||
listen=socks5://:1080
|
||||
|
||||
# listen on 1081 as a linux transparent proxy server.
|
||||
# listen=redir://:1081
|
||||
|
||||
# listen on 1082 as a tcp tunnel, all requests to :1082 will be forward to 1.1.1.1:80
|
||||
# listen=tcptun://:1082=1.1.1.1:80
|
||||
|
||||
# listen on udp port 53, act as a local dns server,
|
||||
# forward all requests to 8.8.8.8:53 via tcp protocol
|
||||
# listen=dnstun://:53=8.8.8.8:53
|
||||
|
||||
|
||||
# FORWARDERS
|
||||
# ----------
|
||||
# Forwarders, we can setup multiple forwarders.
|
||||
|
||||
# Socks5 proxy as forwarder
|
||||
#forward=socks5://192.168.1.10:1080
|
||||
|
||||
# SS proxy as forwarder
|
||||
# forward=ss://method:pass@1.1.1.1:8443
|
||||
|
||||
# http proxy as forwarder
|
||||
# forward=http://1.1.1.1:8080
|
||||
|
||||
|
||||
# FORWARDER CHAIN
|
||||
# ---------------
|
||||
# We can setup a forward chain using 1 forward option,
|
||||
# use comma to separate different upstream forward proxies.
|
||||
#forward=http://1.1.1.1:8080,socks5://2.2.2.2:1080
|
||||
|
||||
# FORWARDE STRATEGY
|
||||
# -----------------
|
||||
# If we set up multiple forwarders, we can use them in our own strategy.
|
||||
|
||||
# Round Robin mode: rr
|
||||
# High Availability mode: ha
|
||||
strategy=rr
|
||||
|
||||
|
||||
# FORWARDERS CHECK
|
||||
# ----------------
|
||||
# We can check whether a forwarder is available.
|
||||
|
||||
# Used to connect via forwarders, if the host is unreachable, the forwarder
|
||||
# will be set to disabled.
|
||||
# MUST be a HTTP website server address, format: HOST[:PORT]. HTTPS NOT SUPPORTED.
|
||||
checkwebsite=www.apple.com
|
||||
|
||||
# check duration(seconds)
|
||||
checkduration=30
|
||||
|
||||
|
||||
# RULE FILES
|
||||
# ----------
|
||||
# Specify additional forward rules
|
||||
#rulefile=office.rule
|
||||
#rulefile=home.rule
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
ip=127.0.0.1
|
||||
cidr=192.168.1.0/24
|
||||
@@ -0,0 +1,36 @@
|
||||
# Glider rule configuration file.
|
||||
#
|
||||
# Format is the same as glider main config file.
|
||||
# EXCEPTION: Listeners are NOT allowed to setup here.
|
||||
|
||||
# FORWARDERS
|
||||
# ----------
|
||||
# Forwarders, we can setup multiple forwarders.
|
||||
forward=socks5://192.168.1.10:1080
|
||||
forward=ss://method:pass@1.1.1.1:8443
|
||||
forward=http://192.168.2.1:8080,socks5://192.168.2.2:1080
|
||||
|
||||
strategy=rr
|
||||
|
||||
checkwebsite=www.apple.com
|
||||
checkduration=30
|
||||
|
||||
# DESTINATIONS
|
||||
# ------------
|
||||
# ALL destinations matches the following rules will be forward using forwarders specified above
|
||||
|
||||
# matches abc.com and *.abc.com
|
||||
domain=abc.com
|
||||
|
||||
# matches 1.1.1.1
|
||||
ip=1.1.1.1
|
||||
|
||||
# matches 192.168.100.0/24
|
||||
cidr=192.168.100.0/24
|
||||
|
||||
domain=example1.com
|
||||
domain=example2.com
|
||||
domain=example3.com
|
||||
ip=2.2.2.2
|
||||
ip=3.3.3.3
|
||||
cidr=172.16.0.0/24
|
||||
Reference in new issue
Block a user