Giter VIP home page Giter VIP logo

Comments (15)

mwarning avatar mwarning commented on May 25, 2024

The install script for Windows should put Kadnode as the first DNS server.
@axxName Is 8.8.8.8 used as first DNS server, or does Windows prefer 8.8.8.8?

Anyway, professional programs do hijack the systems calls. That would be the proper way to solve this issue. But I haven't had the motivation to code a solution. See http://stackoverflow.com/questions/1317067/windows-dns-hooks

from kadnode.

axxName avatar axxName commented on May 25, 2024

script dns_setup.bat installs Google server first

`
REM Set fixed DNS server (Google) and KadNode as second

netsh interface ipv4 add dns name="!adapterName!" 8.8.8.8 index=1 validate=no
netsh interface ipv4 add dns name="!adapterName!" 127.0.0.1 index=2 validate=no
`

google DNS doesn't know about our .p2p domain
after negative response from Google DNS, Windows doesn't try to use next DNS server

from kadnode.

axxName avatar axxName commented on May 25, 2024

Hmmm. Strange.
After restart of kadnode service only 127.0.0.1 in DNS list.
I added 8.8.8.8
Now all works fine - my.p2p domain and Interrnet DNS resolves
......
in testWindows
.....
I think I broke my work Windows
I bag Your pardon.

Thanks!

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

Does it work the way it is? Or does something need to be changed.

from kadnode.

axxName avatar axxName commented on May 25, 2024

I need time to fix my Windows.
Then I perform the tests

from kadnode.

axxName avatar axxName commented on May 25, 2024

OK. I did tests.
It can't work this way.
As I understand how DNS clients work, it should be one DNS server on "localhost" "::1" or "127.0.0.1"
it must serve .p2p domain and it must make requests to external DNS servers for all other domains.

I guess around here in src/ext-dns.c


line 601:
/* Check if hostname ends with .p2p */
if( !is_suffix( hostname, gconf->query_tld ) ) {
return;
}

and lookup code like this function ngethostbyname()
http://www.binarytides.com/dns-query-code-in-c-with-linux-sockets/

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

From what you tell, it looks to me like the windows behavior has changed (maybe in Windows 10?). But Implementing a reverse proxy in KadNode is a major task. We may need to investigate other options, if possible.

from kadnode.

axxName avatar axxName commented on May 25, 2024

I have done tests on Windows 7, IPv4
I think DNS clients work the same in linux, in Windows(XP,7,10), etc...

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

Then we need a different approach.

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

@axxName putting the google dns second should work, no?
I am still a bit confused about what works for you and what not. :)

from kadnode.

axxName avatar axxName commented on May 25, 2024

About Your DNSproxy code:

it would be better if this code will be enabled by default, if compiled with DNS option,
or will be activated if --dns-port option used
And use GoogleDNS by default if no (--dns-server) option is used

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

The DNS proxy code is already compiled in when the DNS interface is compiled in.
The proxy will be enabled when --dns-server is specified.

We can set --dns-server in the configuration provided in the packages. External resources like 8.8.8.8 should not be present in the code itself.

from kadnode.

axxName avatar axxName commented on May 25, 2024

OK.
Then you need to add comments about this in the README and in the default config.txt

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

I would put it into the package configuration. Apart from that, we only need this proxy functionality for windows right now. On Debian systems we have nsswitch functionality and on openwrt we have dnsmasq filtering top level domains for us.

Tough the configuration can use some improvement.

from kadnode.

axxName avatar axxName commented on May 25, 2024

Thank you. It is a good result!

from kadnode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.