Skip to content

Commit b3ec77d

Browse files
committed
dnsx/resolver: do not skip blocks or proxies for Plus
Initially, Plus was meant as an anti-censorship transport but shipped as a "smart" transport instead with tunable abilities (choose among encrypted resolvers at random, or choose the fastest, or choose the most stable etc) And so, it now makes sense to not reserve special bypasses (proxy/blocklist).
1 parent 912f70d commit b3ec77d

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

intra/dnsx/transport.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,14 +1266,17 @@ func isAnyDefault(ids ...string) bool {
12661266
func overrideProxyIfNeeded(pid string, ids ...string) string {
12671267
for _, id := range ids {
12681268
switch id {
1269-
// note: Goos is anyway hard-coded to use NetExitProxy
1269+
// notes:
1270+
// 1. Goos is anyway hard-coded to use NetExitProxy.
1271+
// 2. Plus simply delegates queries to underlying servers,
1272+
// which may or may not use proxies.
12701273
case Goos, Local: // exit
12711274
return NetExitProxy
12721275
case CT + Goos, CT + Local: // exit
12731276
return NetExitProxy
1274-
case Bootstrap, Default, Plus, System, Preset: // base
1277+
case Bootstrap, Default, System, Preset: // base
12751278
return NetBaseProxy
1276-
case CT + Bootstrap, CT + Default, CT + Plus, CT + System, CT + Preset: // base
1279+
case CT + Bootstrap, CT + Default, CT + System, CT + Preset: // base
12771280
return NetBaseProxy
12781281
}
12791282
}
@@ -1285,10 +1288,10 @@ func skipBlock(tr ...Transport) bool {
12851288
if t == nil {
12861289
continue
12871290
}
1288-
switch t.ID().V() {
1289-
case Default, Plus, BlockFree, Alg, Bootstrap:
1291+
switch t.ID().V() { // Plus/CT+Plus to skip blocks conditionally?
1292+
case Default, BlockFree, Alg, Bootstrap:
12901293
return true
1291-
case CT + Default, CT + Plus, CT + BlockFree, CT + Alg, CT + Bootstrap:
1294+
case CT + Default, CT + BlockFree, CT + Alg, CT + Bootstrap:
12921295
return true
12931296
}
12941297
}

0 commit comments

Comments
 (0)