Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3-config
Commits
4fd3da76
Commit
4fd3da76
authored
Apr 14, 2021
by
vyzo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add default empty config for DNS, rename struct from DNSConfig to DNS
parent
64e52be0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
config.go
config.go
+1
-1
dns.go
dns.go
+5
-5
init.go
init.go
+3
-0
No files found.
config.go
View file @
4fd3da76
...
@@ -28,7 +28,7 @@ type Config struct {
...
@@ -28,7 +28,7 @@ type Config struct {
AutoNAT
AutoNATConfig
AutoNAT
AutoNATConfig
Pubsub
PubsubConfig
Pubsub
PubsubConfig
Peering
Peering
Peering
Peering
DNS
DNS
Config
DNS
DNS
Provider
Provider
Provider
Provider
Reprovider
Reprovider
Reprovider
Reprovider
...
...
dns.go
View file @
4fd3da76
package
config
package
config
// DNS
Config
specifies DNS resolution rules using custom resolvers
// DNS specifies DNS resolution rules using custom resolvers
type
DNS
Config
struct
{
type
DNS
struct
{
// Resolvers is a map of FQDNs to URLs for custom DNS resolution.
// Resolvers is a map of FQDNs to URLs for custom DNS resolution.
// URLs starting with `https://` indicate DoH endpoints.
// URLs starting with `https://` indicate DoH endpoints.
// Support for other resolver types can be added in the future.
// Support for other resolver types can be added in the future.
// https://en.wikipedia.org/wiki/Fully_qualified_domain_name
// https://en.wikipedia.org/wiki/Fully_qualified_domain_name
// https://en.wikipedia.org/wiki/DNS_over_HTTPS
// https://en.wikipedia.org/wiki/DNS_over_HTTPS
//
//
// Example:
// Example:
// - Custom resolver for ENS: `eth.` → `https://eth.link/dns-query`
// - Custom resolver for ENS: `eth.` → `https://eth.link/dns-query`
// - Override the default OS resolver: `.` → `https://doh.applied-privacy.net/query`
// - Override the default OS resolver: `.` → `https://doh.applied-privacy.net/query`
...
...
init.go
View file @
4fd3da76
...
@@ -89,6 +89,9 @@ func InitWithIdentity(identity Identity) (*Config, error) {
...
@@ -89,6 +89,9 @@ func InitWithIdentity(identity Identity) (*Config, error) {
Pinning
:
Pinning
{
Pinning
:
Pinning
{
RemoteServices
:
map
[
string
]
RemotePinningService
{},
RemoteServices
:
map
[
string
]
RemotePinningService
{},
},
},
DNS
:
DNS
{
Resolvers
:
map
[
string
]
string
{},
},
}
}
return
conf
,
nil
return
conf
,
nil
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment