Adrien Béraud
58bc772256
NodeExport: use SockAddr, move to separate header
2023-03-23 16:50:19 -04:00
Adrien Béraud
9e60a681f3
use ostringstream instead of stringstream where possible
2023-03-23 16:50:19 -04:00
Adrien Beraud
51525d144b
certificate: add public key cache
2023-03-15 20:44:29 -04:00
Adrien Béraud
4ce9292b28
proxy server: allow to ping push
2023-02-23 15:43:16 -05:00
Adrien Béraud
e6971c196b
dht: fix value edition, add unit test
2023-01-27 17:31:59 -05:00
Adrien Béraud
b1009a54e3
crypto: compare public keys with longId
2023-01-27 17:31:59 -05:00
Adrien Béraud
2cb57251a1
proxy client: protect resolver
2023-01-25 19:53:53 -05:00
Adrien Béraud
446da4b792
value: use move in where
2022-12-30 20:42:16 -05:00
Adrien Béraud
aa958b0f1d
value: inline filter
2022-12-30 20:42:14 -05:00
Adrien Béraud
58be07a8b0
infohash: add to_view()
2022-12-30 20:42:11 -05:00
Sébastien Blin
6e73a78a8b
unifiedpush: remove unifiedpush parameter
...
Because there is multiple unifiedpush endpoint (ntfy.sh is one),
we should not pass it as an option to dhtnode, but use the one
provided by the user in the token (from unified push library).
2022-12-30 20:36:49 -05:00
Sébastien Blin
d6a99d0edd
proxyclient: add possibility to set the platform
...
This allow android to change the platform to "unifiedpush".
2022-11-17 11:46:09 -05:00
Sébastien Blin
b9ccc968b2
proxyserver: add support for UnifiedPush standard
...
Make the proxy able to support the UnifiedPush platform, so that
applications using the proxy server can use any UnifiedPush provider.
Documentation: https://unifiedpush.org/
How to test:
+ Install a UnifiedPush provider on a device (e.g. https://ntfy.sh )
+ Run dhtnode with a proxyserver and --unifiedpush https://ntfy.sh
+ Subscribe to a random topic on ntfy (e.g. "dhtproxytest")
+ Subscribe to a hash on the DHT:
curl -X SUBSCRIBE http://my.dht.proxy:8000/key/foo \
-d '{"key":"dhtproxytest", "platform":"unifiedpush"}'
+ Send data on the subscribed hash
Note: the topic should be completely random.
2022-10-11 15:14:51 -04:00
Sébastien Blin
b800012c57
proxyserver: add topic to msgpack
2022-09-08 11:15:28 -04:00
Adrien Béraud
af7d88b057
crypto: allow to build all from std::string_view
2022-08-11 14:52:14 -04:00
Sébastien Blin
8b022d0022
Merge branch 'master' into fix/request_timeout
2022-08-11 13:49:44 -04:00
Sébastien Blin
5399dbdfbc
proxy_client: reconnect account if local ip changes
...
When switching between two network interfaces, local address will
change but not the public ip. This generally cause the client to
not correctly updates its candidates.
In this patch, we inject in the proxy client the local candidates
and use it to check if the network changed.
2022-08-11 12:32:44 -04:00
Sébastien Blin
0e3bca1dde
http: modify timeout behaviour
...
In the previous version, the timeout for the connection could be
set only after async_connect while the request is sending.
This means if async_connect is slow (it can happen as if there is
an ipv6 endpoint, it can try to resolve it during dozens of seconds
before falling back on ipv4).
In this patch, it moves the timeout callback in the request. This
callback will be set just before async_connect, to be sure that we
are using the callback while connecting.
2022-08-11 11:17:30 -04:00
Adrien Béraud
a992aa1f05
crypto: allow to build all from std::string_view
2022-07-28 17:11:25 -04:00
kkostiuk
0f8d891476
iOS: drop support for voip notifications
2022-07-25 15:26:57 -04:00
Adrien Béraud
9c5e5cd7b7
proxy server: export symbols for ProxyServerConfig
2022-07-17 14:41:02 -04:00
Adrien Béraud
577f2a0645
proxy server: allow to configure address to bind
2022-07-05 19:32:29 -04:00
Adrien Béraud
293662a710
proxyserver: cleanup, avoid ref-to-temporary
2022-07-05 12:16:41 -04:00
Adrien Béraud
437252bfcc
proxyserver: add bundleId at the end of ProxyServerConfig
2022-07-04 18:20:32 -04:00
kkostiuk
ead21d24a0
proxyserver: add application bundle id option
2022-07-04 18:17:12 -04:00
Adrien Béraud
633a03d76a
ios: support multiple notification types
...
- VOIP notifications for iOS < 14.5
- alert and background notifications for iOS >= 14.5
2022-06-30 15:44:16 -04:00
Adrien Béraud
12a52c78ac
x509: make PrivateKey::getPublicKey() thread-safe
2022-06-28 14:12:45 -04:00
Adrien Béraud
dc9a211fb0
crypto: protect Id caching with atomic_bool
2022-06-27 15:40:45 -04:00
Adrien Béraud
d49b394eae
crypto: cache public key id
2022-06-27 15:40:45 -04:00
Sébastien Blin
3f4235da69
infohash: fix alignment warning
2022-06-27 15:32:50 -04:00
Sébastien Blin
e259cb0847
infohash: remove optimization due to weird warnings
...
Current operator== creates a very weird warning about using an
uninitialized value (no warning without the reinterpret_cast).
2022-06-27 14:37:25 -04:00
Adrien Béraud
949cbb9fc7
sockaddr: allow to release ownership
2022-06-22 22:20:15 -04:00
Adrien Béraud
efad2ada89
dhtrunner: make getPublicAddress const
2022-06-22 22:20:15 -04:00
Adrien Béraud
baa2a5d21c
dhtrunner: remove support for running both dht and proxy client
...
If configured to run as a proxy client, no port will be bound and the local dht node
won't be instantiated.
2022-06-08 13:14:09 -04:00
Sébastien Blin
b3f9683018
securedht: avoid to update cache if not necessary
2022-06-08 13:07:06 -04:00
Adrien Béraud
5f743344e5
value: cleanup, move sign & encrypt to cpp
2022-05-25 11:04:46 -04:00
Adrien Béraud
41c9104b8a
value: add inline specifier to inline methods
2022-05-05 11:33:53 -04:00
Adrien Béraud
5a6b9db60c
securedht: move crypto ops to Value
2022-04-25 13:43:57 -04:00
Adrien Béraud
38a7234ae3
dht: increase max hashes to 1G
2022-04-22 21:01:36 -04:00
Adrien Béraud
db3a4e52b2
dht: add config max_store_keys
2022-04-22 20:24:59 -04:00
Adrien Béraud
9646eb9374
NodeInfo: add storage stats
2022-04-20 16:10:25 -04:00
Adrien Béraud
955af06e29
dht: add getStorageLimit
2022-04-20 15:56:14 -04:00
Adrien Béraud
4c5e26922c
net: increase max queue size
...
Queue is also time-bounded.
Allow for larger bursts of packets.
2022-04-18 17:24:27 -04:00
Adrien Béraud
724c3e431c
dht: notify listeners when value is removed because of limits
2022-04-18 17:19:32 -04:00
Adrien Béraud
92b08bbbc9
dht: pass value directly to storageChanged
2022-04-15 20:12:48 -04:00
Adrien Béraud
12b75a612c
misc: fix various clang-tidy warnings
2022-04-06 12:18:20 -04:00
Adrien Béraud
694c44bbec
value: use namespace std::literals
2022-03-29 14:54:59 -04:00
Adrien Béraud
f9b2285593
use string view literals where relevant
2022-03-29 14:47:01 -04:00
Adrien Béraud
ca5455302d
value: support std::string_view
2022-03-23 13:35:14 -04:00
Adrien Béraud
f206a8ac9e
infohash: support std::string_view
2022-03-23 13:15:37 -04:00