Skip to content

Repository files navigation

NodePP Tor Client: Basic Onion Routing for NodePP

This project provides a fundamental Tor client implementation for the NodePP framework. Tor (The Onion Router) is a network that helps you defend against traffic analysis, a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security. This library aims to allow NodePP applications to route their network traffic through the Tor network for enhanced anonymity and privacy.

🔗: Go Anonymous: Fetching Data Over Tor with Nodepp

Dependencies & Cmake Integration

include(FetchContent)
FetchContent_Declare(
nodepp
GIT_REPOSITORY https://github.com/NodeppOfficial/nodepp
GIT_TAG origin/main
GIT_PROGRESS ON
)
FetchContent_MakeAvailable(nodepp)
FetchContent_Declare(
nodepp-torify
GIT_REPOSITORY https://github.com/NodeppOfficial/nodepp-torify
GIT_TAG origin/main
GIT_PROGRESS ON
)
FetchContent_MakeAvailable(nodepp-torify)
#[...]
target_link_libraries( #[...]
PUBLIC nodepp nodepp-torify #[...]
)

Key Features

  • Basic Tor Connection: Establishes a connection to the Tor network.
  • SOCKS5 Proxy Support: Implements a SOCKS5 proxy client to forward traffic through Tor.
  • Simple API: Offers a straightforward interface to connect and send data over Tor within NodePP.
  • Asynchronous Operations: Designed to integrate seamlessly with NodePP's asynchronous event loop.

Usage

#include<nodepp/nodepp.h>
#include<nodepp/url.h> #include<torify/http.h>usingnamespacenodepp;voidonMain() {
tor_fetch_t args;
args.timeout = 0; // Disable Fetch timeout
args.method = "GET";
args.proxy = "tcp://localhost:9050";
args.url = "http://check.torproject.org/";
args.headers = header_t({
{ "Host", url::hostname( args.url ) }
});
tor::http::fetch( args )
.then([]( http_t cli ){
stream::pipe( cli, fs::std_output() );
})
.fail([]( except_t err ){
console::log(err);
});
}

Build & Run

🪟: g++ -o main main.cpp -I ./include -lws2_32 ; ./main
🐧: g++ -o main main.cpp -I ./include ; ./main

License

Nodepp-torify is distributed under the MIT License. See the LICENSE file for more details.

About

simple Tor HTTP/s Client for NodePP

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages