Skip to content

Commit

Permalink
no DNS by default
Browse files Browse the repository at this point in the history
  • Loading branch information
naggie committed Mar 16, 2020
1 parent dd5ab03 commit 3277362
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions add.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ func PrintPeerCfg(peer PeerConfig, conf *DsnetConfig) {
const peerConf = `[Interface]
Address = {{ .Peer.IP }}
PrivateKey={{ .Peer.PrivateKey.Key }}
{{- if .DsnetConfig.DNS }}
DNS = {{ .DsnetConfig.DNS }}
{{ end }}
[Peer]
PublicKey={{ .DsnetConfig.PrivateKey.PublicKey.Key }}
Expand Down
2 changes: 1 addition & 1 deletion configtypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type DsnetConfig struct {
// Network is chosen randomly when not specified
Network JSONIPNet `validate:"required"`
IP net.IP `validate:"required"`
DNS net.IP `validate:"required"`
DNS net.IP
// extra networks available, will be added to AllowedIPs
Networks []JSONIPNet `validate:"required"`
// TODO Default subnets to route via VPN
Expand Down
3 changes: 2 additions & 1 deletion init.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ func Init() {

IP := conf.MustAllocateIP()
conf.IP = IP
conf.DNS = IP
// DNS not set by default
//conf.DNS = IP

conf.MustSave()

Expand Down

0 comments on commit 3277362

Please sign in to comment.