Skip to content

Commit 826db9b

Browse files
committed
wiresocks: dns cleanups
Signed-off-by: Mark Pashmfouroush <mark@markpash.me>
1 parent efe8b5d commit 826db9b

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

warp/account.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ const (
2525
var (
2626
identityFile = "wgcf-identity.json"
2727
profileFile = "wgcf-profile.ini"
28-
dnsAddresses = []string{"8.8.8.8", "8.8.4.4"}
29-
dc = 0
3028
)
3129

3230
var (
@@ -474,10 +472,9 @@ func getWireguardConfig(privateKey, address1, address2, publicKey, endpoint stri
474472

475473
buffer.WriteString("[Interface]\n")
476474
buffer.WriteString(fmt.Sprintf("PrivateKey = %s\n", privateKey))
477-
buffer.WriteString(fmt.Sprintf("DNS = %s\n", dnsAddresses[dc%len(dnsAddresses)]))
478-
dc++
479-
buffer.WriteString(fmt.Sprintf("Address = %s\n", address1+"/24"))
480-
buffer.WriteString(fmt.Sprintf("Address = %s\n", address2+"/128"))
475+
buffer.WriteString("DNS = 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001, 8.8.8.8, 8.8.4.4, 2001:4860:4860::8888, 2001:4860:4860::8844, 9.9.9.9, 149.112.112.112, 2620:fe::fe, 2620:fe::9\n")
476+
buffer.WriteString(fmt.Sprintf("Address = %s/24\n", address1))
477+
buffer.WriteString(fmt.Sprintf("Address = %s/128\n", address2))
481478

482479
buffer.WriteString("[Peer]\n")
483480
buffer.WriteString(fmt.Sprintf("PublicKey = %s\n", publicKey))

wiresocks/proxy.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
// VirtualTun stores a reference to netstack network and DNS configuration
1717
type VirtualTun struct {
1818
Tnet *netstack.Net
19-
SystemDNS bool
2019
Logger *slog.Logger
2120
Dev *device.Device
2221
Ctx context.Context

wiresocks/wiresocks.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ func StartWireguard(ctx context.Context, l *slog.Logger, conf *Configuration) (*
4747

4848
return &VirtualTun{
4949
Tnet: tnet,
50-
SystemDNS: len(conf.Interface.DNS) == 0,
5150
Logger: l.With("subsystem", "vtun"),
5251
Dev: dev,
5352
Ctx: ctx,

0 commit comments

Comments
 (0)