Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ dnstm tunnel add -t my-tunnel \
| `--kcp-window-size` | VayDNS: KCP window size (default: queue_size/2) |
| `--queue-overflow` | VayDNS: queue overflow strategy (`drop` or `block`) |
| `--log-level` | VayDNS: server log level (debug, info, warning, error) |
| `--record-type` | VayDNS: DNS record type (txt, cname, a, aaaa, mx, ns, srv) |
| `--record-type` | VayDNS: DNS record type (txt, null, cname, a, aaaa, mx, ns, srv, caa) |

### Tunnel Share Flags

Expand Down
2 changes: 1 addition & 1 deletion docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ VayDNS with dnstt-compatible wire format:
| `kcp_window_size` | int | 0 | KCP window size (0 = queue_size/2, must be ≤ queue_size) |
| `queue_overflow` | string | `drop` | Queue overflow strategy: `drop` or `block` |
| `log_level` | string | `info` | Server log level: `debug`, `info`, `warning`, `error` |
| `record_type` | string | `txt` | DNS record type: `txt`, `cname`, `a`, `aaaa`, `mx`, `ns`, `srv` (must be `txt` when dnstt_compat is enabled) |
| `record_type` | string | `txt` | DNS record type: `txt`, `null`, `cname`, `a`, `aaaa`, `mx`, `ns`, `srv`, `caa` (must be `txt` when dnstt_compat is enabled) |

**Note:** VayDNS does not support the `shadowsocks` backend type.

Expand Down
4 changes: 2 additions & 2 deletions internal/actions/tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,9 @@ func init() {
},
{
Name: "record-type",
Label: "VayDNS record type (txt, cname, a, aaaa, mx, ns, srv)",
Label: "VayDNS record type (txt, null, cname, a, aaaa, mx, ns, srv, caa)",
Type: InputTypeText,
Description: "DNS record type (txt, cname, a, aaaa, mx, ns, srv). Default: txt. Cannot use non-txt with --dnstt-compat",
Description: "DNS record type (txt, null, cname, a, aaaa, mx, ns, srv, caa). Default: txt. Cannot use non-txt with --dnstt-compat",
ShowIf: func(ctx *Context) bool {
return !ctx.IsInteractive && config.TransportType(ctx.GetString("transport")) == config.TransportVayDNS
},
Expand Down
2 changes: 1 addition & 1 deletion internal/config/tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type VayDNSConfig struct {
}

// ValidVayDNSRecordTypes returns the valid record types for VayDNS.
var ValidVayDNSRecordTypes = []string{"txt", "cname", "a", "aaaa", "mx", "ns", "srv"}
var ValidVayDNSRecordTypes = []string{"txt", "null", "cname", "a", "aaaa", "mx", "ns", "srv", "caa"}

// ResolvedVayDNSIdleTimeout returns the idle-timeout string for vaydns-server, applying defaults when empty.
func (v *VayDNSConfig) ResolvedVayDNSIdleTimeout() string {
Expand Down
2 changes: 1 addition & 1 deletion internal/config/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (c *Config) validateTunnels() error {
}
}
if !validRT {
return fmt.Errorf("tunnel '%s': vaydns.record_type must be one of: txt, cname, a, aaaa, mx, ns, srv", t.Tag)
return fmt.Errorf("tunnel '%s': vaydns.record_type must be one of: txt, null, cname, a, aaaa, mx, ns, srv, caa", t.Tag)
}
if t.VayDNS.DnsttCompat && t.VayDNS.RecordType != "txt" {
return fmt.Errorf("tunnel '%s': vaydns.record_type must be txt when dnstt_compat is enabled", t.Tag)
Expand Down
4 changes: 3 additions & 1 deletion internal/handlers/tunnel_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ func addTunnelInteractive(ctx *actions.Context, cfg *config.Config) error {
{Label: "SRV", Value: "srv"},
{Label: "A", Value: "a"},
{Label: "AAAA", Value: "aaaa"},
{Label: "NULL", Value: "null"},
{Label: "CAA", Value: "caa"},
}
rtValue, rtErr := tui.RunMenu(tui.MenuConfig{
Title: "DNS Record Type",
Expand Down Expand Up @@ -425,7 +427,7 @@ func addTunnelNonInteractive(ctx *actions.Context, cfg *config.Config) error {
}
}
if !valid {
return fmt.Errorf("invalid --record-type '%s' (must be one of: txt, cname, a, aaaa, mx, ns, srv)", recordType)
return fmt.Errorf("invalid --record-type '%s' (must be one of: txt, null, cname, a, aaaa, mx, ns, srv, caa)", recordType)
}
}

Expand Down