Code Monkey home page Code Monkey logo

kadnode's People

Contributors

amine177 avatar axxname avatar chriamue avatar cupivan avatar dangowrt avatar matthiasbock avatar mwarning avatar ryzhovau avatar stargieg avatar stokito avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kadnode's Issues

do not compile in archlinux

makepkg -si

==> Запускается build()...
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -std=gnu99 -I/usr/local/include -DLPD -DAUTH -DCMD -DNSS -c -o build/main.o src/main.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -std=gnu99 -I/usr/local/include -DLPD -DAUTH -DCMD -DNSS -c -o build/results.o src/results.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -std=gnu99 -I/usr/local/include -DLPD -DAUTH -DCMD -DNSS -c -o build/kad.o src/kad.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -std=gnu99 -I/usr/local/include -DLPD -DAUTH -DCMD -DNSS -c -o build/log.o src/log.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -std=gnu99 -I/usr/local/include -DLPD -DAUTH -DCMD -DNSS -c -o build/conf.o src/conf.c
In file included from src/results.c:15:0:
src/results.h:6:20: фатальная ошибка: sodium.h: Нет такого файла или каталога
#include <sodium.h>
^
In file included from src/kad.c:12:0:
src/results.h:6:20: фатальная ошибка: sodium.h: Нет такого файла или каталога
#include <sodium.h>
^
компиляция прервана.
компиляция прервана.
In file included from src/main.c:18:0:
src/values.h:7:20: фатальная ошибка: sodium.h: Нет такого файла или каталога
#include <sodium.h>
^
компиляция прервана.
Makefile:87: ошибка выполнения рецепта для цели «build/kad.o»
make: *** [build/kad.o] Ошибка 1
make: *** Ожидание завершения заданий…
Makefile:87: ошибка выполнения рецепта для цели «build/main.o»
make: *** [build/main.o] Ошибка 1
Makefile:87: ошибка выполнения рецепта для цели «build/results.o»
make: *** [build/results.o] Ошибка 1
In file included from src/conf.c:15:0:
src/values.h:7:20: фатальная ошибка: sodium.h: Нет такого файла или каталога
#include <sodium.h>
^
компиляция прервана.
Makefile:87: ошибка выполнения рецепта для цели «build/conf.o»
make: *** [build/conf.o] Ошибка 1
==> ОШИБКА: Произошел сбой в build().
Преждевременный выход...

after install libsodium

