feat(http_client): move to opendht's builtin HTTP proxy - #34
Merged
Merged
Conversation
sim590
self-requested a review
September 4, 2026 04:48
sim590
requested changes
Sep 7, 2026
sim590
reviewed
Sep 7, 2026
sim590
reviewed
Sep 29, 2026
sim590
requested changes
Sep 29, 2026
sim590
requested changes
Sep 29, 2026
sim590
requested changes
Sep 30, 2026
Owner
There was a problem hiding this comment.
You should also revert deb203d. I think you mixed up some change you meant to do in a preivous PR. Avoiding to run the DHT node when the proxy is available is a good thing. Unless you can show me that this has a negative impact on execution time?
jaja360
force-pushed
the
add_systemd_dht
branch
from
October 1, 2026 00:47
6c7334d to
3154767
Compare
The legacy bootstrap.ring.cx default still works. Changing it deserves its own PR and discussion.
Adds a --no-proxy flag and a no_proxy argument to Bin::get/paste so the proxy can be skipped explicitly. The unit tests now use it instead of overriding the user configuration to steer away from a configured proxy.
jaja360
force-pushed
the
add_systemd_dht
branch
from
October 1, 2026 00:57
dba6f3c to
82ad6d8
Compare
Owner
|
Merci pour ce bon travail. Et Vive le Québec libre! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to how
dpasteinteracts with OpenDHT, providing a more robust and efficient DHT proxy setup. The main changes include adding support for an optional persistent local OpenDHT proxy via a systemd user unit, updating documentation and configuration to reflect this, and refactoring HTTP client interactions to use a new JSON-based API with base64 encoding. Additionally, installation scripts are updated to install the new systemd unit.DHT Proxy Integration and Systemd Unit:
dpaste-dhtnode.servicesystemd user unit to run a persistent local OpenDHT proxy, and updated installation scripts (CMakeLists.txt,Makefile.am) to install this unit. [1] [2] [3] [4]README.mdanddoc/dpaste.1to describe how to enable and use the systemd DHT proxy, and clarified the configuration file'shostandportsettings. [1] [2]Configuration and Documentation Updates:
config/dpaste.confto clarify that thehostandportrefer to the OpenDHTDhtProxyServerendpoint.Codebase Changes for Proxy Support:
Binclass insrc/bin.cpp/src/bin.hto only start a local DHT node if the proxy is unavailable, avoiding unnecessary node startups. IntroducedensureNodeRunning()and anode_running_flag. [1] [2] [3] [4] [5]HTTP Client Refactoring:
HttpClientinsrc/http_client.cppto use a new JSON API for the proxy, including base64 encoding/decoding for data transmission, and improved error handling and compatibility with the proxy server. [1] [2] [3]These changes collectively improve performance, reliability, and usability for users who wish to run a persistent DHT proxy, and modernize the client-server communication protocol.