AmarOk
d19ba2cb41
proxyserver: add lock_guard to avoid to manually unlock
2017-12-06 14:43:28 -06:00
AmarOk
29ffbf6aa7
dhtrunner: remove DhtRunner::getAddrInfo
...
Was replaced by SockAddr::resolve
2017-12-05 10:02:38 -06:00
Adrien Béraud
aaa577d9e3
proxy_client: use atomic bool for shared state flags ( #3 )
2017-12-05 09:50:38 -06:00
AmarOk
b1a9742889
dhtproxyclient: add lock_guards for mutex and clean code
2017-12-04 09:42:37 -06:00
Adrien Béraud
d2f91af946
node: use shared_ptr to manage Sockets
2017-12-02 16:03:27 +01:00
Sébastien Blin
e7d8bc4275
proxyclient: erase finished operation threads
2017-11-29 14:44:02 -05:00
atraczyk
6cdcd183b4
InfoHash: fix stream operator<< declaration
2017-11-29 11:08:39 -05:00
Sébastien Blin
eb750f5b7f
proxy_client: execute callbacks in main thread
2017-11-27 17:51:33 -05:00
Sébastien Blin
5967c89c23
proxy: don't reinit dhtproxy multiple times and forward encrypted messages
...
+ Having a null dht_proxy_client can lead to using nullptr.
+ securedht should forward messages if we are using a proxy.
+ Protect callback segfault
2017-11-22 16:09:45 -05:00
Sébastien Blin
4a83b36dcf
tools: add the ability to use a proxy for dhtchat
2017-11-21 13:37:18 -05:00
Sébastien Blin
eb1f9d64e1
dhtproxyclient: add listen ability.
...
+ Fix LISTEN endpoint for DhtProxyServer
= DhtProxyServer use multiple worker threads
+ Add listen/cancelListen for DhtProxyClient
+ Add connectivityChanged.
2017-11-20 16:01:44 -05:00
Sébastien Blin
cb72c104fd
proxy: implement basic DhtProxyClient with the ability to get and put.
...
+ Add an abstract class to describe the Dht
+ Now, we can modify the Dht linked to a SecureDht. So we can choose
between the classic Dht and the Dht using a proxy.
+ Implement a basic client which can Get and Put values on the Dht using
the proxy.
Note: Update dhtnode to have the ability to use the DhtProxyClient.
Todo: Implement Listen, ping, connectivityChanged for the client.
2017-11-20 15:45:29 -05:00
Adrien Béraud
5115fab9e6
dht: increase max searches limit
2017-11-16 16:49:59 +01:00
Adrien Béraud
747f86f8f4
dhtrunner: use SockAddr::resolve
2017-11-10 17:59:05 -05:00
Adrien Béraud
9948079c97
SockAddr: add resolve()
2017-11-10 17:48:36 -05:00
Adrien Béraud
b549055034
DhtRunner: use SockAddr
2017-11-08 15:12:43 -05:00
Adrien Béraud
4430b1e616
Merge pull request #217 from AmarOk1412/dhtproxy
...
Communicate with OpenDHT through a REST API
2017-11-08 14:35:31 -05:00
Sébastien Blin
e2c534df5a
add std::bind, fix put, avoid overflow on base64
2017-11-08 14:33:07 -05:00
Sébastien Blin
2ca2835c9b
add options method handler
2017-11-08 12:14:44 -05:00
Sébastien Blin
bbe922dd7d
remove headers, fix HTTP status, fix get /
2017-11-07 16:08:55 -05:00
Sébastien Blin
67ba435ba6
base64: take the old implementation from ring-daemon
2017-11-06 16:24:00 -05:00
Sébastien Blin
6413571301
clean code
2017-11-06 12:53:35 -05:00
Adrien Beraud
0dccae68e6
InfoHash: make false in case of parsing error
2017-11-03 16:03:11 -04:00
Adrien Beraud
92320cef59
InfoHash: throw in case of invalid input string
2017-11-03 14:03:34 -04:00
Adrien Beraud
bf4e838e20
InfoHash: return stream in operator>>
2017-11-03 14:00:49 -04:00
Adrien Beraud
e9eb97ea9a
InfoHash: improve hex parsing performance
2017-11-02 17:42:45 -04:00
Adrien Beraud
0e865976f9
InfoHash: unify with Hash<N>
2017-11-02 14:28:09 -04:00
Adrien Beraud
87dc080bbf
crypto: add raw hash function
2017-11-02 14:25:46 -04:00
Adrien Beraud
834d62e6e9
InfoHash: use bool operator where relevent
2017-11-01 16:28:17 -04:00
Sébastien Blin
8e43775394
update dhtnode + clean code
2017-11-01 14:52:29 -04:00
Sébastien Blin
8344138bc8
add optional + clean start/stop
2017-11-01 14:52:29 -04:00
Sébastien Blin
dc66b3847a
make code for DHT Proxy Server optionnal
2017-11-01 14:52:29 -04:00
Sébastien Blin
7ddd6629e3
add getFiltered
2017-11-01 14:52:29 -04:00
Sébastien Blin
20abc3e495
add LISTEN endpoint
2017-11-01 14:52:29 -04:00
Sébastien Blin
c4ba8670e4
add Putxxx value endpoints
2017-11-01 14:52:29 -04:00
Sébastien Blin
a3348c85d6
value to JSON and begin to clean endpoints
2017-11-01 14:52:29 -04:00
Sébastien Blin
1413d32ee6
add listen endpoint
2017-11-01 14:52:29 -04:00
Sébastien Blin
58fdfa9452
add get hash endpoint
2017-11-01 14:51:36 -04:00
Sébastien Blin
6f641073ae
proxy put and putEncrypted
2017-11-01 14:51:36 -04:00
Sébastien Blin
32153b11ab
proxy putSigned
2017-11-01 14:51:36 -04:00
Sébastien Blin
e33ac02351
test restbed
2017-11-01 14:51:36 -04:00
Adrien Beraud
dc99919338
InfoHash: add explicit operator bool()
2017-11-01 11:59:11 -04:00
Adrien Béraud
41ebbe21d4
node cache: expire nodes on destructions
...
Expiring nodes on cache destruction allow to cancel
any remaining request before the dht instance is destructed,
since Node instances might remain alive after the dht instance
is destroyed.
2017-10-30 13:12:16 -04:00
Adrien Béraud
63366722a9
dht: reduce verbosity of storage log
2017-10-21 18:01:32 +02:00
Sébastien Blin
fe09146609
rate_limiter: typo fix, 'Perdiod'->'Period'
2017-10-20 14:51:35 -04:00
Adrien Béraud
476fbb1160
network: use full 32-bits of transaction IDs
...
We used to use the first 16 bits for the message type.
2017-10-20 17:42:28 +02:00
Adrien Béraud
376486e64f
node: use full range of socket IDs
2017-10-17 15:25:09 +02:00
Adrien Béraud
9d4e6e0984
rate limiter: use deterministic maintenance
...
Using deterministic maintenance sets an upper bound
to the size of the address map.
2017-10-15 01:18:32 +02:00
Adrien Béraud
7df375fc75
NodeCache: fix invalid pointer access
2017-10-13 15:40:09 +02:00
Adrien Béraud
1a54aff7bc
storage policies: use SockAddr
...
API-breaking change to use const SockAddr& instead of sockaddr*.
2017-10-13 01:10:09 +02:00