Compare commits
4 Commits
03b3375f8c
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 5a7c784680 | |||
| fb818b86a2 | |||
| 8dc088ffde | |||
| 6ff47b2a29 |
@@ -4,10 +4,9 @@ I made this to override the public IP address of my server with its VPN IP addre
|
||||
There is probably a better way to do this, but I couldn't find it.
|
||||
|
||||
# Usage
|
||||
|
||||
Add this to your `plugin.cfg`:
|
||||
Add this to your `plugin.cfg` beetween `minimal` and `template` :
|
||||
```
|
||||
override:git.kapelle.org/niklas/coredns-override
|
||||
override:git.kapelle.org/niklas/coredns-override
|
||||
```
|
||||
|
||||
In your `Corefile`:
|
||||
|
||||
@@ -3,9 +3,12 @@ package override
|
||||
import (
|
||||
"net"
|
||||
|
||||
clog "github.com/coredns/coredns/plugin/pkg/log"
|
||||
"github.com/miekg/dns"
|
||||
)
|
||||
|
||||
var log = clog.NewWithPlugin("override")
|
||||
|
||||
type Rule struct {
|
||||
Search net.IP
|
||||
Override net.IP
|
||||
|
||||
5
setup.go
5
setup.go
@@ -6,18 +6,13 @@ import (
|
||||
"github.com/coredns/caddy"
|
||||
"github.com/coredns/coredns/core/dnsserver"
|
||||
"github.com/coredns/coredns/plugin"
|
||||
clog "github.com/coredns/coredns/plugin/pkg/log"
|
||||
)
|
||||
|
||||
var log = clog.NewWithPlugin("overide")
|
||||
|
||||
func init() {
|
||||
plugin.Register("override", setup)
|
||||
}
|
||||
|
||||
func setup(c *caddy.Controller) error {
|
||||
c.Next()
|
||||
|
||||
rules, err := parseRules(c)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user