Commit Graph
326 Commits
Author SHA1 Message Date
Maxim Cournoyer ccec6c2f67 replace usleep with nanosleep
* src/compat/msvc/unistd.h (usleep): Delete.
* tools/dhtcnode.c (main) <usleep>: Replace with nanosleep on non
Windows platform, or Sleep on Windows.

Fixes: #607
2025-07-20 22:25:28 -04:00
Andrey Vukolov 69f23e49c4 Preparing for rebase and merge #750
Addresses:
        - https://github.com/savoirfairelinux/opendht/pull/750#discussion_r2157723135
        - https://github.com/savoirfairelinux/opendht/pull/750#discussion_r2157794234
        - https://github.com/savoirfairelinux/opendht/pull/750#discussion_r2157795386
        - https://github.com/savoirfairelinux/opendht/pull/750#discussion_r2161542551
        - https://github.com/savoirfairelinux/opendht/pull/750#discussion_r2161546768
2025-06-24 18:06:52 +02:00
Andrey Vukolov 9e9e364048 C tools CFLAGS workaround for STATIC builds 2025-06-19 11:59:50 +02:00
Andrey Vukolov 526b11f973 C binding fixes, libreadline support for MSVC 2025-06-18 15:30:51 +02:00
Andrey Vukolov a22c84d013 MSVC static runtime fix 2025-06-18 11:41:52 +02:00
Andrey Vukolov 3707f6294e libreadline fix for C tools 2025-06-18 11:29:26 +02:00
Andrey Vukolov 94cb17ef63 libreadline fix, WINVER typo fix 2025-06-18 11:22:55 +02:00
Andrey Vukolov 9bb08fa194 Merge branch 'master' into winbuild 2025-06-18 10:40:02 +02:00
Adrien Béraud 550721e233 build/cmake: use global MSVC_RUNTIME_LIBRARY 2025-06-17 20:22:22 -04:00
Andrey Vukolov a05479e2dc Merge branch 'master' into winbuild
- Built and tested on MSVC for static and dynamic builds, tested.
2025-06-17 18:59:51 +02:00
Adrien Béraud f49dabaadc build/cmake: add MSVC_RUNTIME_LIBRARY for dhtcnode 2025-06-14 14:03:21 -04:00
Adrien Béraud 2e38ec093d tools/dhtscanner: use client mode 2025-06-14 14:03:21 -04:00
Adrien Béraud 7995c2283d Workaround for MSVC runtime mismatch on STATIC builds 2025-06-12 20:04:13 -04:00
Adrien Béraud 80d0648d6d tools/dhtnode: use utf-8 for console output on Windows 2025-06-12 19:14:56 -04:00
Andrey Vukolov e5cc48c068 Merge branch 'master' into msvc-runtime-static 2025-06-12 16:35:29 +02:00
Adrien Béraud 9a895d71d9 tools/dhtscanner: cleanup 2025-06-12 10:32:20 -04:00
Adrien Béraud d3e2fd1099 fixes for msvc 2025-06-12 10:32:20 -04:00
Adrien Béraud 6b0e154bd5 build/cmake: add vcpkg support for msvc 2025-06-12 10:32:20 -04:00
Andrey Vukolov 11bca9e307 Workaround for MSVC runtime mismatch on STATIC builds
- Added CMP0091 policy handler
	- Added generator expression for MSVC_RUNTIME_LIBRARY property
	  to avoid "Runtime Mismatch" linker error on MSVC STATIC builds
2025-06-12 09:36:53 +02:00
Andrey Vukolov 8ab6b5b06e Fixes for current MSVC build, presets deleted 2025-06-12 09:22:30 +02:00
Adrien Béraud 48254a6759 build/cmake: add opendht_EXPORTS as public definition 2025-06-07 16:23:59 -04:00
Andrey Vukolov 68dc6a64be Definitions fix for #756 2025-05-30 23:05:59 -04:00
Andrey Vukolov 54a8fef0ee Windows build fixed for tools (wingetopt, signals)
- Addresses https://github.com/savoirfairelinux/opendht/pull/750#discussion_r2089286643
    - Structures wingetopt and win32 compatibility files for builds on Windows with MSVC
    - Adjusts opendht_EXPORTS definition when building tools on MSVC
2025-05-30 23:05:59 -04:00
Adrien Béraud c4e75ae66c update copyright year 2025-05-22 19:07:32 -04:00
Adrien Beraud b9e00c7a0f tools/cnode: show value ID when put completes 2025-02-11 15:48:59 -05:00
Adrien Béraud 81bd05fe84 proxy node: remove jquery, update for new APIs 2024-11-20 11:40:12 -05:00
Adrien Béraud cf135d18b4 c node: fix typo 2024-11-20 11:40:12 -05:00
Adrien Béraud c7ba7f6703 utils: use fmt::format for time 2024-11-20 11:40:12 -05:00
Adrien Béraud c8b5611386 dhtnode: fix small typo in put encrypted log 2024-03-24 15:45:55 -04:00
Adrien Béraud 23d07dae38 rng: drop custom random_device implementation for MinGW/Windows
MinGW now has std::random_device support on Windows:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85494
2023-12-10 15:18:59 -05:00
Adrien Béraud b53af75a7f meson, autotools: link with fmt 2023-08-30 17:58:45 -04:00
Adrien Béraud 21fd58a39c tools: show log on PublicAddressChanged 2023-08-30 17:58:45 -04:00
Adrien Béraud b034a823a9 dhtcnode: reduce exposed stack storage 2023-08-19 18:48:53 -04:00
Lanius-collaris 825cf98bf4 dhtnode.cpp: fix void print_usage()
Print pushserver parameter instead of openpush
2023-06-28 09:08:52 -04:00
Adrien Béraud fafd2f0233 update copyright year 2023-06-02 23:16:04 -04:00
Adrien Béraud e176e4baa6 logs: use fmt 2023-05-17 23:43:55 -04:00
Adrien Béraud 13bb50b863 CMake: handle missing SYSTEMD_UNIT_INSTALL_DIR 2023-04-21 18:32:49 -04:00
Adrien Béraud 9fbac2707d build/cmake: handle empty SYSTEMD_UNIT_FILE_LOCATION 2023-04-20 22:41:38 -04:00
Adrien Béraud 7cdd6948bf misc: use bootstrap.jami.net instead of ring.cx 2023-04-20 22:41:38 -04:00
Adrien Béraud 50996eaf7e build/cmake: unify static and shared build 2023-02-28 12:58:13 -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 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
Adrien Béraud 577f2a0645 proxy server: allow to configure address to bind 2022-07-05 19:32:29 -04:00
kkostiuk ead21d24a0 proxyserver: add application bundle id option 2022-07-04 18:17:12 -04:00
Adrien Béraud 37cfbffdca dhtcnode: cleanup 2022-06-22 22:20:15 -04:00
Adrien Béraud fca11e621c tools/dhtcnode: use version arg, cleanup 2022-04-22 21:10:53 -04:00
Adrien Béraud af8e66b813 tools/dhtnode: show basic storage stats on "ll" 2022-04-20 16:11:21 -04:00
Adrien Béraud 0df2fbe5de tools/dhtcnode: print version on startup 2022-04-20 16:09:24 -04:00
Adrien Béraud c39eceeddf tools/dhtcnode: include stdio.h before readline.h 2022-04-20 16:09:08 -04:00
Adrien Béraud e207e59226 tools/dhtcnode: count values in listen, add "ll" 2022-04-20 12:23:25 -04:00