diff --git a/include/opendht/dhtrunner.h b/include/opendht/dhtrunner.h
index a7fa51b9e9b1f2a2f4cd08745e5544697dbde675..7bb6158c79f275812d423dd9b37e1ebdf75b339e 100644
--- a/include/opendht/dhtrunner.h
+++ b/include/opendht/dhtrunner.h
@@ -424,6 +424,8 @@ public:
      */
     void join();
 
+    PeerDiscovery* getPeerDiscovery() { return peerDiscovery_.get(); };
+
     void setProxyServer(const std::string& proxy, const std::string& pushNodeId = "");
 
     /**