AddZone specifies a DNS suffix that will use the bypass proxy. A zone of "example.com" matches "example.com" and all of its subdomains.
(zone string)
| 140 | // AddZone specifies a DNS suffix that will use the bypass proxy. A zone of |
| 141 | // "example.com" matches "example.com" and all of its subdomains. |
| 142 | func (p *proxy_PerHost) AddZone(zone string) { |
| 143 | if strings.HasSuffix(zone, ".") { |
| 144 | zone = zone[:len(zone)-1] |
| 145 | } |
| 146 | if !strings.HasPrefix(zone, ".") { |
| 147 | zone = "." + zone |
| 148 | } |
| 149 | p.bypassZones = append(p.bypassZones, zone) |
| 150 | } |
| 151 | |
| 152 | // AddHost specifies a host name that will use the bypass proxy. |
| 153 | func (p *proxy_PerHost) AddHost(host string) { |