Adrien Béraud
9bd959332a
WIP storage rate limiting
2016-12-09 02:42:06 -05:00
Guillaume Roguez
d6e86ebcc9
remove InfoHash::toCString()
...
Implementation of InfoHash::toCString() is broken
2016-12-06 18:28:14 -05:00
Adrien Béraud
197aaa47f0
crypto: prevent duplicate CRLs, reimport after signing
2016-12-06 16:59:54 -05:00
Adrien Béraud
ad234004aa
crypto: store CRLs in a set
2016-12-05 15:43:00 -05:00
Adrien Béraud
a88e6a4c5f
crypto: make CRL default expiration same as certificate
2016-12-02 12:59:03 -05:00
Adrien Béraud
c776dad96f
crypto: add Certificate::getExpiration()
2016-12-02 12:58:10 -05:00
Adrien Béraud
31fedd529b
crypto: add CRL msgpack serialization
2016-12-01 18:42:26 -05:00
Adrien Béraud
e9adff9dc5
crypto: add CRL move operator, export as DER
2016-11-30 17:30:09 -05:00
Adrien Béraud
bfd58a204b
crypto: add CRL import/export methods
2016-11-30 16:31:29 -05:00
Adrien Béraud
867bcf1514
crypto: add EC key generation
2016-11-29 18:04:25 -05:00
Adrien Béraud
fb882ee440
crypto: add revocation list
2016-11-29 18:03:49 -05:00
Adrien Béraud
f73f5e2798
log: cosmetics
2016-11-29 01:27:42 -05:00
Istvan
e7db64bd74
Log functions are moved to log.cpp
...
Log functions are moved to the log.cpp
in order to avoid multiple definitions
of the logger functions.
2016-11-29 00:50:47 -05:00
Adrien Béraud
8a5de47aa0
hide symbols by default ( #140 )
2016-11-23 18:27:24 -05:00
Adrien Béraud
7f84c1e397
utils: remove useless definitions
2016-11-23 15:12:37 -05:00
Guillaume Roguez
297c37e609
infohash: add helper to C string format conversion
...
This const void* convertion method helps a lot with programs
that need to print the hash with a printf() like function.
2016-11-08 15:26:13 -05:00
Simon Désaulniers
9bb1ab43eb
net.h: moved to include/opendht/
2016-11-08 14:52:09 -05:00
Simon Désaulniers
ab7d1d6582
dht,net: introduce socket, support multiple listen
...
Since the initial implementation of listen operation, multiple listen requests
from a single node on a same hash was not possible without singular
inconsistencies. The flaw was coming from the fact that nodes receiving listen
request could not differentiate between listen refresh request and a new
independent listen request.
This patch introduces the new net::Socket structure which in time will enable
remote nodes to send update for a storage while differentiating between
concurrent listen requests. A socket has a unique identifier which consists of a
transaction id as defined in the OpenDHT protocol.
2016-11-07 06:44:15 -05:00
Simon Désaulniers
77ea6d8c2f
net: create net namespace, moving relevant structs
2016-11-05 19:29:00 -04:00
Adrien Béraud
b2529c241e
log: flush on new line
2016-11-01 03:13:56 -04:00
Adrien Béraud
83c47037d2
dht: remove unimplemented declaration
2016-11-01 03:13:56 -04:00
Adrien Béraud
125b6f9236
dht: make storage maintenance optional, default disabled
2016-10-31 14:43:56 -04:00
Adrien Béraud
e260ba6b78
infohash: remove misused restrict
2016-10-31 12:35:50 -04:00
Adrien Béraud
c3d3da20f6
Merge pull request #146 from sim590/permanent-put-enhancement
...
dht: make reannounce margin bigger, safer
2016-10-28 16:24:07 -04:00
Simon Désaulniers
9404a4d069
dht: make reannounce margin bigger, safer
...
Reannouncing margin going from 5 seconds to 10 seconds.
2016-10-28 15:24:09 -04:00
Adrien Béraud
274621dcec
dht: add searches(sa_family)
2016-10-27 18:12:05 -04:00
Adrien Béraud
2ab756906d
dht: getSearchLog for a specific search
2016-10-27 16:51:21 -04:00
Adrien Béraud
2b3f63443f
dht: maintain each storage independently
...
Schedule every storage maintenance independently,
to improve performance when there are a lot of storages.
2016-10-27 14:21:52 -04:00
Simon Désaulniers
7ee6281426
log: display time before each line in log
2016-10-25 16:40:48 -04:00
Adrien Béraud
e3663c995a
log: add storage filter
2016-10-24 02:09:38 -04:00
Adrien Béraud
1d62b3ca64
log: add InfoHash filter
...
* filter log entries with new method setLogFilter
* filter by node id, search or infohash
* add optional parameter to 'log' in dhtnode
2016-10-24 02:09:38 -04:00
Adrien Béraud
70b1ebae0b
dht: fix scheduler job edition on clang
2016-10-21 17:44:39 -04:00
Adrien Béraud
d4bd17a2dc
dhtrunner: use a second condition variable for bootstrap
2016-10-19 13:34:33 -04:00
Simon Désaulniers
6743cbbf50
dht: introduce "refresh" operation
...
This operation requests a node to refresh a value's time_point information of
its lifetime begining. This is intended to fix the *permanent put* operation
which has been having syncing issues since the introduction of an enhanced and
lighter put operation.
2016-10-17 11:56:54 -04:00
Adrien Béraud
f233340cb2
node: clear reply_time on reset
2016-10-16 22:36:36 -04:00
Adrien Béraud
cfb817d37f
dht: add buckets() utility
2016-10-16 22:36:30 -04:00
Adrien Béraud
9440c03048
dht: log cleanup
2016-10-16 22:36:24 -04:00
Adrien Béraud
7af856508e
dht: make connectivityChanged family dependent
2016-10-15 19:13:15 -04:00
Adrien Béraud
7c5e8c3234
sockaddr: add missing include for Win32
2016-10-12 14:38:39 -04:00
Adrien Béraud
9f11930f3d
fix compilation on latest clang
2016-10-11 16:34:40 -04:00
Adrien Béraud
013b1dfe2e
Merge pull request #138 from sim590/connectivity-changes-detect
...
search: detect connectivity changes
2016-10-11 16:01:59 -04:00
Simon Désaulniers
733f699ff2
search: detect connectivity changes
...
The number of bad nodes is limited in order to help determine presence of
connectivity changes. See https://github.com/savoirfairelinux/opendht/issues/137
for details.
According to the tables, 25 is a good average value for big networks. If the
network is small, normal search expiration process will handle the situation.
2016-10-11 15:54:37 -04:00
Adrien Béraud
a366d502a2
fix compilation on latest clang
2016-10-11 15:50:49 -04:00
Adrien Béraud
eed8ffc792
Merge pull request #139 from savoirfairelinux/recover-from-network-changes
...
dhtrunner: recover from network changes
2016-10-11 11:57:31 -04:00
Adrien Béraud
64118404fe
dhtrunner: recover from network changes
...
Using a list of bootstrap nodes, we recover from network loss by pinging those
nodes continuously until connected.
Written with Simon Désaulniers.
2016-10-10 01:51:26 -04:00
Simon Désaulniers
bb74dc846c
dht/dhtrunner: enable callback for pingNode
2016-10-10 00:23:53 -04:00
Adrien Béraud
659d893dee
network: transmit large values in multiple packets
2016-10-09 16:22:33 -04:00
Simon Désaulniers
87cf6faedd
dht/node: don't allow more than 3 auth errors
2016-09-23 19:27:59 -04:00
Simon Désaulniers
ca6aa6706d
dht/value: make 'find_node' queries satisfied by any queries
...
'find_node' requests don't ask for values. Then, the idea of a Query makes less
sense, but since we still need those to map status to network engine requests,
we introduce dummy queries which with the field Query::none. Those queries will
then only serve as key to network engine's requests.
2016-09-23 19:27:58 -04:00
Adrien Béraud
ccd0cbd8f2
add per IP rate limiting ( #131 )
2016-09-21 15:44:20 -04:00