Comments (24)
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:
- http://www.codeproject.com/Articles/16194/Intercept-and-Rewrite-DNS-Requests-Using-Regular-E
- http://stackoverflow.com/questions/5992700/can-i-temporarily-override-dns-resolution-within-a-net-application
- http://sourcesecure.net/2011/03/dll-redirection-tutorial/
- http://technet.microsoft.com/en-us/library/cc961921.aspx
from kadnode.
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.
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.
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.
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.
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.
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.
ok, if you can compile it for windows, i try to config bind then you can make Bind+kadnode bundle
from kadnode.
I will give it try.
from kadnode.
Good news everyone! I have got it to build (including libsodium) using Cygwin. But it does not start properly yet.
from kadnode.
Good! I hope in future we get win version
from kadnode.
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.
The issue might be solved in cywin in one/two months - maybe.
from kadnode.
Any progress with packaging so far?
from kadnode.
Here is a build howto: https://github.com/mwarning/KadNode/blob/master/windows/README.md
from kadnode.
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.
I dont't have time to investigate or experiment at the moment, but here are a couple existing open WINS implementation:
- LWINS (Lightweight WINS server) - standalone server - http://www.lwins.org/
- Samba's WINS server - part of Samba (relatively big software) - http://oreilly.com/openbook/samba/book/ch07_03.html
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.
Thanks for the help. I have a hard time solving this.
from kadnode.
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:
- NameCoin depends on using a specific DNS server or DNS proxy : http://bluishcoder.co.nz/2011/05/12/namecoin-a-dns-alternative-based-on-bitcoin.html
- Tor & .onion hidden services : the following mailing list message contains interesting information on how this might be answered : DNS server, SOCKS proxy, .. http://archives.seul.org/or/talk/Jul-2010/msg00007.html
Also, Is Cygwin required for building only, or would it be required for users too ?
from kadnode.
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.
The lastest release contains an unpackaged Windows binary along with a bare setup.
from kadnode.
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.
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.
It's done.
from kadnode.
Related Issues (20)
- can not start on windows HOT 8
- daemon crashes on resovle HOT 11
- keeps trying to uninstall debian package HOT 2
- can not build in cygwin HOT 3
- Publishing addresses for other nodes HOT 4
- here's an example address you can use HOT 10
- natpmp upnp features ? HOT 3
- Cannot build on Cygwin64. HOT 1
- Upgrade ideas HOT 3
- An odd bug HOT 4
- Upgrade idea HOT 2
- Announce with own CA certs HOT 4
- Ubuntu 22.04: unmet dependencies when installing deb HOT 2
- onion like domain with ed25519 HOT 9
- MX records? HOT 1
- Domain authorization HOT 4
- can't build with mbedtls 3.x HOT 8
- Can this work on a local mesh network HOT 5
- Can this work on a local mesh network
- Cannot compile in cygwin HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kadnode.