Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions docs/gemstones/torsocks.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: torsocks - Route Traffic Via Tor/SOCKS5
author: Neel Chauhan
contributors: Steven Spencer
contributors: Steven Spencer, Ganna Zhyrnova
date: 2024-02-25
---

# `torsocks` Introduction

`torsocks` is a utility to reroute IP traffic from a command-line application over the [Tor](https://www.torproject.org/) network or alternatively a SOCKS5 server.
`torsocks` is a utility to reroute IP traffic from a command-line application over the [Tor](https://www.torproject.org/) network or a SOCKS5 server.

## Using `torsocks`

Expand All @@ -17,19 +17,19 @@ dnf -y install tor torsocks
systemctl enable --now tor
```

The common options of the `torsocks` command follow, and under normal circumstances, require nothing additional. The options come before the application to run (e.g., `curl`):
The common options of the `torsocks` command follow and, under normal circumstances, require nothing additional. The options come before the application runs (e.g., `curl`):

|Options|Description|
|---|---|
|--shell |Create a new shell with LD\_PRELOAD`|
|-u USER |Set the SOCKS5 username|
|-p PASS |Set the SOCKS5 password|
|-a ADDRESS |Set the SOCKS5 server address|
|-P PORT |Set the SOCKS5 server port|
|-i |Enable Tor isolation|
|--shell |Creates a new shell with LD\_PRELOAD`|
|-u USER |Sets the SOCKS5 username|
|-p PASS |Sets the SOCKS5 password|
|-a ADDRESS |Sets the SOCKS5 server address|
|-P PORT |Sets the SOCKS5 server port|
|-i |Enables Tor isolation|

A sample (redacted) output from the IP checker [icanhazip.com](https://icanhazip.com/) via `torsocks`:

![torsocks output](./images/torsocks.png)

Notice that the `torsocks` IP address is different from the direct `curl` IP address.
Notice that the `torsocks` IP address differs from the direct `curl` IP address.