diff --git a/README.md b/README.md index 535449d..d67d8a8 100644 --- a/README.md +++ b/README.md @@ -22,14 +22,14 @@ Forward(upstream proxy server): - Http proxy - SS proxy -DNS Forwarding Server(udp2tcp) +DNS Forwarding Server(udp2tcp): - Listen on UDP and forward dns requests to remote dns server in TCP via forwarders - Specify different upstream dns server based on destinations(in rule file) - Tunnel mode: forward to a fixed upstream dns server - Add resolved IPs to proxy rules - Add resolved IPs to ipset -Ipset Management +Ipset Management: - Add ip/cidrs from rule files on startup - Add resolved ips for domains from rule files by dns forwarding server diff --git a/config/examples/8.transparent_proxy_with_dnsmasq/README.md b/config/examples/8.transparent_proxy_with_dnsmasq/README.md index c56c668..6084d58 100644 --- a/config/examples/8.transparent_proxy_with_dnsmasq/README.md +++ b/config/examples/8.transparent_proxy_with_dnsmasq/README.md @@ -38,6 +38,6 @@ iptables -t nat -I OUTPUT -p tcp -m set --match-set myset dst -j REDIRECT --to-p #### When client requests network, the whole process: 1. all dns requests for domain example1.com will be forward to glider(:5353) by dnsmasq 2. glider will forward dns requests to 8.8.8.8:53 in tcp via forwarders -3. the resolved ip address will be add to ipset "myset" by dnsmasq -4. all tcp requests to example1.com will be redirect to glider(:1081) +3. the resolved ip address will be added to ipset "myset" by dnsmasq +4. all tcp requests to example1.com will be redirect to glider(:1081) by iptables 5. glider then forward requests to example1.com via forwarders diff --git a/config/examples/9.transparent_proxy_without_dnsmasq/README.md b/config/examples/9.transparent_proxy_without_dnsmasq/README.md index 64a821d..af75191 100644 --- a/config/examples/9.transparent_proxy_without_dnsmasq/README.md +++ b/config/examples/9.transparent_proxy_without_dnsmasq/README.md @@ -72,18 +72,17 @@ iptables -t nat -I OUTPUT -p tcp -m set --match-set glider dst -j REDIRECT --to- ``` #### Client DNS settings -use the linux server'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: -- dns resolving: +#### When client requesting to access http://example1.com (in office.rule), the whole process: +- 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) 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 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 -- destination accessing: +- Destination accessing: 1. client sends http request to the resolved ip of example1.com 2. linux gateway server will get 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 -