2 releases
0.1.2 | Feb 23, 2024 |
---|---|
0.1.0 | Feb 23, 2024 |
#12 in #anonymity
8KB
76 lines
Tor Proxy
Tor Proxy is a simple proxy server implemented in Rust, designed to act as a middleman between clients and the Tor network. It allows users to route their network traffic through the Tor network for increased privacy and anonymity.
Features
- Proxy Server: Acts as a TCP proxy server, accepting client connections and forwarding them to the Tor network.
- Routing Through Tor: Routes client traffic through the Tor network, providing anonymity and privacy.
- Simple Configuration: Easy-to-use configuration for specifying the target server address and port.
- Multi-threaded Handling: Handles multiple client connections concurrently using threads.
- Basic Error Handling: Provides basic error handling for network and I/O errors.
Usage
To use the Tor Proxy crate in your Rust project, add it as a dependency in your Cargo.toml
file:
[dependencies]
proxy_tor = "0.1.2"
- Then, in your Rust code, import and use the crate:
use proxy_tor::run_proxy_server;
fn main() {
// Run the proxy server with default configuration
run_proxy_server("127.0.0.1:8080", "your_target_server_address:port");
}
- Replace "your_target_server_address:port" with the address and port of the server you want to proxy requests to.
If you don't have a server to proxy requests to, you can still use the Tor proxy locally for testing purposes. You can specify a local address and port for testing and demonstration purposes:
use proxy_tor::run_proxy_server;
fn main() {
// Run the proxy server with default configuration
run_proxy_server("127.0.0.1:8080", "127.0.0.1:8000");
}
If you have an Amazon Virtual Private Server (VPS), you can use it as the target server for your Tor proxy:
use proxy_tor::run_proxy_server;
fn main() {
// Run the proxy server with default configuration
run_proxy_server("127.0.0.1:8080", "your_vps_address:port");
}