find: /usr/share/polkit-1/rules.d': Permission denied cc build/main.o build/results.o build/kad.o build/log.o build/conf.o build/sha1.o build/net.o build/utils.o build/values.o build/peerfile.o build/unix.o build/ext-lpd.o build/ext-auth.o build/ext-cmd.o build/ext-nss.o -o build/kadnode -L/usr/local/lib -lc build/ext-auth.o: In functionauth_generate_key_pair':
ext-auth.c:(.text+0x44): undefined reference to crypto_sign_keypair' build/ext-auth.o: In functionauth_verify_challenge':
ext-auth.c:(.text+0xd42): undefined reference to crypto_sign_open' build/ext-auth.o: In functionauth_receive_challenge':
ext-auth.c:(.text+0xf4f): undefined reference to `crypto_sign'
collect2: error: ld returned 1 exit status
Makefile:97: recipe for target 'kadnode' failed
make: *** [kadnode] Error 1
==> ERROR: A failure occurred in build().
Aborting...

Different hash on Raspberry Pi

The hashes generated on the Raspberry PI are different from other systems.
This is probably a bug related to Endianness.

compile error

-DFWD_NATPMP -DFWD -c -o build/upnp.o src/upnp.c
src/upnp.c: In function ‘upnpGetSpecificPortMappingEntry’:
src/upnp.c:67:2: error: too few arguments to function ‘UPNP_GetSpecificPortMappingEntry’
In file included from src/upnp.h:6:0,
from src/upnp.c:9:
/usr/include/miniupnpc/upnpcommands.h:163:1: note: declared here
src/upnp.c: In function ‘upnpAddPortMapping’:
src/upnp.c:90:2: error: too few arguments to function ‘UPNP_AddPortMapping’
In file included from src/upnp.h:6:0,
from src/upnp.c:9:
/usr/include/miniupnpc/upnpcommands.h:117:1: note: declared here
src/upnp.c: In function ‘upnp_handler’:
src/upnp.c:111:3: error: too few arguments to function ‘upnpDiscover’
In file included from src/upnp.h:5:0,
from src/upnp.c:9:
/usr/include/miniupnpc/miniupnpc.h:53:1: note: declared here
src/upnp.c: In function ‘upnpAddPortMapping’:
src/upnp.c:94:1: warning: control reaches end of non-void function [-Wreturn-type]
src/upnp.c: In function ‘upnpGetSpecificPortMappingEntry’:
src/upnp.c:73:1: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [build/upnp.o] Error 1

On compilation it gives this error..

Error on any connection

I just installed the newest version of kadnode in raspbian and I get this error on any connection to the internet. Ping ,wget , git clone dont work and give this error...

symbol lookup error: /lib/libnss_kadnode.so.2: undefined symbol: addr_parse

kadnode without libsodium

can you give of a working kadnode without the libsodium dependency. I havent used the authentication feature in my diploma so Its more trouble for now.
I tried to checkout to a previous version but I dont really know how to do it.
can you give me a link to a tar file?

UPNP support for node and advertised id/port pairs

UPNP would allow KadNode to instruct a Router to do port forwarding for the DHT.
But it would also allow to automatically open ports for id/port pairs identifiers
that are announced by the KadNode instance.

Fo example, if KadeNode on a computer behind a router announces abcde:80, KadNode could tell the router to forward the external port 80 (of the router) to the local port 80.

add support for Local Peer Discovery

Transmission uses a Local Peer Discovery (LPD).
Kadnode uses an own multicast ping mechanism.
If possible, it is preferable to use the Transmission LPD implementation.

Couchdb replication over dht.

I want to implement couchdb replication feature over dht using kadnode.
Couchdb is a json-oriented database that allows replication between two nodes through http.I am trying to use kadnode as a way for couchdb instances to find each other. I am using python to access and control the couchdb. Could you give me some guidelines or ideas on how to make the couchdb and kadnode cooperate.
Thanks for your support

Not working without modification on the latest Ubuntu/Linux Mint

Probably a fairly minor issue, but it appears that libsodium13 and libminiupnpc5 are both gone in the latest Linux Mint repository, but the program will install, run, and connect if I change the Debian control file to reference libsodium18 and libminiupnpc10 instead, but I'm not sure what the actual difference between the packages is so it might not "actually" be working.

If the packages really are mostly the same, it would be fairly simple to fix, but I'm not sure what the difference between them actually is.

This looks like it could be great for IoT applications, home automation and chat programs if it ever really went mainstream.

How to join a swarm?

Hi,
I am trying to use kadnode but I cant understand how to join an existing swarm?
I tried "import {ip}" where ip was found from a swarm of a torrent file nothing changed.

Example for announce and search with crypto on runtime

@mwarning can you please give me an example of announcing and searching a value on runtime with kadnode-ctl.
I want to be able to do something like this:

On node 1:

kadnode-ctl announce nodename.p2p:<secret_key>

On node 2:

kadnode-ctl search nodename.p2p:<public_key>

I really need this for my software.I wonder if you could add this feature.I have already asked the same question but was waiting for an example.

PEERFILE: Cannot resolve address

$ ./kadnode --config ./kadnode.conf                                                05:54 15-08-16
(I) Starting KadNode v1.0.0 ( lpd auth cmd nss dns )
(I) Node ID: cd89a081cdbd5f4049f264563d83d791c70875c4
(I) IP Mode: IPv6
(I) Run Mode: Foreground
(I) Configuration File: './kadnode.conf'
(I) Verbosity: verbose
(I) Query TLD: .p2p
(I) Peer File: /home/atommixz/build/kadnode/build/peers.txt
(I) LPD Address: ff15::efc0:988f
(I) KAD: Bind to [::]:6881
(I) LPD: Bind to [::]:6771
(I) DNS: Bind to [::1]:3535
(I) NSS: Bind to [::1]:4053
(I) CMD: Bind to [::1]:1700
Press Enter for help.
(W) LPD: Failed to join multicast group on enp4s0: Address already in use
(W) LPD: Failed to join multicast group on enp4s0: Address already in use
(I) LPD: No peers known. Joined multicast group.
(I) LPD: Send multicast message to find nodes.
(W) PEERFILE: Cannot resolve address: 'bttracker.debian.org:6881'
(W) PEERFILE: Cannot resolve address: 'router.bittorrent.com:6881'
(W) PEERFILE: Cannot resolve address: 'router.utorrent.com:6881'
(W) PEERFILE: Cannot resolve address: 'h.hypertracker.ru'
(I) PEERFILE: Imported 0 peers from: '/home/atommixz/build/kadnode/build/peers.txt'

what can I do wrong? I have this msg on two different machines and all this hosts resolves for me. I try different ip mode but I have same issue.

IPv6 Local Peer Discovery is not working

Hi
The LPD dos not recive Multicast Packets. I can see the packets with pcap.
Targets are openwrt (ar71xx,x86) and Mac OSX.

root@druschba:~# kadnode --pidfile /var/run/kadnode.cfg02309b.pid --config /tmp/kadnode.cfg02309b.conf
(I) Starting KadNode v1.0.0 ( lpd cmd dns )
(I) Node ID: 71d7a3f7dd2061082a688768c927023d7f30adc7
(I) IP Mode: IPv6
(I) Run Mode: Foreground
(I) Configuration File: '/tmp/kadnode.cfg02309b.conf'
(I) Verbosity: verbose
(I) Query TLD: .p2p
(I) Peer File: None
(I) LPD Address: ff15::efc0:988f
(I) KAD: Bind to [::]:6881
(I) LPD: Bind to [::]:6771
(I) DNS: Bind to [::1]:3535
(I) CMD: Bind to [::1]:1700
Press Enter for help.
(W) LPD: Failed to join multicast group on eth1: Address already in use
(W) LPD: Failed to join multicast group on eth1: Address already in use
(W) LPD: Failed to join multicast group on eth0.1: Address already in use
(W) LPD: Failed to join multicast group on eth0.1: Address already in use
(W) LPD: Failed to join multicast group on eth0.3: Address already in use
(W) LPD: Failed to join multicast group on eth0.3: Address already in use
(W) LPD: Failed to join multicast group on eth0.2: Address already in use
(I) LPD: No peers known. Joined multicast group.
(I) LPD: Send multicast message to find nodes.
nante:build patrick$ sudo ./kadnode --value-id nante --mode ipv6
(I) Starting KadNode v1.0.0 ( lpd auth cmd dns )
(I) Node ID: 9d3fcd4cfe8b031a57463fed7c0577c8b0fc67b8
(I) IP Mode: IPv6
(I) Run Mode: Foreground
(I) Verbosity: verbose
(I) Query TLD: .p2p
(I) Peer File: None
(I) LPD Address: ff15::efc0:988f
(I) KAD: Bind to [::]:6881
(I) LPD: Bind to [::]:6771
(I) DNS: Bind to [::1]:3535
(I) CMD: Bind to [::1]:1700
Press Enter for help.
(W) LPD: Failed to join IPv6 multicast group on en7: Address already in use
(W) LPD: Failed to join IPv6 multicast group on en7: Address already in use
(W) LPD: Failed to join IPv6 multicast group on en7: Address already in use
(W) LPD: Failed to join IPv6 multicast group on en7: Address already in use
(W) LPD: Failed to join IPv6 multicast group on en7: Address already in use
(I) LPD: No peers known. Joined multicast group.
(I) LPD: Send multicast message to find nodes.

dns lookups

There is a problem in Windows
first DNS server points to Google(8.8.8.8)
second DNS server - Kadnode service(127.0.0.1)

nslookup myserver.p2p

google cant'resolve this address.
then nslookup stops.

if we setup first DNS Kadnode (127.0.0.1) - only our .p2p hosts resolvable
other internet - NO.

I think some getHostbyName() code needed to resolve addresses from Internet DNS servers.

various questions, no issue

Hello mwarning,

/mylife/
First of all thank you to have make it !

This said, i m very interested in re implementing part of your software in nodejs.
Partly because i don't understand very well C and i can t write it.
Also because i have good platform to make this kind of software fit in (ie maboiteaspam/cozy-light).
More surely because DHT and DNS implementation both are existing right now in NodeJS.
Thus, i think i probably only have to realize the job to glue everything all together to make it workable.
/mylife/

Here are some questions i m trying to solve, but maybe you have time and wheeling to help me to answer.

  • Reading the source code i have not yet clearly understand the content of the announce made on the DHT.
    Particularly it s about those part
int dns_lookup_addr( const char hostname[], IP addr[], size_t addr_num ) {
    /* Start lookup for one address */
    if( kad_lookup_value( hostname, addr, &addr_num ) >= 0 && addr_num > 0 ) {
        return addr_num;
    } else {
        return 0;
    }
}

Then after this part totally loose me (...).
kad.c : kad_lookup_value
https://github.com/mwarning/KadNode/blob/master/src/kad.c#L427

  • Are you using a modified version of DHT implementation ?
    I ask because i saw you have embed dht.c, not sure the reason.
  • How have you proceed to test your software ? Is there existing nodes i can use during my development to test it on a real landscape ?

Again, thank you very much for this work !

Build fails on debian wheezy

$ dpkg-buildpackage -us -uc
dpkg-buildpackage: source package kadnode
dpkg-buildpackage: source version 0.5
dpkg-buildpackage: source changed by mwarning <[email protected]>
dpkg-buildpackage: host architecture amd64
 dpkg-source --before-build KadNode
 fakeroot debian/rules clean
dh clean
   dh_testdir
   dh_auto_clean
make[1]: Entering directory `/home/me/KadNode'
rm -f build/*.o
rm -f build/kadnode
rm -f build/kadnode-ctl
rm -f build/libnss_kadnode.so.2
make[1]: Leaving directory `/home/me/KadNode'
   dh_clean
 dpkg-source -b KadNode
dpkg-source: info: using source format `3.0 (native)'
dpkg-source: info: building kadnode in kadnode_0.5.tar.gz
dpkg-source: info: building kadnode in kadnode_0.5.dsc
dpkg-source: warning: missing information for output field Standards-Version
 debian/rules build
make: `build' is up to date.
 fakeroot debian/rules binary
dh binary
   dh_testdir
   dh_auto_configure
   dh_auto_build
make[1]: Entering directory `/home/me/KadNode'
cc -O2 -Wall -Wwrite-strings -pedantic -std=gnu99 -DAUTH -DCMD -DDNS -DNSS -DWEB -DFWD_UPNP -DFWD_NATPMP -DFWD -c -o build/main.o src/main.c
In file included from src/main.c:20:0:
src/values.h:7:20: fatal error: sodium.h: No such file or directory
compilation terminated.
make[1]: *** [build/main.o] Error 1
make[1]: Leaving directory `/home/me/KadNode'
dh_auto_build: make -j1 returned exit code 2
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

merge search and lookup command

It is easier for many purposes to just use the lookup command.
If a search has not yet been performed then just start one.

Arch Linux Build not quite working

Two issues and how to resolve them:

I was following your build instructions.
makepkg failed with some errors:

> $ makepkg
==> Erstelle Paket: kadnode 1.0.0-1 (Sa 23. Apr 14:57:43 CEST 2016)
==> Prüfe Laufzeit-Abhängigkeiten...
==> Prüfe Buildtime-Abhängigkeiten...
==> Empfange Quellen...
  -> v1.0.0.tar.gz gefunden
==> Überprüfe source Dateien mit md5sums...
    v1.0.0.tar.gz ... Übersprungen
==> Entpacke Quellen...
  -> Entpacke v1.0.0.tar.gz mit bsdtar
==> Entferne existierendes $pkgdir/ Verzeichnis...
==> Beginne build()...
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -std=gnu99 -I/usr/local/include -DLPD -DAUTH -DCMD -DNSS src/kadnode-ctl.c -o build/kadnode-ctl
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -std=gnu99 -I/usr/local/include -DLPD -DAUTH -DCMD -DNSS -fPIC -c -o build/ext-libnss.o src/ext-libnss.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -std=gnu99 -I/usr/local/include -DLPD -DAUTH -DCMD -DNSS -fPIC -shared -Wl,-soname,libnss_kadnode.so.2 -o build/libnss_kadnode.so.2 build/ext-libnss.o
cc build/main.o build/results.o build/kad.o build/log.o build/conf.o build/sha1.o build/net.o build/utils.o build/values.o build/peerfile.o build/unix.o build/ext-lpd.o build/ext-auth.o build/ext-cmd.o build/ext-nss.o -o build/kadnode -L/usr/local/lib -lc 
build/ext-auth.o: In function `auth_generate_key_pair':
ext-auth.c:(.text+0x44): undefined reference to `crypto_sign_keypair'
build/ext-auth.o: In function `auth_verify_challenge':
ext-auth.c:(.text+0xd42): undefined reference to `crypto_sign_open'
build/ext-auth.o: In function `auth_receive_challenge':
ext-auth.c:(.text+0xf5f): undefined reference to `crypto_sign'
collect2: Fehler: ld gab 1 als Ende-Status zurück
Makefile:97: die Regel für Ziel „kadnode“ scheiterte
make: *** [kadnode] Fehler 1
==> FEHLER: Ein Fehler geschah in build().
    Breche ab...

I resolved the issue with the undefined references by using makepkg LFLAGS+=-lsodium instead.
Now the build was successful.

Another issue arose when I installed the package.
kadnode: /lib exists in filesystem
This is due to a change in how pacman handles symlinks
I just had to change:
install -Dm644 build/libnss_kadnode.so.2 "$pkgdir"/lib/libnss_kadnode.so.2
to
install -Dm644 build/libnss_kadnode.so.2 "$pkgdir"/usr/lib/libnss_kadnode.so.2
in PKGBUILD.

dnsmasq integration fail

I have a dnsmasq startup error with
uci add_list dhcp.@dnsmasq[0].server='/p2p/localhost#5353'
bad address at line 12 of /var/etc/dnsmasq.conf
line 12
server=/p2p/localhost#3535
I have replace the hostname with ip addr. Then this works fine.
uci add_list dhcp.@dnsmasq[0].server='/p2p/::1#5353'

Kadnode won't respond after multiple lookup

Hi,

I've been looking a bit into your software for the last couple of days and I wanted to build a quick "benchmark" program in golang to evaluate what latency we can expect. To do so I announced a several node names with --value id (500 to be precise) on a node, an tried to resolve them on another machine.

The thing is that after 60~ successful lookups on the client trying to resolve these, Kadnode only throws "Some error occured.", either directly through Kadnode's console or via Kadnode-ctl.

The benchmark I do in go is pretty much straight forward, I mimic Kadnode-ctl by sending UDP messages to the running instance of Kadnode, throwing "lookup Xmynode.p2p" every 100ms to Kadnode and when Kadnode replies with an IP adress, I register the time it took to look it up.

Any idea where this might come from ?

Do announcements after a proper bootstrap process

Currently, announcements (--value-id) are send at startup even if KadNode has itself not properly bootstrapped into the network.

Solution - wait a few seconds after startup for the first announcement to be made.

problem with interface configuration

the config in /etc/config/kadnode changed from ifce to ifname? daemon doesnt start :-(

root@234-8:# vi /etc/config/kadnode
root@234-8:
# /etc/init.d/kadnode restart
(E) CFG: Unknown command line argument: '--ifname'

Kadnode python script doesn't work

I wrote a python script that communicates with an online couchdb database which works as a certificate authority. ( https://gist.github.com/vkefallinos/58936be087ad3b7bb280 )
When I lookup a domain with encryption it keeps searching forever.
The script works with three commands
"python kadnode.py announce domain"
or 'lookup domain'
or 'status'.
You need to install python-couchdb with "pip install couchdb".
On node1 run : python kadnode.py announce node1
On node2 run :
python kadnode.py announce node2
python kadnode.py lookup node1

Every interaction with kadnode is printed on the console. Can you please check it?

configure amount of cached dns records

is there a way of configuring the buffer size for the dns records?
I am considering running kadnode as a dns cache on freifunk nodes and having one program to do dns instead of two (dnsmasq and kadnode) would be better.

dns port is not listen on ipv6 socket

The dns Port is only listen on legacy ipv4 socket

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
udp        0      0 0.0.0.0:53              0.0.0.0:*                           6510/dnsmasq
udp        0      0 0.0.0.0:67              0.0.0.0:*                           1705/odhcpd
udp        0      0 0.0.0.0:6771            0.0.0.0:*                           6845/kadnode
udp        0      0 127.0.0.1:1700          0.0.0.0:*                           6845/kadnode
udp        0      0 0.0.0.0:6881            0.0.0.0:*                           6845/kadnode
udp        0      0 127.0.0.1:5353          0.0.0.0:*                           6845/kadnode
udp        0      0 :::547                  :::*                                1705/odhcpd
udp        0      0 :::53                   :::*                                6510/dnsmasq

dns port 5353 has a conflict with openwrt's mdns

So we can use port 3535 ?
like this
kadnode.@kadnode[0].dns_port='3535'
dhcp.@dnsmasq[0].server='/p2p/127.0.0.1#3535'

udp        0      0 0.0.0.0:53              0.0.0.0:*                           6510/dnsmasq
udp        0      0 0.0.0.0:67              0.0.0.0:*                           1705/odhcpd
udp        0      0 0.0.0.0:6771            0.0.0.0:*                           7472/kadnode
udp        0      0 0.0.0.0:46217           0.0.0.0:*                           7521/mdnsd
udp        0      0 127.0.0.1:1700          0.0.0.0:*                           7472/kadnode
udp        0      0 127.0.0.1:3535          0.0.0.0:*                           7472/kadnode
udp        0      0 0.0.0.0:6881            0.0.0.0:*                           7472/kadnode
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           7521/mdnsd
udp        0      0 :::547                  :::*                                1705/odhcpd
udp        0      0 :::53                   :::*                                6510/dnsmasq
udp        0      0 :::37774                :::*                                7521/mdnsd
udp        0      0 :::5353                 :::*                                7521/mdnsd
udp        0      0 :::5353                 :::*                                7521/mdnsd

Help verification before DNS/NSS interface

DSS/NSS can only transmit one IP address. But KadNode may receive multiple
IP addresses and will select just the first.
Therefore there is a way needed to filter those addresses. This could be done by means of a script etc. that is called in between.

dependencies in debian

I managed to install kadnode0.4 on a raspberry running raspbian and after running it the same id produced different hash from my laptop(installed it two weeks ago).
laptop:kadnode-ctl announce vkefallinos
Announced resource: 5ba1e8ef7588bd30c3a141e5de8afcd00d72642b
raspberry:kadnode-ctl announce vkefallinos
Announce resource 81f95a017f8cc3eb13abcd1683ac5a7e1b71e9df on port 1 for 30 minutes.

So I figured I should the same version on both computers.
So now I cant even install it.
when I try to dpkg-buildpackage in linux mint the package libminiupnpc-dev was needed and after installing that it says

cc -O2 -Wall -Wwrite-strings -pedantic -std=gnu99 -DCMD -DDEBUG -DDNS -DNSS -DWEB -DFWD_UPNP -DFWD_NATPMP -DFWD -c -o build/upnp.o src/upnp.c src/upnp.c: In function ‘upnpGetSpecificPortMappingEntry’: src/upnp.c:58:2: error: too few arguments to function ‘UPNP_GetSpecificPortMappingEntry’ In file included from src/upnp.h:6:0, from src/upnp.c:9: /usr/include/miniupnpc/upnpcommands.h:163:1: note: declared here src/upnp.c: In function ‘upnpAddPortMapping’: src/upnp.c:76:2: error: too few arguments to function ‘UPNP_AddPortMapping’ In file included from src/upnp.h:6:0, from src/upnp.c:9: /usr/include/miniupnpc/upnpcommands.h:117:1: note: declared here src/upnp.c: In function ‘upnp_handler’: src/upnp.c:93:3: error: too few arguments to function ‘upnpDiscover’ In file included from src/upnp.h:5:0, from src/upnp.c:9: /usr/include/miniupnpc/miniupnpc.h:53:1: note: declared here src/upnp.c: In function ‘upnpAddPortMapping’: src/upnp.c:77:1: warning: control reaches end of non-void function [-Wreturn-type] src/upnp.c: In function ‘upnpGetSpecificPortMappingEntry’: src/upnp.c:59:1: warning: control reaches end of non-void function [-Wreturn-type] make[1]: *** [build/upnp.o] Error 1 make[1]: Leaving directory /home/vasilis/Main_Projects/diploma/KadNode'
dh_auto_build: make -j1 returned exit code 2
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2'`

Send message through dht.

Is there a way for kadnode to ask a question to another node that it found and receive an answer? I want this so I can verify that the node I found is actually the node I wanted.

After some announces it gives no response

My program announces a value, does lookup for 1 minute and after that it announces 3 values. The first of the 3 values is announced. The other two give no response received. I give 15 seconds between every announcement. Does it need more time?
Also when i run "pidof kadnode" it gives me multiple pids.

lookup on wildcard does not seem to work

I have two kadnode instances running with a custom tld called ".ffffm"
the value-ids are tcs1.ffffm and tcs2.ffffm. using
kadnode-ctl lookup tcs1.ffffm or kadnode-ctl lookup tcs2.ffffm I will receive a reply with an IP-Address however running a wildcard lookup like
kadnode-ctl lookup "*.ffffm" I am not receiving a result but seeing "Search in progress" for minutes already.

What should I do to investigate?

Local Peer Discovery is not working

Despite my claims, this stil seem not to work properly. Pakets are send, but not received when they not from the local system.. investigating.

build fails on raspberry pi debian

make

cc -O2 -Wall -Wwrite-strings -pedantic -std=gnu99 -DAUTH -DCMD -DNSS -DFWD_UPNP -DFWD_NATPMP -DFWD -c -o build/upnp.o src/upnp.c
src/upnp.c: In function ‘upnpGetSpecificPortMappingEntry’:
src/upnp.c:66:2: error: too few arguments to function ‘UPNP_GetSpecificPortMappingEntry’
/usr/include/miniupnpc/upnpcommands.h:182:1: note: declared here
src/upnp.c:72:1: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [build/upnp.o] Fehler 1

Any ideas?
Running Raspberry Pi Debian
greets tihmstar :)

store transaction detail

Hi

I was wondering instead of sending back an IP as a result of a DNS request, can it send back a transaction number from bitcoin blockchain?

Or maybe with a few mods to this codebase, can we change it to do so?

no response received

I am starting kadnode in the university network with a public ip which has all the ports open and no upnp on nat enabled.When I kadnode-ctl it gives me no response received. I think kadnode has a problem when it has a public ip.Can you please help me.

how to configure?

I can't understand how to configure:

first node config:
--peerfile /etc/kadnode/peers.txt
--value-id s17.p2p
--auth-add-skey s17.p2p:c84995c206b6fd702d9af43497faa4fb10e3e847fe068350a5fdc851d84ed72690d59cdde52e2d858746efd4c0e5f14ad8c5d80b7f6b879cbcd4ed45142ffa4b

public key: 90d59cdde52e2d858746efd4c0e5f14ad8c5d80b7f6b879cbcd4ed45142ffa4b

secret key: c84995c206b6fd702d9af43497faa4fb10e3e847fe068350a5fdc851d84ed72690d59cdde52e2d858746efd4c0e5f14ad8c5d80b7f6b879cbcd4ed45142ffa4b


kadnode-ctl status

Version: KadNode v1.0.0 ( lpd auth cmd nss natpmp upnp )
DHT id: 7832701de2acd9b972878cdb0edad3e68c5336f2
DHT bound to: 0.0.0.0:6881 /
DHT Nodes: 186 (107 good) (IPv4)
DHT Storage: 0 (max 16384), 0 peers (max 2048 per storage)
DHT Searches: 0 active, 1 completed (max 1024)
DHT Blacklist: 4 (max 10)
DHT Values to announce: 1

ping s17.p2p

-- Works fine on this host (first node)!!!

second node config:
--peerfile /etc/kadnode/peers.txt
--auth-add-pkey s17.p2p:90d59cdde52e2d858746efd4c0e5f14ad8c5d80b7f6b879cbcd4ed45142ffa4b

public key: 90d59cdde52e2d858746efd4c0e5f14ad8c5d80b7f6b879cbcd4ed45142ffa4b

secret key: c84995c206b6fd702d9af43497faa4fb10e3e847fe068350a5fdc851d84ed72690d59cdde52e2d858746efd4c0e5f14ad8c5d80b7f6b879cbcd4ed45142ffa4b


kadnode-ctl status

Version: KadNode v1.0.0 ( lpd auth cmd nss natpmp upnp )
DHT id: b632de370fa4f92c4e018e0996407e5ac3a390e9
DHT bound to: 0.0.0.0:6881 /
DHT Nodes: 136 (69 good) (IPv4)
DHT Storage: 0 (max 16384), 0 peers (max 2048 per storage)
DHT Searches: 0 active, 1 completed (max 1024)
DHT Blacklist: 0 (max 10)
DHT Values to announce: 0

ping s17.p2p

ping: unknown host !!!!

What is wrong?

Use kadnode-ctl to announce a node with secret key.

Hello once again..
Is it possible to announce a node with auth after kadnode has started?
--auth-add-skey and --auth-add-pkey is only available through kadnode.
Announce with secret key and lookup with public key is not available or I haven't found how to implement it.

lookup node expiration

I found in Your code that kad_lookup value is updated after 10 minutes.
kad.c
if( results_entries_count( results ) == 0 || (time_now_sec() - results->start_time) > (MAX_SEARCH_LIFETIME / 2) ) {
Good Idea!

But in results.c
void results_expire( void ) { if( results->start_time < (now - MAX_SEARCH_LIFETIME) ) { results_remove( results );

You remove search results after 20 minutes.
And a new search request, on demand takes some time.
It is not comfortable for desktop use, for example in browser.

Maybe to do remove_results_time 1 day or even 3 days?

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.