junkurihara / dnscrypt-proxy-modns

Fork of dnscrypt-proxy to implement a multiple-relay-based DNS anonymization protocol (mu-ODNS)
ISC License
31 stars 6 forks source link

opportunistic randomization? #2

Open lsm5 opened 2 years ago

lsm5 commented 2 years ago

@junkurihara thanks for this work. I'm still reading through it and I would like to start using it soon. I see that the relays and resolvers are all based in Japan atm. While, I'm exploring the idea of setting up my own relays for this project, I'm also wondering if you'd be open to changing randomization tactic to opportunistic so that it could fallback to non-randomized relays in case of availability issues.

Thanks again.

junkurihara commented 2 years ago

Hello @lsm5

Thanks for your interests!

dnscrypt-proxy-modns supports Mutualized ODNS, which supports multiple-relay-based DNS anonymization. But it is actually compatible with the original dnscrypt-proxy when you specify max_relays = 1, i.e., it simply works in the manner of single-relay-based Anonymized DNSCrypt. Of course, the relay randomization can be also enabled with relay_randomization = true. So, you can use existing DNSCrypt relays outside Japan in a randomized fashion if you simply use Anonymized DNSCrypt. But of course, if you want to use the multi-relay protocol working with relays outside Japan, I am very welcome to deploy your own Mutualized ODNS relay!

Also, the idea of opportunistic relay randomization seems nice. In my current implementation of relay randomization, the proxy simply and randomly chooses one (or more) of registered relays when each query is constructed. Here the registered servers are given and renewed at the bootstrap and periodic renewal of server information, and then the availability of each server is checked at least in a periodic manner. But if we consider the opportunistic behavior for the choice of a relay, I think a bit more complex mechanism is needed. At this point, it is a bit tough to implement soon. But let me think. Thanks again for your valuable comment!