mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 17:35:40 +08:00
config: add new settings in examples for ver 0.4
This commit is contained in:
parent
ee6eec0b52
commit
a839f8d195
34
README.md
34
README.md
@ -34,6 +34,8 @@ General:
|
|||||||
- Periodical proxy checking
|
- Periodical proxy checking
|
||||||
- Rule proxy based on destinations: [Config Examples](config/examples)
|
- Rule proxy based on destinations: [Config Examples](config/examples)
|
||||||
- Ipset management
|
- Ipset management
|
||||||
|
- Add ip/cidrs in rule files on startup
|
||||||
|
- Add resolved ips for domains in rule files by dns forwarder server
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- [ ] UDP Tunnel
|
- [ ] UDP Tunnel
|
||||||
@ -171,8 +173,8 @@ verbose
|
|||||||
# listen on 8443, serve as http/socks5 proxy on the same port.
|
# listen on 8443, serve as http/socks5 proxy on the same port.
|
||||||
listen=:8443
|
listen=:8443
|
||||||
|
|
||||||
# listen on udp port 53, forward dns requests via tcp protocol
|
# listen on udp port 5353, forward dns requests via tcp protocol
|
||||||
listen=dnstun://:53=8.8.8.8:53
|
listen=dnstun://:5353=8.8.8.8:53
|
||||||
|
|
||||||
# upstream forward proxy
|
# upstream forward proxy
|
||||||
forward=socks5://192.168.1.10:1080
|
forward=socks5://192.168.1.10:1080
|
||||||
@ -194,13 +196,26 @@ checkwebsite=www.apple.com
|
|||||||
# check duration
|
# check duration
|
||||||
checkduration=30
|
checkduration=30
|
||||||
|
|
||||||
|
|
||||||
|
# Setup a dns forwarding server
|
||||||
|
dns://53
|
||||||
|
# global remote dns server (you can specify different dns server in rule file)
|
||||||
|
dnsserver=8.8.8.8:53
|
||||||
|
|
||||||
|
# Create and mange ipset on linux based on destinations in rule files
|
||||||
|
# - add ip/cidrs in rule files on startup
|
||||||
|
# - add resolved ips for domains in rule files by dns forwarder server
|
||||||
|
# Usually used in transparent proxy mode on linux
|
||||||
|
ipset=glider
|
||||||
|
|
||||||
# RULE FILES
|
# RULE FILES
|
||||||
|
rules-dir=rules.d
|
||||||
#rulefile=office.rule
|
#rulefile=office.rule
|
||||||
#rulefile=home.rule
|
#rulefile=home.rule
|
||||||
```
|
```
|
||||||
See:
|
See:
|
||||||
- [glider.conf.example](conf/glider.conf.example)
|
- [glider.conf.example](config/glider.conf.example)
|
||||||
- [examples](conf/examples)
|
- [examples](config/examples)
|
||||||
|
|
||||||
## Rule File
|
## Rule File
|
||||||
Rule file, **same as the config file but specify forwarders based on destinations**:
|
Rule file, **same as the config file but specify forwarders based on destinations**:
|
||||||
@ -213,6 +228,9 @@ strategy=rr
|
|||||||
checkwebsite=www.apple.com
|
checkwebsite=www.apple.com
|
||||||
checkduration=30
|
checkduration=30
|
||||||
|
|
||||||
|
# DNS SERVER for domains in this rule file
|
||||||
|
dnsserver=208.67.222.222:53
|
||||||
|
|
||||||
# YOU CAN SPECIFY DESTINATIONS TO USE THE ABOVE FORWARDERS
|
# YOU CAN SPECIFY DESTINATIONS TO USE THE ABOVE FORWARDERS
|
||||||
# matches abc.com and *.abc.com
|
# matches abc.com and *.abc.com
|
||||||
domain=abc.com
|
domain=abc.com
|
||||||
@ -222,10 +240,14 @@ ip=1.1.1.1
|
|||||||
|
|
||||||
# matches 192.168.100.0/24
|
# matches 192.168.100.0/24
|
||||||
cidr=192.168.100.0/24
|
cidr=192.168.100.0/24
|
||||||
|
|
||||||
|
# we can include a list file with only destinations settings
|
||||||
|
include=office.list.example
|
||||||
|
|
||||||
```
|
```
|
||||||
See:
|
See:
|
||||||
- [office.rule.example](conf/rules.d/office.rule.example)
|
- [office.rule.example](config/rules.d/office.rule.example)
|
||||||
- [examples](conf/examples)
|
- [examples](config/examples)
|
||||||
|
|
||||||
## Service
|
## Service
|
||||||
- systemd: [https://github.com/nadoo/glider/blob/master/systemd/](https://github.com/nadoo/glider/blob/master/systemd/)
|
- systemd: [https://github.com/nadoo/glider/blob/master/systemd/](https://github.com/nadoo/glider/blob/master/systemd/)
|
||||||
|
@ -49,9 +49,10 @@ listen=socks5://:1080
|
|||||||
# listen on 1082 as a tcp tunnel, all requests to :1082 will be forward to 1.1.1.1:80
|
# 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=tcptun://:1082=1.1.1.1:80
|
||||||
|
|
||||||
# listen on udp port 53, act as a local dns server,
|
# a dnstun is a special dns forwarder server with a fixed remote dns
|
||||||
|
# listen on udp port 5353, act as a local dns server,
|
||||||
# forward all requests to 8.8.8.8:53 via tcp protocol
|
# forward all requests to 8.8.8.8:53 via tcp protocol
|
||||||
# listen=dnstun://:53=8.8.8.8:53
|
# listen=dnstun://:5353=8.8.8.8:53
|
||||||
|
|
||||||
|
|
||||||
# FORWARDERS
|
# FORWARDERS
|
||||||
@ -74,6 +75,7 @@ listen=socks5://:1080
|
|||||||
# use comma to separate different upstream forward proxies.
|
# use comma to separate different upstream forward proxies.
|
||||||
#forward=http://1.1.1.1:8080,socks5://2.2.2.2:1080
|
#forward=http://1.1.1.1:8080,socks5://2.2.2.2:1080
|
||||||
|
|
||||||
|
|
||||||
# FORWARDE STRATEGY
|
# FORWARDE STRATEGY
|
||||||
# -----------------
|
# -----------------
|
||||||
# If we set up multiple forwarders, we can use them in our own strategy.
|
# If we set up multiple forwarders, we can use them in our own strategy.
|
||||||
@ -96,8 +98,33 @@ checkwebsite=www.apple.com
|
|||||||
checkduration=30
|
checkduration=30
|
||||||
|
|
||||||
|
|
||||||
|
# DNS FORWARDING SERVER
|
||||||
|
# ----------------
|
||||||
|
# A dns forwarding server listens on UDP and forward dns requests to remote dns server in TCP via forwarders
|
||||||
|
# we can specify different upstream dns server in rule file for different destinations
|
||||||
|
|
||||||
|
# Setup a dns forwarding server
|
||||||
|
dns://53
|
||||||
|
# global remote dns server (you can specify different dns server in rule file)
|
||||||
|
dnsserver=8.8.8.8:53
|
||||||
|
|
||||||
|
|
||||||
|
# IPSET MANAGEMENT
|
||||||
|
# ----------------
|
||||||
|
# Create and mange ipset on linux based on destinations in rule files
|
||||||
|
# - add ip/cidrs in rule files on startup
|
||||||
|
# - add resolved ips for domains in rule files by dns forwarder server
|
||||||
|
# Usually used in transparent proxy mode on linux
|
||||||
|
ipset=glider
|
||||||
|
|
||||||
|
|
||||||
# RULE FILES
|
# RULE FILES
|
||||||
# ----------
|
# ----------
|
||||||
# Specify additional forward rules
|
# Specify additional forward rules
|
||||||
|
|
||||||
|
# specify rules folder, so all *.rule files under this folder will be parsed as rule file
|
||||||
|
rules-dir=rules.d
|
||||||
|
|
||||||
|
# specify a rule file
|
||||||
#rulefile=office.rule
|
#rulefile=office.rule
|
||||||
#rulefile=home.rule
|
#rulefile=home.rule
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
|
||||||
|
# Specify destinations in rule file without forwarders, so glider will bypass
|
||||||
|
# all forwarders and direct connect them instead
|
||||||
|
|
||||||
ip=127.0.0.1
|
ip=127.0.0.1
|
||||||
cidr=192.168.1.0/24
|
cidr=192.168.1.0/24
|
||||||
|
domain=bypass.com
|
||||||
|
7
config/rules.d/office.list.example
Normal file
7
config/rules.d/office.list.example
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
domain=mycompany.com
|
||||||
|
domain=mycompany1.com
|
||||||
|
ip=4.4.4.4
|
||||||
|
ip=5.5.5.5
|
||||||
|
cidr=cidr=172.16.101.0/24
|
||||||
|
cidr=cidr=172.16.102.0/24
|
@ -10,27 +10,39 @@ forward=socks5://192.168.1.10:1080
|
|||||||
forward=ss://method:pass@1.1.1.1:8443
|
forward=ss://method:pass@1.1.1.1:8443
|
||||||
forward=http://192.168.2.1:8080,socks5://192.168.2.2:1080
|
forward=http://192.168.2.1:8080,socks5://192.168.2.2:1080
|
||||||
|
|
||||||
|
# STRATEGY for multiple forwarders. rr|ha
|
||||||
strategy=rr
|
strategy=rr
|
||||||
|
|
||||||
|
# FORWARDER CHECK SETTINGS
|
||||||
checkwebsite=www.apple.com
|
checkwebsite=www.apple.com
|
||||||
checkduration=30
|
checkduration=30
|
||||||
|
|
||||||
|
# DNS SERVER for domains in this rule file
|
||||||
|
dnsserver=208.67.222.222:53
|
||||||
|
|
||||||
|
# IPSET
|
||||||
|
# specify a ipset for destinations in this rule file
|
||||||
|
#ipset=office
|
||||||
|
|
||||||
# DESTINATIONS
|
# DESTINATIONS
|
||||||
# ------------
|
# ------------
|
||||||
# ALL destinations matches the following rules will be forward using forwarders specified above
|
# ALL destinations matches the following rules will be forward using forwarders specified above
|
||||||
|
|
||||||
# matches abc.com and *.abc.com
|
# INCLUDE FILE
|
||||||
domain=abc.com
|
# we can include a list file with only destinations settings
|
||||||
|
include=office.list.example
|
||||||
# matches 1.1.1.1
|
|
||||||
ip=1.1.1.1
|
|
||||||
|
|
||||||
# matches 192.168.100.0/24
|
|
||||||
cidr=192.168.100.0/24
|
|
||||||
|
|
||||||
|
# matches example.com and *.example.com
|
||||||
|
domain=example.com
|
||||||
domain=example1.com
|
domain=example1.com
|
||||||
domain=example2.com
|
domain=example2.com
|
||||||
domain=example3.com
|
domain=example3.com
|
||||||
|
|
||||||
|
# matches ip
|
||||||
|
ip=1.1.1.1
|
||||||
ip=2.2.2.2
|
ip=2.2.2.2
|
||||||
ip=3.3.3.3
|
ip=3.3.3.3
|
||||||
cidr=172.16.0.0/24
|
|
||||||
|
# matches a ip net
|
||||||
|
cidr=192.168.100.0/24
|
||||||
|
cidr=172.16.100.0/24
|
||||||
|
Loading…
Reference in New Issue
Block a user