162 Commits
Author SHA1 Message Date
Adrien Béraud 958cb250a3 dhtnode: show both IPv4, IPv6 bound ports 2019-04-23 12:13:53 -04:00
Adrien Béraud c2fdf6ae92 dhtnode: show grouped get results, improve duration display 2019-04-21 21:39:54 -04:00
Adrien Béraud 5257ac314f add API to retrieve version string 2019-04-14 00:19:01 -04:00
Adrien Béraud 96347d83e1 tools: add argument for peer discovery 2019-04-08 11:34:52 -04:00
Adrien Béraud 4401e47002 cleanup, fix clang-tidy warnings 2019-03-17 17:43:52 -04:00
Adrien Béraud f418b3651f update copyright date 2019-03-16 12:37:23 -04:00
Adrien Béraud 04850e1701 dht: add configuration to persist state 2019-03-10 16:39:16 -04:00
Adrien Béraud 55f6c847b8 build: use define flags for proxy 2019-02-19 18:43:14 -05:00
Sébastien Blin f54fcd768f proxyserver: add stats endpoint for monitoring 2018-08-10 15:03:09 -04:00
Adrien Béraud 1fe9f2fdb1 dhtnode: default-initialize dht config 2018-05-23 11:21:25 -04:00
Adrien Béraud 9f35acf559 dhtnode: continue cmd loop on connectivity change 2018-05-05 18:23:52 -04:00
Adrien Béraud 8b6dcb1cd5 dhtnode: allow to trigger connectivity change 2018-04-19 11:31:08 -04:00
Adrien Béraud 7c5145bca5 dhtnode: don't maintain storage 2018-04-10 16:01:14 -04:00
Sébastien Blin 5b71af3cec proxy: remove useless callback_id
callback_id was used for token problems which are not present anymore.
Now token is sufficient and we can remove callback_id.
2018-04-03 10:43:56 -04:00
Adrien Béraud 0edee443f5 cache: improve value expiration handling 2018-03-28 09:54:04 -04:00
Adrien Béraud 2f4acd26d6 dhtinterface: add listen() callback to signal expired values 2018-03-16 13:34:41 -04:00
Adrien Béraud 4261bd2c85 dhtinterface: remove resubscribe 2018-03-16 13:34:32 -04:00
Adrien Béraud 80b944d943 dhtnode: prevent crash in cancelListen 2018-03-14 23:39:35 -04:00
Adrien Béraud c9cbced0c8 build: make indexation optional 2018-02-27 21:48:49 -05:00
Adrien Béraud 2cf2112aec dhtnode: simplify macros 2018-02-27 21:33:48 -05:00
Sébastien Blin 22ef53acef dhtproxy: fix cancelListen with pushNotifications
Fill the body of the UNSUBSCRIBE method and fix dhtnode application
2018-02-26 15:25:48 -05:00
Sébastien Blin 63c9c607bd pushnotifications: fix build without push notifications, improve travis script 2018-02-26 13:27:06 -05:00
Adrien Béraud 2c0f4a897c dhtnode: fix cancelListen 2018-02-10 14:31:00 +01:00
Sébastien Requiem 962249ec75 Generates RSA pairs for dhtnode instead of EC cert
* dhtnode was generating twice an EC cert which rendered encryption
impossible since opendht lib is expecting an RSA public key to encrypt
the data for the destination.

* fix savoirfairelinux/opendht#235
2018-02-08 10:56:17 +01:00
Adrien Béraud c03ba57895 dhtnode: use explicit unique_ptr constructor 2018-02-07 17:40:59 +01:00
Adrien Béraud e274ffd83b headers: unify API across build options 2018-01-31 18:07:43 +01:00
Adrien Béraud 636eb1972d proxy client: improve robustness, switch behavior 2018-01-18 16:36:13 -05:00
Adrien Béraud 15e3696b88 proxy client: fix build when push notifications are disabled 2018-01-13 16:16:19 -05:00
Adrien Béraud ca693a6ac1 pushNotificationReceived: take a map<string, string>
JSON is used for the DHT proxy protocol and to communicate with gorush.
Push notifications services might use any format, not necessarily JSON.
Push values are received as a map<string, string>, so receive them in
that format.
2018-01-12 13:20:07 -05:00
Adrien Béraud 227cca883c dhtrunner: start proxy ASAP, use local dht for node stats/import/export 2018-01-11 14:24:59 -05:00
Adrien Béraud a0d8f4734a dhtproxy: allow token refresh, set clientID (#6)
* add method to set the push token independently from other configuration,
  since the push token can be updated during runtime.
* allow to provide a "clientID" to be sent in push notifications,
  used to demultiplex push notifications to multiple OpenDHT nodes running
  on the same host. For instance Ring uses the accountID as the clientID
  to know which account received the push notification.
* use {"platform":"android"/"ios"} to communicate the platform instead of {"isAndroid":true/false}.
2018-01-10 16:32:57 -05:00
Sébastien Blin 37a9a3d9da dhtproxy: inject push notifications in opendht
+ add the ability to inject push notifications in opendht to call
correct callbacks
+ if a timeout occurs and no cancelListen was called, relaunch the
listen operation
+ Pass devicekey to enable push notifications for DhtProxyClient
+ Update sockaddr to fix the build on all platforms

Note: update dhtnode
2017-12-12 15:03:02 -06:00
Sébastien Blin 75cca66d7e dhtproxy: support push notifications for mobile clients
+ Add SUBSCRIBE and UNSUBSCRIBE for DhtProxyServer
+ Add the ability to stop Listen via a timeout (and send a push
Notification for the client)
+ Add the ability to use gorush to send push notifications

Note: Update dhtnode
2017-12-12 10:24:54 -06:00
AmarOk d19ba2cb41 proxyserver: add lock_guard to avoid to manually unlock 2017-12-06 14:43:28 -06: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 607e5eeccf tools: use https url 2017-11-10 17:29:24 -05:00
Adrien Béraud 7d7410b472 dhtnode: allow to use arbitrary string as key
Key will be h(key).
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 38ad5b9ef2 add --proxyserver option for dhtnode 2017-11-06 16:49:46 -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 834d62e6e9 InfoHash: use bool operator where relevent 2017-11-01 16:28:17 -04:00
Sébastien Blin 61a148e83f update README.md 2017-11-01 14:52:29 -04:00
Sébastien Blin 8e43775394 update dhtnode + clean code 2017-11-01 14:52:29 -04:00
Sébastien Blin 1413d32ee6 add listen endpoint 2017-11-01 14:52:29 -04:00
Adrien Béraud eb9f314356 dhtnode: allow to perform and cancel persistent put 2017-10-30 13:12:16 -04:00
Adrien Béraud 6378840d33 dhtnode: allow to cancel a listen operation 2017-10-30 13:12:16 -04:00
Adrien Beraud bedb51bf52 crypto: add EC curve identity generation 2017-08-28 12:03:15 -04:00
Adrien Beraud 42fa09a6fa dhtnode: graceful signal handling in service and daemon modes 2017-06-29 10:20:31 +02:00
Adrien Beraud 673884a409 dhtnode: add service mode
Service mode is similar to the daemon mode but:
* doesn't fork
* logs to stdout/stderr by default
  instead of syslog
2017-06-29 09:57:55 +02:00