mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 17:35:40 +08:00
doc: format
This commit is contained in:
parent
efb1029793
commit
0234995814
@ -53,7 +53,7 @@ TODO:
|
|||||||
Binary:
|
Binary:
|
||||||
- [https://github.com/nadoo/glider/releases](https://github.com/nadoo/glider/releases)
|
- [https://github.com/nadoo/glider/releases](https://github.com/nadoo/glider/releases)
|
||||||
|
|
||||||
Go Get (requires Go 1.9 or newer):
|
Go Get (requires **Go 1.9 or newer**):
|
||||||
```bash
|
```bash
|
||||||
go get -u github.com/nadoo/glider
|
go get -u github.com/nadoo/glider
|
||||||
```
|
```
|
||||||
@ -166,13 +166,13 @@ Examples:
|
|||||||
- [glider.conf.example](config/glider.conf.example)
|
- [glider.conf.example](config/glider.conf.example)
|
||||||
- [office.rule.example](config/rules.d/office.rule.example)
|
- [office.rule.example](config/rules.d/office.rule.example)
|
||||||
- [Examples](config/examples)
|
- [Examples](config/examples)
|
||||||
- [Transparent proxy with dnsmasq](config/examples/8.transparent_proxy_with_dnsmasq)
|
- [transparent proxy with dnsmasq](config/examples/8.transparent_proxy_with_dnsmasq)
|
||||||
- [Transparent proxy without dnsmasq](config/examples/9.transparent_proxy_without_dnsmasq)
|
- [transparent proxy without dnsmasq](config/examples/9.transparent_proxy_without_dnsmasq)
|
||||||
|
|
||||||
## 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/)
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
- [go-ss2](https://github.com/shadowsocks/go-shadowsocks2): the core ss protocol support
|
- [go-ss2](https://github.com/shadowsocks/go-shadowsocks2): ss protocol support
|
||||||
- [conflag](https://github.com/nadoo/conflag): command line and config file parse support
|
- [conflag](https://github.com/nadoo/conflag): command line and config file parse support
|
||||||
- [ArchLinux](https://www.archlinux.org/packages/community/x86_64/glider): a great linux distribution with glider pre-built package
|
- [ArchLinux](https://www.archlinux.org/packages/community/x86_64/glider): a great linux distribution with glider pre-built package
|
||||||
|
@ -75,14 +75,15 @@ iptables -t nat -I OUTPUT -p tcp -m set --match-set glider dst -j REDIRECT --to-
|
|||||||
use the linux server's ip as your dns server
|
use the linux server's ip as your dns server
|
||||||
|
|
||||||
#### When client requesting to access http://example1.com (in office.rule), the whole process:
|
#### When client requesting to access http://example1.com (in office.rule), the whole process:
|
||||||
- Dns resolving:
|
Dns Resolving:
|
||||||
1. client sends a udp dns request to linux server, and glider will receive the request(as it listen on default dns port :53)
|
1. client sends a udp dns request to linux server, and glider will receive the request(as it listen on default dns port :53)
|
||||||
2. upstream dns server choice: glider will lookup it's rule config and find out the dns server to use for this domain(matched "example1.com" in office.rule, so 208.67.222.222:53 will be choosen)
|
2. upstream dns server choice: glider will lookup it's rule config and find out the dns server to use for this domain(matched "example1.com" in office.rule, so 208.67.222.222:53 will be choosen)
|
||||||
3. glider uses the forwarder in office.rule to ask 208.67.222.222:53 for the resolve answers
|
3. glider uses the forwarder in office.rule to ask 208.67.222.222:53 for the resolve answers
|
||||||
4. glider updates it's office rule config, add the resolved ip address to it
|
4. glider updates it's office rule config, add the resolved ip address to it
|
||||||
5. glider adds the resolved ip into ipset "glider", and return the dns answer to client
|
5. glider adds the resolved ip into ipset "glider", and return the dns answer to client
|
||||||
- Destination accessing:
|
|
||||||
1. client sends http request to the resolved ip of example1.com
|
Destination Accessing:
|
||||||
2. linux gateway server will get the request
|
1. client sends http request to the resolved ip of example1.com
|
||||||
3. iptabes matches the ip in ipset "glider" and redirect this request to :1081(glider)
|
2. linux gateway server will get the request
|
||||||
4. glider finds the ip in office rule, and then choose a forwarder in office.rule to complete the request
|
3. iptabes matches the ip in ipset "glider" and redirect this request to :1081(glider)
|
||||||
|
4. glider finds the ip in office rule, and then choose a forwarder in office.rule to complete the request
|
||||||
|
Loading…
Reference in New Issue
Block a user