mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 08:35:16 -04:00
Created V0.3.x branch and moved the head into the trunk directory.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@246 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
commit
935745a08e
1318 changed files with 348809 additions and 0 deletions
28
libretroshare/src/dht/Makefile
Normal file
28
libretroshare/src/dht/Makefile
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
RS_TOP_DIR = ..
|
||||
include ../make.opt
|
||||
|
||||
OBJ = dhthandler.o
|
||||
#CADKINC = /home/rmf24/prog/src/KadC
|
||||
#CFLAGS += -I $(CADKINC)
|
||||
#RSLIBS += -L $(CADKINC) -lKadC
|
||||
|
||||
|
||||
all : $(OBJ) librs dhttest
|
||||
|
||||
dhttest: $(OBJ) dhttest.o
|
||||
$(CC) $(CFLAGS) -o dhttest $(OBJ) dhttest.o $(RSLIBS)
|
||||
|
||||
librs: $(OBJ)
|
||||
$(AR) r $(LIBRS) $(OBJ)
|
||||
$(RANLIB) $(LIBRS)
|
||||
|
||||
.cc.o:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
clean:
|
||||
-/bin/rm $(OBJ) dhttest.o
|
||||
|
||||
clobber: clean
|
||||
-/bin/rm dhttest
|
||||
|
710
libretroshare/src/dht/dhthandler.cc
Normal file
710
libretroshare/src/dht/dhthandler.cc
Normal file
|
@ -0,0 +1,710 @@
|
|||
|
||||
#include "dht/dhthandler.h"
|
||||
|
||||
|
||||
/* This stuff is actually C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <int128.h>
|
||||
#include <rbt.h>
|
||||
#include <KadCalloc.h>
|
||||
#include <KadClog.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
/* This stuff is actually C */
|
||||
|
||||
|
||||
/* HACK TO SWITCH THIS OFF during testing */
|
||||
/*define NO_DHT_RUNNING 1*/
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, dhtentry &ent)
|
||||
{
|
||||
out << "DHTENTRY(" << ent.id << "): Status: " << ent.status;
|
||||
out << std::endl;
|
||||
out << "\taddr: " << inet_ntoa(ent.addr.sin_addr) << ":" << ntohs(ent.addr.sin_port);
|
||||
out << std::endl;
|
||||
out << "\tlastTS: " << time(NULL) - ent.lastTs << " secs ago";
|
||||
out << "\tFlags: " << ent.flags;
|
||||
out << std::endl;
|
||||
return out;
|
||||
}
|
||||
|
||||
#define DHT_UNKNOWN 0
|
||||
#define DHT_SEARCHING 1 /* for peers */
|
||||
#define DHT_PUBLISHING 1 /* for self */
|
||||
#define DHT_FOUND 2
|
||||
|
||||
/* time periods */
|
||||
#define DHT_MIN_PERIOD 10
|
||||
#define DHT_SEARCH_PERIOD 300
|
||||
#define DHT_REPUBLISH_PERIOD 1200
|
||||
|
||||
void cleardhtentry(dhtentry *ent, std::string id)
|
||||
{
|
||||
ent -> name = "";
|
||||
ent -> id = id;
|
||||
ent -> addr.sin_addr.s_addr = 0;
|
||||
ent -> addr.sin_port = 0;
|
||||
ent -> flags = 0;
|
||||
ent -> status = DHT_UNKNOWN;
|
||||
ent -> lastTs = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void initdhtentry(dhtentry *ent)
|
||||
{
|
||||
ent -> name = "";
|
||||
// leave these ...
|
||||
//ent -> addr.sin_addr.in_addr = 0;
|
||||
//ent -> addr.sin_port = 0;
|
||||
//ent -> flags = 0;
|
||||
ent -> status = DHT_SEARCHING;
|
||||
ent -> lastTs = time(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
void founddhtentry(dhtentry *ent, struct sockaddr_in inaddr, unsigned int flags)
|
||||
{
|
||||
ent -> addr = inaddr;
|
||||
ent -> flags = flags;
|
||||
ent -> status = DHT_FOUND;
|
||||
ent -> lastTs = time(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
dhthandler::dhthandler(std::string inifile)
|
||||
:mShutdown(false), dhtOk(false)
|
||||
{
|
||||
/* init own to null */
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
cleardhtentry(&ownId, "");
|
||||
kadcFile = inifile;
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
|
||||
/* start up the threads... */
|
||||
init();
|
||||
}
|
||||
|
||||
dhthandler::~dhthandler()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* This is internal - only called when active */
|
||||
bool dhthandler::networkUp()
|
||||
{
|
||||
/* no need for mutex? */
|
||||
return (20 < KadC_getnknodes(pkcc));
|
||||
}
|
||||
|
||||
/* this is external */
|
||||
int dhthandler::dhtPeers()
|
||||
{
|
||||
int count = 0;
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
if (dhtOk)
|
||||
{
|
||||
count = KadC_getnknodes(pkcc);
|
||||
}
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* set own tag */
|
||||
void dhthandler::setOwnHash(std::string id)
|
||||
{
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
ownId.id = id;
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
}
|
||||
|
||||
void dhthandler::setOwnPort(short port)
|
||||
{
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
ownId.addr.sin_port = htons(port);
|
||||
/* reset own status -> so we republish */
|
||||
ownId.status = DHT_UNKNOWN;
|
||||
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
}
|
||||
|
||||
bool dhthandler::getExtAddr(struct sockaddr_in &addr, unsigned int &flags)
|
||||
{
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
|
||||
if (ownId.status == DHT_UNKNOWN)
|
||||
{
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
return false;
|
||||
}
|
||||
|
||||
addr = ownId.addr;
|
||||
flags = ownId.flags;
|
||||
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
return true;
|
||||
}
|
||||
|
||||
/* at startup */
|
||||
void dhthandler::addFriend(std::string id)
|
||||
{
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
std::map<std::string, dhtentry>::iterator it;
|
||||
it = addrs.find(id);
|
||||
if (it == addrs.end())
|
||||
{
|
||||
/* not found - add */
|
||||
dhtentry ent;
|
||||
cleardhtentry(&ent, id);
|
||||
addrs[id] = ent;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* already there */
|
||||
std::cerr << "dhthandler::addFriend() Already there!" << std::endl;
|
||||
}
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
}
|
||||
|
||||
void dhthandler::removeFriend(std::string id)
|
||||
{
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
std::map<std::string, dhtentry>::iterator it;
|
||||
it = addrs.find(id);
|
||||
if (it == addrs.end())
|
||||
{
|
||||
/* not found - complain*/
|
||||
std::cerr << "dhthandler::addFriend() Already there!" << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* found */
|
||||
addrs.erase(it);
|
||||
}
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
}
|
||||
|
||||
/* called prior to connect */
|
||||
bool dhthandler::addrFriend(std::string id, struct sockaddr_in &addr, unsigned int &flags)
|
||||
{
|
||||
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
|
||||
/* look it up */
|
||||
bool ret = false;
|
||||
std::map<std::string, dhtentry>::iterator it;
|
||||
it = addrs.find(id);
|
||||
if (it == addrs.end())
|
||||
{
|
||||
/* not found - complain*/
|
||||
std::cerr << "dhthandler::addrFriend() Non-existant!" << std::endl;
|
||||
ret = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (it->second.status == DHT_FOUND)
|
||||
{
|
||||
addr = it->second.addr;
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
return ret;
|
||||
}
|
||||
|
||||
int dhthandler::init()
|
||||
{
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
|
||||
/* HACK TO SWITCH THIS OFF during testing */
|
||||
#ifdef NO_DHT_RUNNING
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
dhtOk = false;
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
char *filename = (char *) malloc(1024);
|
||||
sprintf(filename, "%.1023s", kadcFile.c_str());
|
||||
|
||||
/* start up the dht server. */
|
||||
KadC_log("KadC - library version: %d.%d.%d\n",
|
||||
KadC_version.major, KadC_version.minor, KadC_version.patchlevel);
|
||||
|
||||
/* file, Leaf, StartNetworking (->false in full version) */
|
||||
kcc = KadC_start(filename, true, 1);
|
||||
if(kcc.s != KADC_OK) {
|
||||
KadC_log("KadC_start(%s, %d) returned error %d:\n",
|
||||
kadcFile.c_str(), 1, kcc.s);
|
||||
KadC_log("%s %s", kcc.errmsg1, kcc.errmsg2);
|
||||
|
||||
dhtOk = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
dhtOk = true;
|
||||
}
|
||||
|
||||
pkcc = &kcc;
|
||||
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
return 1;
|
||||
}
|
||||
|
||||
int dhthandler::shutdown()
|
||||
{
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
/* end the dht server. */
|
||||
kcs = KadC_stop(&kcc);
|
||||
if(kcs != KADC_OK) {
|
||||
KadC_log("KadC_stop(&kcc) returned error %d:\n", kcc.s);
|
||||
KadC_log("%s %s", kcc.errmsg1, kcc.errmsg2);
|
||||
}
|
||||
|
||||
KadC_list_outstanding_mallocs(10);
|
||||
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int dhthandler::write_inifile()
|
||||
{
|
||||
/* if we're up and we have enough valid ones */
|
||||
|
||||
#define MIN_KONTACTS 50
|
||||
|
||||
if (KadC_getncontacts(pkcc) > MIN_KONTACTS)
|
||||
{
|
||||
std::cerr << "DhtHandler::Write_IniFile() Writing File" << std::endl;
|
||||
if (KADC_OK != KadC_write_inifile(pkcc, NULL))
|
||||
{
|
||||
KadC_log("KadC_write_inifile(%s, %d) returned error %d:\n",
|
||||
kadcFile.c_str(), 1, kcc.s);
|
||||
KadC_log("%s %s", kcc.errmsg1, kcc.errmsg2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "DhtHandler::Write_IniFile() Not enough contacts" << std::endl;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
void dhthandler::run()
|
||||
{
|
||||
|
||||
/* infinite loop */
|
||||
int totalsleep = 0;
|
||||
while(1)
|
||||
{
|
||||
// std::cerr << "DhtHandler::Run()" << std::endl;
|
||||
|
||||
if (!dhtOk)
|
||||
{
|
||||
std::cerr << "DhtHandler::Run() Failed to Start" << std::endl;
|
||||
|
||||
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
#ifndef WINDOWS_SYS
|
||||
sleep(1);
|
||||
#else
|
||||
|
||||
Sleep(1000);
|
||||
#endif
|
||||
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
/* lock it up */
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
|
||||
bool toShutdown = mShutdown;
|
||||
|
||||
/* shutdown */
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
|
||||
|
||||
print();
|
||||
|
||||
if (toShutdown)
|
||||
{
|
||||
shutdown();
|
||||
dhtOk = false;
|
||||
}
|
||||
|
||||
|
||||
/* check ids */
|
||||
|
||||
int allowedSleep = checkOwnStatus();
|
||||
int nextPeerCheck = checkPeerIds();
|
||||
if (nextPeerCheck < allowedSleep)
|
||||
{
|
||||
allowedSleep = nextPeerCheck;
|
||||
}
|
||||
if (allowedSleep > 10)
|
||||
{
|
||||
allowedSleep = 10;
|
||||
}
|
||||
else if (allowedSleep < 10)
|
||||
{
|
||||
allowedSleep = 10;
|
||||
}
|
||||
// std::cerr << "DhtHandler::Run() sleeping for:" << allowedSleep << std::endl;
|
||||
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
#ifndef WINDOWS_SYS
|
||||
sleep(allowedSleep);
|
||||
#else
|
||||
Sleep(1000 * allowedSleep);
|
||||
#endif
|
||||
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
|
||||
#define DHT_INIT_STORE_PERIOD 300
|
||||
|
||||
totalsleep += allowedSleep;
|
||||
if (totalsleep > DHT_INIT_STORE_PERIOD)
|
||||
{
|
||||
write_inifile();
|
||||
totalsleep = 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int dhthandler::print()
|
||||
{
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
|
||||
std::cerr << "DHT Status:" << std::endl;
|
||||
std::cerr << "KNodes: " << KadC_getnknodes(pkcc);
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "Kontacts: " << KadC_getncontacts(pkcc);
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "KBuckets: ";
|
||||
std::cerr << std::endl;
|
||||
KadC_listkbuckets(pkcc);
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "Own DHT:" << std::endl;
|
||||
std::cerr << ownId << std::endl;
|
||||
|
||||
std::cerr << addrs.size() << " Peers:" << std::endl;
|
||||
|
||||
std::map<std::string, dhtentry>::iterator it;
|
||||
for(it = addrs.begin(); it != addrs.end(); it++)
|
||||
{
|
||||
std::cerr << "Peer DHT" << std::endl;
|
||||
std::cerr << it -> second << std::endl;
|
||||
}
|
||||
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int dhthandler::checkOwnStatus()
|
||||
{
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
|
||||
int nextcall = DHT_REPUBLISH_PERIOD;
|
||||
bool toPublish = false;
|
||||
|
||||
/* if we are publishing, and time up ... republish */
|
||||
if (ownId.status == DHT_UNKNOWN)
|
||||
{
|
||||
/* if valid Hash and Port */
|
||||
if ((ownId.id != "") && (ownId.addr.sin_port != 0) &&
|
||||
(networkUp())) /* network is up */
|
||||
{
|
||||
unsigned long int extip = KadC_getextIP(pkcc);
|
||||
ownId.flags = KadC_getfwstatus(pkcc);
|
||||
if (extip != 0)
|
||||
{
|
||||
ownId.addr.sin_addr.s_addr = htonl(extip);
|
||||
toPublish = true;
|
||||
}
|
||||
}
|
||||
nextcall = DHT_MIN_PERIOD;
|
||||
}
|
||||
else /* ownId.status == DHT_PUBLISHING */
|
||||
{
|
||||
/* check time.
|
||||
*/
|
||||
if (ownId.lastTs + DHT_REPUBLISH_PERIOD < time(NULL))
|
||||
{
|
||||
toPublish = true;
|
||||
}
|
||||
}
|
||||
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
|
||||
if (toPublish)
|
||||
{
|
||||
publishOwnId();
|
||||
}
|
||||
|
||||
return nextcall;
|
||||
}
|
||||
|
||||
int dhthandler::checkPeerIds()
|
||||
{
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
/* if we are unknown .... wait */
|
||||
int nextcall = DHT_REPUBLISH_PERIOD;
|
||||
std::map<std::string, dhtentry>::iterator it;
|
||||
|
||||
/* local list */
|
||||
std::list<std::string> idsToUpdate;
|
||||
std::list<std::string>::iterator it2;
|
||||
|
||||
for(it = addrs.begin(); it != addrs.end(); it++)
|
||||
{
|
||||
/* if we are publishing, and time up ... republish */
|
||||
if (it -> second.status == DHT_UNKNOWN)
|
||||
{
|
||||
/* startup */
|
||||
idsToUpdate.push_back(it->first);
|
||||
}
|
||||
else if (it -> second.status == DHT_SEARCHING)
|
||||
{
|
||||
/* check if time */
|
||||
if (it -> second.lastTs + DHT_SEARCH_PERIOD < time(NULL))
|
||||
{
|
||||
idsToUpdate.push_back(it->first);
|
||||
}
|
||||
nextcall = DHT_SEARCH_PERIOD;
|
||||
}
|
||||
else if (it -> second.status == DHT_FOUND)
|
||||
{
|
||||
/* check if time */
|
||||
if (it -> second.lastTs + DHT_REPUBLISH_PERIOD < time(NULL))
|
||||
{
|
||||
idsToUpdate.push_back(it->first);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
|
||||
for(it2 = idsToUpdate.begin(); it2 != idsToUpdate.end(); it2++)
|
||||
{
|
||||
searchId(*it2);
|
||||
}
|
||||
|
||||
return nextcall;
|
||||
}
|
||||
|
||||
/* already locked */
|
||||
int dhthandler::publishOwnId()
|
||||
{
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
/* publish command */
|
||||
/* publish {#[khash]|key} {#[vhash]|value} [meta-list [nthreads [nsecs]]] */
|
||||
char index[1024];
|
||||
sprintf(index, "#%.1023s", ownId.id.c_str());
|
||||
char value[1024];
|
||||
sprintf(value, "#%.1023s", ownId.id.c_str());
|
||||
|
||||
/* to store the ip address and flags */
|
||||
char metalist[1024];
|
||||
sprintf(metalist, "rsid=%s:%d;flags=%04X;",
|
||||
inet_ntoa(ownId.addr.sin_addr),
|
||||
ntohs(ownId.addr.sin_port),
|
||||
ownId.flags);
|
||||
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
|
||||
|
||||
int nthreads = 10;
|
||||
int duration = 15;
|
||||
int status;
|
||||
|
||||
/* might as well hash back to us? */
|
||||
status = KadC_republish(pkcc, index, value, metalist, nthreads, duration);
|
||||
if(status == 1)
|
||||
{
|
||||
KadC_log("Syntax error preparing search. Try: p key #hash [tagname=tagvalue[;...]]\n");
|
||||
}
|
||||
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
|
||||
/* update entry */
|
||||
initdhtentry(&ownId);
|
||||
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* must be protected by mutex externally */
|
||||
dhtentry *dhthandler::finddht(std::string id)
|
||||
{
|
||||
std::map<std::string, dhtentry>::iterator it;
|
||||
it = addrs.find(id);
|
||||
if (it == addrs.end())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
return &(it->second);
|
||||
}
|
||||
|
||||
int dhthandler::searchId(std::string id)
|
||||
{
|
||||
if (!networkUp())
|
||||
return 0;
|
||||
|
||||
/* ack search */
|
||||
bool updated = false;
|
||||
|
||||
/* search */
|
||||
void *iter;
|
||||
KadCdictionary *pkd;
|
||||
char *filter = "";
|
||||
int nthreads = 10;
|
||||
int duration = 15;
|
||||
int maxhits = 100;
|
||||
time_t starttime = time(NULL);
|
||||
void *resdictrbt;
|
||||
int nhits;
|
||||
|
||||
char index[1024];
|
||||
sprintf(index, "#%.1023s", id.c_str());
|
||||
|
||||
/* cannot be holding mutex here... (up to 15 secs) */
|
||||
resdictrbt = KadC_find(pkcc, index, filter, nthreads, maxhits, duration);
|
||||
|
||||
nhits = rbt_size(resdictrbt);
|
||||
|
||||
/* list each KadCdictionary returned in the rbt */
|
||||
for(iter = rbt_begin(resdictrbt); iter != NULL; iter = rbt_next(resdictrbt, iter)) {
|
||||
pkd = rbt_value(iter);
|
||||
|
||||
KadC_log("Found: ");
|
||||
KadC_int128flog(stdout, KadCdictionary_gethash(pkd));
|
||||
KadC_log("\n");
|
||||
KadCdictionary_dump(pkd);
|
||||
KadC_log("\n");
|
||||
|
||||
KadCtag_iter iter;
|
||||
unsigned int i;
|
||||
|
||||
bool found = false;
|
||||
std::string addrline;
|
||||
std::string flagsline;
|
||||
for(i = 0, KadCtag_begin(pkd, &iter); (i < iter.tagsleft); i++, KadCtag_next(&iter)) {
|
||||
if(i > 0)
|
||||
KadC_log(";");
|
||||
if ((strncmp("rsid", iter.tagname, 4) == 0)
|
||||
&& (iter.tagtype == KADCTAG_STRING))
|
||||
{
|
||||
KadC_log("DECODING:%s", (char *)iter.tagvalue);
|
||||
addrline = (char *) iter.tagvalue;
|
||||
found = true;
|
||||
}
|
||||
if ((strncmp("flags", iter.tagname, 5) == 0)
|
||||
&& (iter.tagtype == KADCTAG_STRING))
|
||||
{
|
||||
KadC_log("DECODING:%s", (char *)iter.tagvalue);
|
||||
flagsline = (char *) iter.tagvalue;
|
||||
}
|
||||
}
|
||||
|
||||
/* must parse:rsid=ddd.ddd.ddd.ddd:dddd;flags=xxxx */
|
||||
struct sockaddr_in addr;
|
||||
unsigned int flags = 0;
|
||||
unsigned int a, b, c, d, e;
|
||||
if ((found) &&
|
||||
(5 == sscanf(addrline.c_str(), "%d.%d.%d.%d:%d", &a, &b, &c, &d, &e)))
|
||||
{
|
||||
std::ostringstream out;
|
||||
out << a << "." << b << "." << c << "." << d;
|
||||
inet_aton(out.str().c_str(), &(addr.sin_addr));
|
||||
addr.sin_port = htons(e);
|
||||
|
||||
if (flagsline != "")
|
||||
sscanf(flagsline.c_str(), "%x", &flags);
|
||||
|
||||
std::cerr << "Decoded entry: " << out.str() << " : " << e << std::endl;
|
||||
|
||||
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
|
||||
dhtentry *ent = finddht(id);
|
||||
if (ent)
|
||||
{
|
||||
founddhtentry(ent, addr, flags);
|
||||
updated = true;
|
||||
}
|
||||
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Failed to Scan:" << addrline << " <-----" << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
KadC_log("Search completed in %d seconds - %d hit%s returned\n",
|
||||
time(NULL)-starttime, nhits, (nhits == 1 ? "" : "s"));
|
||||
|
||||
for(iter = rbt_begin(resdictrbt); iter != NULL; iter = rbt_begin(resdictrbt)) {
|
||||
pkd = rbt_value(iter);
|
||||
rbt_erase(resdictrbt, iter);
|
||||
KadCdictionary_destroy(pkd);
|
||||
}
|
||||
rbt_destroy(resdictrbt);
|
||||
|
||||
dataMtx.lock(); /* LOCK MUTEX */
|
||||
if (!updated)
|
||||
{
|
||||
dhtentry *ent = finddht(id);
|
||||
if (ent)
|
||||
{
|
||||
initdhtentry(ent);
|
||||
}
|
||||
}
|
||||
dataMtx.unlock(); /* UNLOCK MUTEX */
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if (0)
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <int128.h>
|
||||
#include <rbt.h>
|
||||
#include <KadCalloc.h>
|
||||
#include <KadClog.h>
|
||||
#include <config.h>
|
||||
#include <queue.h> /* required by net.h, sigh... */
|
||||
#include <net.h> /* only for domain2hip() */
|
||||
|
||||
#include <KadCapi.h>
|
||||
|
||||
#endif
|
||||
|
97
libretroshare/src/dht/dhthandler.h
Normal file
97
libretroshare/src/dht/dhthandler.h
Normal file
|
@ -0,0 +1,97 @@
|
|||
#ifndef _RS_DHT_IFACE_H
|
||||
#define _RS_DHT_IFACE_H
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* This stuff is actually C */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <int128.h>
|
||||
#include <KadCapi.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
/* This stuff is actually C */
|
||||
|
||||
|
||||
#include "util/rsthreads.h"
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
/* platform independent networking... */
|
||||
#include "pqi/pqinetwork.h"
|
||||
#include "pqi/pqiaddrstore.h"
|
||||
|
||||
class dhtentry
|
||||
{
|
||||
public:
|
||||
std::string name;
|
||||
std::string id;
|
||||
struct sockaddr_in addr;
|
||||
unsigned int flags;
|
||||
int status;
|
||||
int lastTs;
|
||||
};
|
||||
|
||||
class dhthandler: public RsThread, public pqiAddrStore
|
||||
{
|
||||
public:
|
||||
|
||||
dhthandler(std::string inifile);
|
||||
~dhthandler();
|
||||
|
||||
/* RsIface */
|
||||
/* set own tag */
|
||||
void setOwnHash(std::string id);
|
||||
void setOwnPort(short port);
|
||||
bool getExtAddr(sockaddr_in &addr, unsigned int &flags);
|
||||
|
||||
/* at startup */
|
||||
void addFriend(std::string id);
|
||||
void removeFriend(std::string id);
|
||||
int dhtPeers();
|
||||
|
||||
/* pqiAddrStore ... called prior to connect */
|
||||
virtual bool addrFriend(std::string id, struct sockaddr_in &addr, unsigned int &flags);
|
||||
|
||||
int init();
|
||||
int shutdown();
|
||||
int print();
|
||||
|
||||
/* must run thread */
|
||||
virtual void run();
|
||||
|
||||
private:
|
||||
|
||||
int write_inifile();
|
||||
|
||||
bool networkUp(); /* get status */
|
||||
|
||||
int checkOwnStatus();
|
||||
int checkPeerIds();
|
||||
int publishOwnId();
|
||||
int searchId(std::string id);
|
||||
|
||||
dhtentry *finddht(std::string id);
|
||||
|
||||
/* Mutex for data below */
|
||||
RsMutex dataMtx;
|
||||
|
||||
dhtentry ownId;
|
||||
std::map<std::string, dhtentry> addrs;
|
||||
|
||||
KadCcontext kcc, *pkcc;
|
||||
KadC_status kcs;
|
||||
std::string kadcFile;
|
||||
bool mShutdown;
|
||||
|
||||
bool dhtOk;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* _RS_DHT_IFACE_H */
|
90
libretroshare/src/dht/dhttest.cc
Normal file
90
libretroshare/src/dht/dhttest.cc
Normal file
|
@ -0,0 +1,90 @@
|
|||
|
||||
#include "dht/dhthandler.h"
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
int id = argc % 3;
|
||||
|
||||
char *hash1 = "3509426505463458576487";
|
||||
char *hash2 = "1549879882341985914515";
|
||||
char *hash3 = "8743598543269526505434";
|
||||
|
||||
int port1 = 8754;
|
||||
int port2 = 2355;
|
||||
int port3 = 6621;
|
||||
|
||||
std::cerr << "Starting dhttest Id: " << id << std::endl;
|
||||
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
#ifndef WINDOWS_SYS
|
||||
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
#else
|
||||
// Windows Networking Init.
|
||||
WORD wVerReq = MAKEWORD(2,2);
|
||||
WSADATA wsaData;
|
||||
|
||||
if (0 != WSAStartup(wVerReq, &wsaData))
|
||||
{
|
||||
std::cerr << "Failed to Startup Windows Networking";
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "Started Windows Networking";
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
|
||||
#endif
|
||||
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
|
||||
#ifdef PTW32_STATIC_LIB
|
||||
pthread_win32_process_attach_np();
|
||||
#endif
|
||||
|
||||
dhthandler dht("tst.ini");
|
||||
|
||||
dht.start();
|
||||
|
||||
if (id == 0)
|
||||
{
|
||||
dht.setOwnPort(port1);
|
||||
dht.setOwnHash(hash1);
|
||||
|
||||
dht.addFriend(hash2);
|
||||
dht.addFriend(hash3);
|
||||
}
|
||||
else if (id == 1)
|
||||
{
|
||||
dht.setOwnPort(port2);
|
||||
dht.setOwnHash(hash2);
|
||||
|
||||
dht.addFriend(hash1);
|
||||
dht.addFriend(hash3);
|
||||
}
|
||||
else
|
||||
{
|
||||
dht.setOwnPort(port3);
|
||||
dht.setOwnHash(hash3);
|
||||
|
||||
dht.addFriend(hash1);
|
||||
dht.addFriend(hash2);
|
||||
}
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
|
||||
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
#ifndef WINDOWS_SYS
|
||||
sleep(1);
|
||||
#else
|
||||
|
||||
Sleep(1000);
|
||||
#endif
|
||||
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
272
libretroshare/src/dht/tst.ini
Normal file
272
libretroshare/src/dht/tst.ini
Normal file
|
@ -0,0 +1,272 @@
|
|||
[local]
|
||||
# if the hash (first arg) is 0, a random value will be used.
|
||||
0 0.0.0.0 1234 4662 0
|
||||
[some_ignored_stuff]
|
||||
these lines...
|
||||
...under unrecognized sections...
|
||||
...are ignored and left alone...
|
||||
[overnet_peers]
|
||||
# 259 contacts follow
|
||||
01e32c7d216d1479ff1738b88f81bf3b 82.224.47.90 11297 0
|
||||
01ee86531f5070a344e9d0484744d14d 85.157.111.164 6267 0
|
||||
028b0545ae661b53d1538d90a7728fac 87.238.10.193 8150 0
|
||||
032a16ddd72ad9873e036db246930163 83.78.25.111 10089 0
|
||||
035a2148d7da45022bc36088cbeaa2d5 84.188.185.143 6780 0
|
||||
035d1f176411bd53b4578e383a66bcdd 82.82.140.226 4298 0
|
||||
03b47000764e0b3be3efaff6f81e1a0b 24.0.148.14 4665 0
|
||||
057b9a66771826db0bbd51483a10ff93 85.97.196.22 5678 0
|
||||
084fe60f368e1117c52e88e8f209113e 85.16.152.185 9363 0
|
||||
0857c84b6c77bf9e0d0cdeea6e56f11a 172.159.137.252 11316 1
|
||||
08ca7126b6ead7e6ea3870d13f32d004 83.11.233.250 3911 0
|
||||
090b57278c13cc673230893305538d1f 82.252.210.95 15030 1
|
||||
09166e1c64456cc7b3a989d1acb6bd65 84.98.135.162 11933 0
|
||||
092a05ae3c651f430c806bc49aeb2cb9 210.213.140.62 10521 0
|
||||
0941d60b7b2d83ef565047610570998c 83.181.168.72 3450 0
|
||||
09729bc4c1639fe3f4d914cbb8ddc213 82.247.37.205 7663 0
|
||||
098b7599f442273d1ec2f04710ff436f 80.142.123.8 6133 0
|
||||
09ebe97100d307d2e5419fa2f7cdfec3 87.10.147.210 10301 0
|
||||
0a157ca24a7445da325322144ee01993 24.74.148.251 9464 0
|
||||
0a23207ed240aa7f35202bd4e63b8bdd 84.170.225.102 22222 0
|
||||
0a2e67bee755ff15c5518b3072867034 87.14.169.88 4445 0
|
||||
0a39d5f89b4910945087ef9886f58c77 82.235.178.185 9818 0
|
||||
0becaf5dbbe2eb30694c86408cffb25b 82.234.43.27 19632 0
|
||||
1284fc9d5064cf0c89630fcc06f86f96 122.254.164.2 11839 0
|
||||
12b0ebaa0b3e17e16e38f7149f899e96 82.52.190.151 5405 0
|
||||
12cefeb85edc41e33686ec23f707621c 90.27.87.164 5637 0
|
||||
12dd8d3931c05d9dc7f9fe0fafc54e46 213.103.153.186 11880 0
|
||||
12e075a67748bd9888a537b1ddfc68bb 75.162.143.84 12100 0
|
||||
12f298eb89c926b23eef71724794f386 80.97.199.30 7007 0
|
||||
12f9fb4045af33cb47f5b87ac618b39d 85.140.95.208 6484 0
|
||||
12fced7a66d90c3c029e2fbb0d27d44e 70.48.189.93 6093 1
|
||||
13005d05429d43624683fd2c3ce83c65 83.214.38.125 7448 0
|
||||
13c90dbc29a45b6d8297ce758772c056 58.77.54.12 12291 0
|
||||
140470e218c7f8184af176e54cecc294 62.94.193.218 5600 0
|
||||
148a88de9e03129f7e3e15bdeae59fe1 70.48.175.156 10301 0
|
||||
14d04c790464ad46121934041d6254ec 62.57.36.125 4041 0
|
||||
14d589f5f766e40c0838fd9a74218f7a 71.56.125.35 7543 0
|
||||
158889e94d84e71c135935061743d456 200.16.221.180 3432 0
|
||||
1667353bcc5e4953c9dcb2b025a8e87b 212.76.242.34 9574 1
|
||||
168d639d6f6b4f87e1bd9b1df8344729 218.162.61.52 12901 0
|
||||
16c3bcc5ffc4ce92cdfc7db9f8d52184 80.188.8.104 4662 0
|
||||
182015e86828a195e22ccb2455378e91 220.134.22.185 3315 0
|
||||
18f43620c84d373a5935eb1cffa4bb96 89.169.146.14 8323 0
|
||||
1998abaf1be11abe19a2ea5961befa38 75.36.191.184 5002 0
|
||||
19f0b20dce022dca4ca915b7ce859b17 59.124.237.86 11590 0
|
||||
19ffaeafef17d524126ed45ff7326c2b 83.2.140.63 3128 0
|
||||
1a0b0df71afbac06620431e1ddb5f939 212.106.171.142 6711 0
|
||||
1b6b5245e54d2f68972bfb178b887724 203.49.242.90 6324 0
|
||||
1c20dc407cfa9b57778e929a7867af8a 87.175.196.166 5713 1
|
||||
21b3df22b8c563ac18ee4dfe35a155bc 58.232.60.235 4197 0
|
||||
21d59ad8e70e8e60659638e29eef5c25 80.203.138.183 6350 0
|
||||
220c4cc811b0511f13ccd0672fe2954a 83.28.247.107 3884 0
|
||||
287f16f02efd285381d7657ca5cd99d9 87.221.0.217 6672 0
|
||||
2981223354677a4ddf777902e9225bef 81.179.202.34 4222 0
|
||||
29a7a5751d92da3ade58ad92a1ed942d 124.8.65.42 4422 0
|
||||
29be351bbe4318605d535c76b9a76a6d 83.23.38.244 11386 0
|
||||
29cf29ab2b870b288a292cefed0d94bf 151.44.119.139 7688 0
|
||||
29d063f9aba16668462ab3edf2f43ab7 61.224.52.103 5687 0
|
||||
2a0c14e8d6383d9e5bf2730f0d0ec857 82.130.210.82 50020 0
|
||||
2a11275793d740d102a1348fd3f45909 80.53.196.58 9936 0
|
||||
2a519604b6a0119c126194063edf4b8c 68.148.121.42 6472 0
|
||||
2a83ac042d1278798b00d3352aefe98d 24.243.188.178 10301 0
|
||||
2acf26c3b18173eb4eb6f73622540c6a 86.56.213.115 3558 0
|
||||
2bf18d609eb338c9697c9e99379fd16a 85.137.81.79 11717 0
|
||||
3279ca195c2f4ddf598b8a7dbfd670b6 84.125.74.120 23232 0
|
||||
32ac6a1eeabdcf65f1505d2a95cee6c9 83.24.146.73 11964 1
|
||||
3304d216ec77e0fa5c18712d53c008f6 85.57.160.211 7721 0
|
||||
33a550bed46568b18eb91fae70ca0dbe 24.225.232.219 12164 0
|
||||
33e97bddd82e4d09131b7342acfeb79c 24.132.162.32 3016 0
|
||||
33e9ca51aa7f521589a2e6a3438b2821 80.180.76.149 12777 0
|
||||
34085309549df35140c8e27068083a63 212.59.192.220 4029 0
|
||||
36196c2ea442dd5ae56cd35a7d1f8619 90.10.169.218 12214 0
|
||||
361cea6dd0d377f200474a2d72ca7ba6 149.135.104.131 8190 0
|
||||
3625c3d644b80f221568d688f0f135c5 90.7.181.106 12615 0
|
||||
36317d125a1aff13035bcd3c0dec4978 80.36.124.22 46675 0
|
||||
3640f164a682b2c5d249bdcd8bf38274 80.35.196.42 4665 0
|
||||
36a55737e170cc90ef3ebee1c3b0dc72 217.228.164.18 5325 0
|
||||
36d7979c3328056ab80a53e94588ae9c 87.122.0.101 9902 0
|
||||
37075f69ca1fe6aabe53567c2ab48a1a 87.227.73.35 7776 0
|
||||
375615ba9163d8ecc6a5aed410fe4182 81.1.118.25 5667 1
|
||||
3796255e359f42a5c4fe41976307b5cc 85.141.108.236 4505 0
|
||||
38b0e0fb572b282ed6a610adf7a90de8 82.232.90.43 12223 0
|
||||
38b39efee6bf73cdcc5aff57e816d6ea 71.17.52.65 11438 0
|
||||
38f6091d65b3483cb6f90d670cb3e8fa 151.97.69.209 9997 0
|
||||
39037677e44d021350494e6f7c055a8b 82.225.33.80 11541 0
|
||||
39145af608906d68f059d04b64e8a291 84.129.0.36 8940 0
|
||||
397460b987ff9e9e360f52136618b2c3 83.38.86.240 3378 0
|
||||
3ab05f4b0cebd8a2ff689ce8bfb55232 82.238.254.166 3868 0
|
||||
3acac309140ec0f5e906b6c4ad64d4f4 212.241.66.225 10986 0
|
||||
3b27d9526ef86fbbf0723ae413723c1d 85.16.150.41 9948 0
|
||||
3ebecd58d1f7263b087d9159664997c3 80.192.21.44 3751 0
|
||||
3f614043083f37e5c8487d36b237ea78 124.57.75.101 9934 0
|
||||
3f755464997b43d4d0826fcbbc8b266f 219.84.26.38 7583 0
|
||||
3fac223d6c8f833c42d2ae248e206f21 220.72.28.213 4105 0
|
||||
40bbdfb51868764a24fb96ddf1035f33 70.113.90.243 11327 0
|
||||
40ce92ad1ac65e7290541e2fa1915bdc 148.160.184.5 4669 0
|
||||
416297dd4a79f9fe526182de7dbb1e4d 88.73.212.252 11139 1
|
||||
418b6b00550617e913a3f85cb6043aa4 80.33.124.231 7000 0
|
||||
41d492e47d76f13e4cb76579123a99e7 84.151.121.46 5687 0
|
||||
48ae47cc410aa2ae05c1b707744301f4 82.55.119.14 5875 0
|
||||
48d9789199fc1008b36acb095f9fc787 62.43.160.213 12573 0
|
||||
48e228897865a53b264f4c57db5312d1 71.107.201.77 4864 0
|
||||
49ad250210a9842cfce8fb6d8b848cc9 70.244.241.16 8155 0
|
||||
49c0c086162a51a485c8fc579176ba03 84.148.228.169 12762 0
|
||||
4a6a309f7d179856cffb9e6e47921c6a 88.22.50.75 6955 0
|
||||
4abd70a4ceeee66563edf074f152d4ce 89.180.5.149 12492 0
|
||||
4e2006734147d86a4f7f47199014be4c 70.53.44.52 80 0
|
||||
4e2540fad59bfabd00ff5b28519b1e61 82.7.244.135 4614 0
|
||||
4f8e9b83504d589c5591d58e81406e18 123.99.82.220 9992 0
|
||||
4fd92008c42283607a0ce22e90897696 86.139.46.140 8308 0
|
||||
4fedf465f25cdf48a66e5dec9d1bdd17 83.6.241.127 6882 0
|
||||
50bb895dd390303527424e828e5b54be 24.202.246.85 8230 0
|
||||
51ac71921161bcb6d8b7f8880f46eefc 24.232.81.207 7851 0
|
||||
51b83c36ac4adb9707fbc719f422cbe8 70.80.1.95 10677 0
|
||||
51f280b2fb3151daee581811edb3460d 172.183.248.32 10456 0
|
||||
523fcbe15ed90076457197d9e6750f1e 84.60.0.22 12831 0
|
||||
531d8c87b014bcf993094c420ed08cfe 74.103.42.209 4111 0
|
||||
53a75112814d14ecca2d80bf4a05304c 195.4.200.62 8750 0
|
||||
541e2bb43da70411b0ec9e4a2e3aa0bc 84.125.22.187 3867 0
|
||||
5abf0e1bb97d86db40d4002d4709bf1a 220.70.254.220 5244 0
|
||||
5dc4f61ca975687da17ad01d7a06285d 211.201.124.116 6059 0
|
||||
5efb862926700079413f76ab2c3e79e2 84.126.46.156 5444 0
|
||||
5f27354bfa0ba9ca2bae6106899cc1a3 83.10.113.23 5410 0
|
||||
5f5774d921ce06f3f12dfcb40dd73a49 213.185.6.53 4665 0
|
||||
5f5e5d1d9726f0e0149ffaa75751b05d 82.5.42.25 10301 0
|
||||
6060d6810bc1d07ba691bbe90b95585c 82.56.93.76 4792 0
|
||||
654bf80221c0dec4c74b0342c045abc6 83.53.130.173 4267 0
|
||||
68f38041f26ff4625247ccfa6c9645a2 83.27.138.127 3241 0
|
||||
6928f1993de7d20516fd1dd489213dbc 216.28.31.253 3620 0
|
||||
6b14fa18fc8b5ed357133b1a2502a094 82.159.13.169 12286 0
|
||||
6e21525341966500c9900aa17df49bf3 85.53.89.43 4582 0
|
||||
6e2614fe5389f95f36093d8723536929 58.234.36.88 5225 1
|
||||
6e4fc1983cc5fe4a310712bd063b9de4 83.192.115.177 6265 0
|
||||
6e93bca819d46c7c31164938482e276c 82.49.27.239 8463 0
|
||||
6eb7eb16713cf56f3d8e1ce368bebdab 87.10.218.82 10301 0
|
||||
6f0083083a91360160326195a59ea476 85.49.253.102 11583 1
|
||||
6f414f0a142b802b05932ee4fb810b12 62.80.230.79 6000 0
|
||||
6f548dd7068651c0ee22bfef37080862 172.141.131.116 3003 0
|
||||
6f66be33cebe99344cfcf328aa702cfc 82.234.247.90 5596 0
|
||||
70875fedb3fd7b5e49bcf7fb8323caad 211.213.130.221 4152 0
|
||||
70bbf8199ffef9edd68041ec954dfca0 218.101.206.9 3322 0
|
||||
70d009412251fd40d46d5475c33b5b4d 213.213.249.47 4662 0
|
||||
70dff47cbddf76aa58e13b4124076526 83.42.124.195 9256 0
|
||||
70ecffa5c424f8169d50922cf0de9267 81.60.195.33 47047 0
|
||||
7102b6d37c71f4bb249b4b6e20ac4c0d 146.115.56.136 3682 1
|
||||
712d6dc23289c4c269823f5cb6899e25 84.55.206.118 9228 0
|
||||
7156fd747d07a6865f5b02a8971bc78a 62.235.24.23 17008 0
|
||||
7186f68b51e03cfb745b65f8612f5619 83.198.187.23 5864 1
|
||||
71cc7aa04be67418f10bfbe4adb1bacf 87.5.76.116 5569 0
|
||||
71dbfe600812a1dd9a841951f68edca0 74.78.2.177 4548 0
|
||||
723b96cefcde27f6394bb312ddb3bc73 62.42.1.125 5783 0
|
||||
72f43b744b3170537794cde315148361 84.121.109.184 4175 0
|
||||
7341869dd42cdd9054e2578b68d53029 81.220.168.54 4985 1
|
||||
7a1956c5b41f66669c4b74c71742a058 88.23.168.112 9433 0
|
||||
7a1a6c659c387c936fef2666a1912a32 80.132.101.112 3633 0
|
||||
7a316a90de24721a9733d86d5321e8f0 84.189.143.14 4394 0
|
||||
7a50edadd981b09ba88b6f06acef3718 62.15.235.127 7095 0
|
||||
7a552fce17bb88689f601e531a7e572b 61.64.69.133 6719 0
|
||||
7a753356842ad958e7057a1fcfd2c083 211.201.93.71 10674 0
|
||||
7aa5334de0f210a741c5f1354104b3b1 70.252.73.94 10504 0
|
||||
7b0fc9ae76a8a2727ae54e843bfc3977 80.48.142.10 6162 0
|
||||
7b31f2b3500d8aa49537625afaac52db 24.67.81.50 9469 0
|
||||
7b441d23d521023f5a42cc9b594dd92a 83.92.40.199 6164 0
|
||||
7b4ecae988a881b978f7748088d8e051 67.168.85.39 9273 0
|
||||
7b65226b440f58717ec06ef5d935bc45 86.208.174.157 7253 0
|
||||
7b870dabafbd3419fe46740a5cd7fdfc 82.121.160.160 5040 0
|
||||
7b8879cd08a41d3bf18cb6b00b12e61c 88.24.51.189 11127 0
|
||||
7b8feeeecb097e817fe35416be73fc56 83.6.232.250 5181 0
|
||||
7bd571d08d784662e96f7bae7f7f17b3 84.57.158.33 7222 0
|
||||
7bf2513793a5994b5cad8546f6231e89 84.75.199.138 6082 0
|
||||
7c4e2c83d7417f42afb85c25d903629f 83.26.117.189 4736 0
|
||||
7db9b910b7a85739740f86b81321c5e1 83.21.71.92 6174 0
|
||||
7f51b9d5b5e986f212f34274aff7e4c3 90.154.213.232 59800 0
|
||||
7f9b3a74b692c7bb5b75e450122d6608 84.77.5.138 55000 0
|
||||
7fd158be4a5f243789e123ef83d3edf0 82.54.224.155 23830 0
|
||||
84396c8cf1a26258cba101ea007a49d9 89.228.227.215 8654 0
|
||||
84c97bd4a9fa479440ee7ef35947ce38 70.82.82.220 5290 0
|
||||
8ae1f2710e59c77f8266a12d028a8aaf 212.241.64.215 4854 0
|
||||
900ffda15c6702a93b220738f6f6bccb 84.25.7.56 7746 0
|
||||
90a87e1fe896621f14416995bd3166af 134.109.132.156 16563 0
|
||||
90a8d8cb9c9af9c2e76dac650c189d00 83.23.155.182 8914 0
|
||||
90b399ec0fbe1dab3471e208598d2e7e 84.44.231.141 28583 0
|
||||
90bcf4c6d0620aa9faa928b6da3b1d17 213.47.112.74 3404 0
|
||||
9200db48b63d6331b747621d73cfd3ef 125.135.73.172 5510 0
|
||||
923a3ca51d2c173795ea7980fec03fa4 82.61.70.247 8014 0
|
||||
92de6303460273a43508296b6237c078 124.61.19.247 3348 0
|
||||
92f2c65e8d8c984ecae982c8f9cad81e 85.16.150.41 9948 0
|
||||
945f69d2b0fed4d40c501d18ac1ee335 84.255.205.251 6818 0
|
||||
95f23a606a61d0eedccfc88c671c9504 210.159.160.154 4188 0
|
||||
960ed75cdf0e8e55d8bdf2122779006b 80.102.115.141 3915 0
|
||||
96e1ba371333a60439608576f729617e 84.121.87.1 47047 0
|
||||
98d02d1b5b7ad14dd13535ed11b51c48 85.53.69.99 10003 0
|
||||
9d9a51252908efca21b7f5940d5c16ae 82.225.38.240 7821 0
|
||||
9e31d3105d1be1be100c2dbca9c1cedb 84.183.164.47 7204 0
|
||||
9e53862ce85a043876da4a5784ad1661 85.140.63.22 7516 0
|
||||
9edc2fc255ebae8396d622cb15957176 83.112.107.20 8180 1
|
||||
9ee556648ad3baf1f792aad85e470a7c 219.74.80.197 6601 0
|
||||
9fa9acb2252a2b65b5bfe032cb434281 81.240.140.43 9703 0
|
||||
a167a1c1a719856704541c0a1c3e03a9 69.241.238.138 11593 0
|
||||
a82320cb11db5a34d2e692c5b7ad19d8 88.24.214.34 9534 0
|
||||
a8967880514d80246b2d940d89907976 220.244.126.14 4668 1
|
||||
a914e917b7c972d0ddb0f5d654e9aadc 84.122.49.158 12769 0
|
||||
a91b9efdde30841d46de0b12040b948c 85.155.209.92 5707 0
|
||||
a9b06362d0342d42b24902cb3d71683d 75.46.112.130 9576 0
|
||||
acaca1572ac1f9cb9953e55b2729249d 83.35.237.97 4665 0
|
||||
b2ae365b21df68b48988045b63d4d6fc 189.172.29.169 9874 0
|
||||
b4bddaca531a4f012d4fa46900f69813 71.9.169.115 5775 0
|
||||
b5c9a247777ddae8fcfa83cee4ac676e 219.68.29.74 6230 1
|
||||
b74595669f238061c5b30a518ae33fa5 83.25.82.238 5326 0
|
||||
c12d62c54b9b343874dc7c8366c2cfb6 189.157.29.196 8705 0
|
||||
c14322f92dc74c67dc0f864d272fcbf7 69.31.93.178 3471 0
|
||||
c1604c1d202792be1dca16283d8e9d5a 220.124.224.75 9581 0
|
||||
c1bef91ee0fac09f1a54d827546e6a0a 87.11.206.239 3959 0
|
||||
c21d96781cc4c3d2b16407d76f02e944 218.163.184.113 8597 0
|
||||
c23d212ae659766e8e46438fcfd7dc22 172.180.110.81 3086 0
|
||||
c285e7b2ab22453496522299b15b3801 59.12.208.195 11267 0
|
||||
c2bd693941ef041db66d2fe5c1692e59 88.9.121.245 9384 1
|
||||
c30bdae50cb39cba80ba9ac1a5e1a65a 82.58.189.230 10301 0
|
||||
c3b0f868f4a9abae3eb7007ab9e2e7c8 87.123.217.188 9030 0
|
||||
c54a4feeb6618bfe854146f560ad4c47 81.214.39.120 10000 0
|
||||
c57a5e547d138d1f581221f17e0e272e 86.215.168.93 11447 0
|
||||
c5be09328b367f7702397cae1711f586 83.53.177.127 11315 0
|
||||
c5bf7360aa07f31c07830a7370431c8a 61.224.78.247 12595 0
|
||||
c8618647749d12e3e0995e3f0c556a5b 70.111.26.144 6133 0
|
||||
c8ac99b1bfc68b615e165129f9b182d5 211.233.2.100 12542 0
|
||||
db19cb61c98529a91384cf06493be556 210.180.124.29 3246 0
|
||||
db45d9513bbaf7c3c5bf3e2fffd3012c 83.31.233.170 4471 0
|
||||
db4b83b43f36bc58ac2685743533a389 65.189.237.244 8044 0
|
||||
db5dc765e684ba9a610a865800de3416 81.198.131.36 12718 0
|
||||
db8be48ab25ea2ebff67f3f4312dd204 84.48.235.130 5999 1
|
||||
db9ffaa55e3712f9cee25b805732ee7b 84.9.76.208 10209 0
|
||||
dbb5697be82496bb0c46c3c0a2df3110 61.247.84.226 12426 0
|
||||
dbd681193c024ffce547fdb999ae8339 84.177.92.139 7017 0
|
||||
dbdd57d92f889e6c84a344d862e23826 84.61.146.49 5751 0
|
||||
dbe7aec6a2535f0ff4172ca2917c853c 89.78.201.185 6787 0
|
||||
e119f64361e2022eb2f8e16ab704ac79 70.177.168.143 3893 0
|
||||
e26c5ade9519477fbfb754e142758641 87.123.168.236 5002 0
|
||||
e32ad67eef113f2788c5e438932968d8 85.216.39.254 8579 0
|
||||
e36b23d3b0e5c4e653008aa0fe683941 213.216.232.88 11108 0
|
||||
e38016ff75ecb0de179162256b5afdb1 83.61.12.146 8020 0
|
||||
e380e102024f2e299e7ed2ed847c0edc 87.103.45.238 10901 0
|
||||
e39b3800ff70830b5e158f334197cb7b 222.106.229.231 4474 0
|
||||
e7025c81e4f11bd9595eb5b12635ad88 68.185.86.95 6842 0
|
||||
e702aab5bf92f3356d3a26590e736def 74.56.202.29 8029 0
|
||||
e71f3f7252bc12414cd3fa425f9ae8f3 88.17.127.248 10863 0
|
||||
e75578be101ba7e8a36ae1072682f5f7 122.34.133.174 9592 0
|
||||
e75f71fd8126965e32e23f1056056141 81.203.63.82 1756 0
|
||||
edd8190b83b7ed219536320d4ecb7691 67.83.25.1 4662 0
|
||||
efaff405e405967bae5ea9264229f386 211.187.188.231 3915 0
|
||||
efbdc05dc73789a0656b091186ee1089 71.100.59.158 7519 0
|
||||
f0831665903a6b37e4205ace3621a925 74.114.66.20 3420 0
|
||||
f0a877163f230e7fc690022d564ad4f5 213.46.9.204 9676 0
|
||||
f0c1976867bfa84bbd0929ebb1ec8028 74.103.127.57 8805 0
|
||||
f296f17abd4ccb3ad63a99468eb96060 82.232.173.22 8754 0
|
||||
f5932b7cee522a08ecb627d47f5b60f5 121.124.152.54 4104 0
|
||||
f66f25c51aa05ea462694b9055b70193 84.143.27.99 7665 0
|
||||
f7508519f31549d0018f363e58e4646c 125.224.193.111 10729 0
|
||||
f8aa2bd3d4b288fbc520ad0f121416d7 213.239.205.232 10755 0
|
||||
f8ca9f346d4ac702695dbddbf5b7f0bb 90.13.150.216 11403 0
|
||||
[other_stuff]
|
||||
blah blah
|
||||
blah
|
||||
[blacklisted_nodes]
|
Loading…
Add table
Add a link
Reference in a new issue