Giter VIP home page Giter VIP logo

Comments (24)

mwarning avatar mwarning commented on May 25, 2024

No; not really. I don't have Windows experience and don't really know how to intercept DNS requests on Windows. Apparently you have to load a DLL and hook up to some function.
Feel free to contribute a port. :-)

I have collected some links thought:

from kadnode.

iShift avatar iShift commented on May 25, 2024

Heh, I am too, don't use windows, but for spreading to the world, windows support - is good thing.

I think, we can start it on windows like normal dns (dns proxy) and change dns settings to localhost.

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

I wonder if it is possible to redirect DNS requests for a specifc TLD (.p2p) to a local DNS server. I haven't been able to find out.

from kadnode.

iShift avatar iShift commented on May 25, 2024

I mean proxy all DNS requests - set 127.0.0.1:some port in dns settings, then, if domain not .p2p - redirect to normal dns or to 8.8.8.8

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

KadNode does not redirect DNS requests. That would need quite some code to accomplish.
Also, we would need to honor local DNS settings. Not just redirect everything to a hardcoded DNS server.

from kadnode.

iShift avatar iShift commented on May 25, 2024

Why? we can take DNS ip from DHCP packets, then replace with localhost.

For dns server code you can take bind for windows.

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

KadNode has no access to DHCP packets.
If Bind is installed on Windows then we can configure Bind to redirect the .p2p requests.

from kadnode.

iShift avatar iShift commented on May 25, 2024

ok, if you can compile it for windows, i try to config bind then you can make Bind+kadnode bundle

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

I will give it try.

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

Good news everyone! I have got it to build (including libsodium) using Cygwin. But it does not start properly yet.

from kadnode.

iShift avatar iShift commented on May 25, 2024

Good! I hope in future we get win version

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

The remaining problem is a current limitation of Cygwin (https://stackoverflow.com/questions/6140734/cannot-bind-to-multicast-address-windows). It works if we disable local peer discovery (--disable-multicast).

http://www.filedropper.com/showdownload.php/files_5

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

The issue might be solved in cywin in one/two months - maybe.

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

Any progress with packaging so far?

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

Here is a build howto: https://github.com/mwarning/KadNode/blob/master/windows/README.md

from kadnode.

guillaume-uH57J9 avatar guillaume-uH57J9 commented on May 25, 2024

Maybe hooking to Windows Host resolution through NetBios?

A Windows machine can be configured to contact multiple WINS server for host resolution.
If KadNode's Windows version is a WINS server, and the machine is configured to use it, it could in theory provide kadnode hostname lookup on Windows without nasty tricks (no interception, no proxying, ..)

http://www.techrepublic.com/article/how-netbios-name-resolution-really-works/

from kadnode.

guillaume-uH57J9 avatar guillaume-uH57J9 commented on May 25, 2024

I dont't have time to investigate or experiment at the moment, but here are a couple existing open WINS implementation:

LWINS seems to be a better solution (lighter), but I don't know if its GPLv2 license is compatible with KadNode (maybe through linking?).

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

Thanks for the help. I have a hard time solving this.

from kadnode.

guillaume-uH57J9 avatar guillaume-uH57J9 commented on May 25, 2024

It's not a common problem to solve.

But maybe a few peoples already looked into that. For instance alternative DNS root projects (OpenNIC, NameCoin, Tor). I'm looking through their docs to understand how others solved this:

Also, Is Cygwin required for building only, or would it be required for users too ?

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

I still hope there is a simple solution using the stuff in C:\windows\system32\drivers\etc.
Otherwise it is possible to just use KadNode as an additional DNS Server. It will ignore all requests
that do not match *.p2p.

The full Cygwin environment is required for compiling only. The .exe will need to be shipped along with cygwin1.dll though.

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

The lastest release contains an unpackaged Windows binary along with a bare setup.

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

I have found a script that sets the DNS server. But it does not seem to interact well with the default settings:

:: Set primary and alternate DNS for IPv4 on Windows Server 2000/2003/2008 & Windows XP/Vista/7
@ECHO OFF
SETLOCAL EnableDelayedExpansion

SET adapterName=

FOR /F "tokens=* delims=:" %%a IN ('IPCONFIG ^| FIND /I "ETHERNET ADAPTER"') DO (
SET adapterName=%%a

REM Removes "Ethernet adapter" from the front of the adapter name
SET adapterName=!adapterName:~17!

REM Removes the colon from the end of the adapter name
SET adapterName=!adapterName:~0,-1!

::netsh interface ipv4 set dns name="!adapterName!" static 192.168.0.2 primary
netsh interface ipv4 add dns name="!adapterName!" 127.0.0.1 index=1
netsh interface ipv6 add dns name="!adapterName!" ::1 index=1
)

ipconfig /flushdns

:EOF

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

This might be a solution, but I do not know how to intercept requests not only for one application:

http://www.codeproject.com/Articles/16194/Intercept-and-Rewrite-DNS-Requests-Using-Regular-E

from kadnode.

mwarning avatar mwarning commented on May 25, 2024

It's done.

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.