Selaa lähdekoodia

Change default DOH to cloudflarte

tags/v2.1.9^2
9seconds 2 kuukautta sitten
vanhempi
commit
36546cec2f

+ 1
- 1
README.md Näytä tiedosto

@@ -275,7 +275,7 @@ Flags:
275 275
   -b, --tcp-buffer="4KB"               Size of TCP buffer to use.
276 276
   -i, --prefer-ip="prefer-ipv6"        IP preference. By default we prefer IPv6 with fallback to IPv4.
277 277
   -p, --domain-fronting-port=443       A port to access for domain fronting.
278
-  -n, --doh-ip=9.9.9.9                 IP address of DNS-over-HTTP to use.
278
+  -n, --doh-ip=1.1.1.1                 IP address of DNS-over-HTTP to use.
279 279
   -t, --timeout=10s                    Network timeout to use
280 280
   -a, --antireplay-cache-size="1MB"    A size of anti-replay cache to use.
281 281
 ```

+ 2
- 2
example.config.toml Näytä tiedosto

@@ -93,8 +93,8 @@ ips = ["127.0.0.1:443"]
93 93
 # resolver of the operating system and uses DOH instead. This is a host
94 94
 # it has to access.
95 95
 #
96
-# By default we use Quad9.
97
-doh-ip = "9.9.9.9"
96
+# By default we use Cloudflare.
97
+doh-ip = "1.1.1.1"
98 98
 
99 99
 # mtg can work via proxies (for now, we support only socks5). Proxy
100 100
 # configuration is done via list. So, you can specify many proxies

+ 1
- 1
internal/cli/simple_run.go Näytä tiedosto

@@ -18,7 +18,7 @@ type SimpleRun struct {
18 18
 	TCPBuffer           string        `kong:"name='tcp-buffer',short='b',default='4KB',help='Deprecated and ignored'"`                                                 //nolint: lll
19 19
 	PreferIP            string        `kong:"name='prefer-ip',short='i',default='prefer-ipv6',help='IP preference. By default we prefer IPv6 with fallback to IPv4.'"` //nolint: lll
20 20
 	DomainFrontingPort  uint64        `kong:"name='domain-fronting-port',short='p',default='443',help='A port to access for domain fronting.'"`                        //nolint: lll
21
-	DOHIP               net.IP        `kong:"name='doh-ip',short='n',default='9.9.9.9',help='IP address of DNS-over-HTTP to use.'"`                                    //nolint: lll
21
+	DOHIP               net.IP        `kong:"name='doh-ip',short='n',default='1.1.1.1',help='IP address of DNS-over-HTTP to use.'"`                                    //nolint: lll
22 22
 	Timeout             time.Duration `kong:"name='timeout',short='t',default='10s',help='Network timeout to use'"`                                                    //nolint: lll
23 23
 	Socks5Proxies       []string      `kong:"name='socks5-proxy',short='s',help='Socks5 proxies to use for network access.'"`                                          //nolint: lll
24 24
 	AntiReplayCacheSize string        `kong:"name='antireplay-cache-size',short='a',default='1MB',help='A size of anti-replay cache to use.'"`                         //nolint: lll

+ 0
- 3
mtglib/internal/dc/view.go Näytä tiedosto

@@ -2,13 +2,11 @@ package dc
2 2
 
3 3
 type dcView struct {
4 4
 	overrides dcAddrSet
5
-	collected dcAddrSet
6 5
 }
7 6
 
8 7
 func (d dcView) getV4(dc int) []Addr {
9 8
 	addrs := d.overrides.getV4(dc)
10 9
 	addrs = append(addrs, defaultDCOverridesAddrSet.getV4(dc)...)
11
-	// addrs = append(addrs, d.collected.getV4(dc)...)
12 10
 	addrs = append(addrs, defaultDCAddrSet.getV4(dc)...)
13 11
 
14 12
 	return addrs
@@ -17,7 +15,6 @@ func (d dcView) getV4(dc int) []Addr {
17 15
 func (d dcView) getV6(dc int) []Addr {
18 16
 	addrs := d.overrides.getV6(dc)
19 17
 	addrs = append(addrs, defaultDCOverridesAddrSet.getV6(dc)...)
20
-	// addrs = append(addrs, d.collected.getV6(dc)...)
21 18
 	addrs = append(addrs, defaultDCAddrSet.getV6(dc)...)
22 19
 
23 20
 	return addrs

+ 0
- 11
mtglib/internal/dc/view_test.go Näytä tiedosto

@@ -31,13 +31,6 @@ func (suite *ViewTestSuite) SetupSuite() {
31 31
 				},
32 32
 			},
33 33
 		},
34
-		collected: dcAddrSet{
35
-			v4: map[int][]Addr{
36
-				1: {
37
-					{Network: "tcp4", Address: "127.1.0.1:443"},
38
-				},
39
-			},
40
-		},
41 34
 	}
42 35
 }
43 36
 
@@ -54,10 +47,6 @@ func (suite *ViewTestSuite) TestGetV4() {
54 47
 			{"tcp4", "149.154.167.51:443"},
55 48
 			{"tcp4", "95.161.76.100:443"},
56 49
 		},
57
-		1: {
58
-			{"tcp4", "127.1.0.1:443"},
59
-			{"tcp4", "149.154.175.50:443"},
60
-		},
61 50
 	}
62 51
 
63 52
 	for dc, addresses := range testData {

+ 1
- 1
network/init.go Näytä tiedosto

@@ -63,7 +63,7 @@ const (
63 63
 	// DefaultDOHHostname defines a default IP address for DOH host. Since mtg is
64 64
 	// simple, please pass IP address here. We do not have bootstrap servers here
65 65
 	// embedded.
66
-	DefaultDOHHostname = "9.9.9.9"
66
+	DefaultDOHHostname = "1.1.1.1"
67 67
 
68 68
 	// DNSTimeout defines a timeout for DNS queries.
69 69
 	DNSTimeout = 5 * time.Second

Loading…
Peruuta
Tallenna