Adrien Beraud
134b37861d
proxy client: fix leak in sendListen
2024-11-19 16:58:08 -05:00
Adrien Beraud
078e0a0c3e
search: combine callbacks in case of multiple equivalent puts
2024-11-19 16:58:08 -05:00
Adrien Beraud
3f27cd7069
proxy client: resubscribe on token change
2024-11-18 11:07:55 -05:00
Adrien Beraud
b222efe638
proxy client: pass push parameters to constructor
2024-11-18 11:07:55 -05:00
François-Simon Fauteux-Chapleau
df189e3e12
dht_proxy_server: add push notification statistics
2024-11-05 15:13:39 -05:00
Adrien Beraud
1aeb596b04
crypto: fix warning
2024-11-04 16:39:35 -05:00
Adrien Beraud
950194f68e
proxy client: allow to configure user agent for proxy
2024-11-04 16:34:02 -05:00
AmnaSnene
5dc3d3cfd7
Raise an error if any Identity file fails to save
2024-11-04 12:08:34 -05:00
François-Simon Fauteux-Chapleau
5397f80b87
value: preserve priority when encrypting
...
All encrypted values put on the DHT currently have the default priority
of 0 because the priority information is ignored by the Value::encrypt
function.
2024-10-22 15:22:43 -04:00
François-Simon Fauteux-Chapleau
792b851d77
dht_proxy_server: fix Android push notifications
...
This commit updates the format of the push notification requests sent by
the DHT proxy server to conform to FCM's HTTP v1 API. (The previously
used API was deprecated in 2023, see:
https://firebase.google.com/docs/cloud-messaging/migrate-v1 )
The "priority" and "ttl" (time to live) options are specific to Android
and therefore need to be put in the "android" block, as documented here:
https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages
2024-09-19 12:48:36 -04:00
Adrien Béraud
9da832c1d1
http: use appropriate string format syntax
2024-08-11 11:44:47 -04:00
liufei
44f6d21c83
DecryptError cause by low level error
2024-07-23 11:37:26 -04:00
AmnaSnene
38454eaf6e
peer discovery: add a timer to schedule connectivityChanged with a maximum interval of one minute
2024-07-16 14:25:01 -04:00
Matthew Webb
76a2bd234a
Get off of deprecated GCM AES methods
...
Multiple compiler warnings note that the gcm_aes_* family of functions are deprecated. They have been replaced with gcm_aes<key_length>_*. This change uses the correct set of functions based on the given key size. Resolves #571 .
Sample compiler warning:
/home/noviv/opendht/src/crypto.cpp: In function ‘dht::Blob dht::crypto::aesEncrypt(const uint8_t*, size_t, const dht::Blob&)’: /home/noviv/opendht/src/crypto.cpp:97:20: warning: ‘void nettle_gcm_aes_set_key(gcm_aes_ctx*, size_t, const uint8_t*)’ is deprecated [-Wdeprecated-declarations]
97 | gcm_aes_set_key(&aes, key.size(), key.data());
| ^
In file included from /home/noviv/opendht/src/crypto.cpp:27:
/usr/include/nettle/gcm.h:276:1: note: declared here
276 | gcm_aes_set_key(struct gcm_aes_ctx *ctx,
| ^~~~~~~~~~~~~~~)
https://github.com/gnutls/nettle/commit/6a19845e6f71791ca98765d490ec08e776494bee marked the functions as deprecated.
2024-07-11 10:07:05 -04:00
AmnaSnene
3e2fd5e8fa
peer discovery: address requested changes
2024-06-25 13:27:35 -04:00
AmnaSnene
8b3f7f2480
peer discovery: re-publish and re-discover immediately when a node disconnects, instead of on the connectivityChanged signal.
2024-06-25 13:27:35 -04:00
AmnaSnene
57c855e1cb
peer discovery: post reDiscover() and publish() to the ioContext when connectivity changes.
2024-06-25 13:27:35 -04:00
Lanius-collaris
251f66dfce
fix getif_workaround_android.h
...
char may be signed
2024-06-10 08:21:57 -04:00
Lucas Dias
9eea01202a
make crypto error messages more readable
...
Add verifications to gnutls calls and throw expcetion
with readable messages.
For example, if call loadIdentity and crt file has name
different of private key exception message was
Can't get certificate public key ID: ASN1 parser: Value was not found.
However, the real problem is that crt file was not found.
Now, for the same problem the exception message will be:
Error while reading file.
Signed-off-by: Lucas Dias <lucas_dias@redes.ufsm.br >
2024-06-09 15:46:34 -03:00
Adrien Beraud
cd92eeaae5
dht: add support to behave as a client node
2024-06-07 09:52:01 -04:00
Adrien Beraud
9dad7c69fd
peer discovery: cleanup
2024-06-07 09:31:48 -04:00
Lanius-collaris
5cc5b98aeb
fix android workaround
2024-06-07 09:21:05 -04:00
Lanius-collaris
c03ce419ca
peer_discovery: add a workaround for Android hotspot
2024-06-07 09:21:05 -04:00
Adrien Béraud
5a2a20a32f
http: migrate from http-parser to llhttp
2024-05-31 06:58:09 -04:00
Lanius-collaris
318d02c55a
update http, dht_proxy_client
...
http: simplify Connection::async_connect()
dht_proxy_client: add listenKeepIdle setting
2024-05-25 23:57:52 -04:00
Lanius-collaris
a69da52f89
update http.h, http.cpp
2024-05-25 23:57:52 -04:00
Lanius-collaris
ac0ea6ac57
proxy client: decrease the frequency of keepalive for listen op
2024-05-25 23:57:52 -04:00
Lanius-collaris
88d65a55a7
http: allow to modify keepalive option
2024-05-25 23:57:52 -04:00
Lanius-collaris
dffe7d91ee
return to 386943de
2024-05-25 23:57:52 -04:00
Lanius-collaris
da638b3ae6
cleanup
2024-05-25 23:57:52 -04:00
Lanius-collaris
379568ae0d
Update http.cpp
2024-05-25 23:57:52 -04:00
Lanius-collaris
24adfbf2c4
Adjust TCP keepalive options for listen op
2024-05-25 23:57:52 -04:00
François-Simon Fauteux-Chapleau
89179cad4f
network_utils: use poll instead of select
...
select is limited to file descriptor numbers below FD_SETSIZE (1024),
and calling FD_SET with a higher value can cause a buffer overflow. This
can be problematic for applications using OpenDHT as a library.
2024-05-22 11:57:38 -04:00
François-Simon Fauteux-Chapleau
f2cee8e9ce
thread pool: add function to detach threads
2024-04-23 14:02:32 -04:00
Adrien Beraud
59c8d9b9be
op cache: return cache result in onValue
2024-04-06 18:24:16 -04:00
Adrien Beraud
7f70fcd316
proxy client: cancel http request on listen cancel
2024-04-06 18:24:16 -04:00
Andreas Traczyk
c0a1356049
dht_proxy_server: use lambda instead of std::bind for listen callback
...
Avoids issues compiling with MSC.
Also move PushSessionContext definition outside the OPENDHT_PUSH_NOTIFICATIONS condition.
2024-04-04 14:20:01 -04:00
Andreas Traczyk
b40d604ef7
provide value IDs for push notifications
2024-04-02 17:34:16 -04:00
Adrien Béraud
acde8fa6ec
crypto: remove legacy decrypt
2024-03-24 18:12:27 -04:00
Adrien Béraud
f7e4533282
crypto: always zero-initialize gnutls_datum_t
2024-03-24 15:45:52 -04:00
Adrien Beraud
5abbef547b
use new log format
2024-03-22 13:49:44 -04:00
Adrien Beraud
3c27b2c777
dhtrunner: avoid blocking when stopping
...
A deadlock was possible when if shutdown operation occured when the dht was in "connecting" state.
2024-03-22 13:49:44 -04:00
Adrien Beraud
903eba6a31
proxy client: cancel resolver on stop
2024-03-22 13:49:44 -04:00
Adrien Beraud
a37e42af37
Request: cancel resolver on cancel
2024-03-22 13:49:44 -04:00
Adrien Beraud
cc6cce6157
http: allow to cancel resolver
2024-03-22 13:49:44 -04:00
Adrien Béraud
7ca39b4a20
http: use OCSP_check_validity to check OCSP validity
2024-03-17 15:56:48 -04:00
Lanius-collaris
f9b46168d0
dht_proxy_server: Allow user to specify non-standard ports in UnifiedPush endpoint
2024-01-17 15:54:04 -05:00
Adrien Béraud
b03df3f7a6
aesEncrypt: allow to provide salt
2024-01-02 15:18:44 -05:00
Adrien Béraud
372c87ac12
build: remove rng.cpp
2023-12-11 21:18:15 -05:00
Adrien Béraud
08d6367fdc
pht: move to std::random_device
2023-12-10 16:02:56 -05:00