dns already taken
This commit is contained in:
parent
65945b6e73
commit
5604c3232a
5 changed files with 10 additions and 10 deletions
|
|
@ -122,7 +122,7 @@ To use this module for the ACME DNS challenge, [configure the ACME issuer in you
|
|||
{
|
||||
"module": "acme",
|
||||
"challenges": {
|
||||
"dns": {
|
||||
"dns01": {
|
||||
"provider": {
|
||||
"name": "internal"
|
||||
}
|
||||
|
|
@ -152,7 +152,7 @@ Both are optional.
|
|||
```json
|
||||
{
|
||||
"apps": {
|
||||
"dns": {
|
||||
"dns01": {
|
||||
"address": "192.0.2.123:53",
|
||||
"records": [
|
||||
"example.com.\t3600\tIN\tA\t192.0.2.123"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ type App struct {
|
|||
|
||||
func (App) CaddyModule() caddy.ModuleInfo {
|
||||
return caddy.ModuleInfo{
|
||||
ID: "dns",
|
||||
ID: "dns01",
|
||||
New: func() caddy.Module { return &App{} },
|
||||
}
|
||||
}
|
||||
|
|
@ -155,7 +155,7 @@ func (a *App) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// parseApp configures the "dns" global option from Caddyfile.
|
||||
// parseApp configures the "dns01" global option from Caddyfile.
|
||||
// Syntax:
|
||||
//
|
||||
// dns [address] {
|
||||
|
|
@ -176,7 +176,7 @@ func parseApp(d *caddyfile.Dispenser, prev interface{}) (interface{}, error) {
|
|||
|
||||
// tell Caddyfile adapter that this is the JSON for an app
|
||||
return httpcaddyfile.App{
|
||||
Name: "dns",
|
||||
Name: "dns01",
|
||||
Value: caddyconfig.JSON(a, &warnings),
|
||||
}, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,11 +27,11 @@ func (Provider) CaddyModule() caddy.ModuleInfo {
|
|||
// Provision sets up the module. Implements caddy.Provisioner.
|
||||
func (p *Provider) Provision(ctx caddy.Context) error {
|
||||
p.logger = ctx.Logger()
|
||||
_, err := ctx.AppIfConfigured("dns")
|
||||
_, err := ctx.AppIfConfigured("dns01")
|
||||
if err != nil {
|
||||
p.logger.Warn("DNS app not yet configured")
|
||||
}
|
||||
app, err := ctx.App("dns")
|
||||
app, err := ctx.App("dns01")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ const dns_only_json string = `{
|
|||
}
|
||||
},
|
||||
"apps": {
|
||||
"dns": {
|
||||
"dns01": {
|
||||
"address": "127.0.0.1:53535",
|
||||
"records": [
|
||||
"sub123.example.com.\t3600\tIN\tA\t127.0.0.1",
|
||||
|
|
@ -79,7 +79,7 @@ const dns_but_empty_json string = `{
|
|||
}
|
||||
},
|
||||
"apps": {
|
||||
"dns": {
|
||||
"dns01": {
|
||||
"address": "127.0.0.1:53535"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ func init() {
|
|||
caddy.RegisterModule(App{})
|
||||
caddy.RegisterModule(Provider{})
|
||||
|
||||
httpcaddyfile.RegisterGlobalOption("dns", parseApp)
|
||||
httpcaddyfile.RegisterGlobalOption("dns01", parseApp)
|
||||
}
|
||||
|
||||
func record_to_rr(zone string, record libdns.Record) (dns.RR, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue