← 返回命令列表

Linux command

torsocks 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Run

torsocks [command]

Toggle

. torsocks [on|off]

Example

torsocks --shell

Check

torsocks show

Isolate

torsocks -i [curl https://check.torproject.org/api/ip]

Example

torsocks -a [ip_address] -P [port] [command]

说明

torsocks routes network traffic from applications through the Tor network by intercepting network calls and redirecting them through Tor's SOCKS proxy. By default, it connects to the Tor daemon running at 127.0.0.1:9050. The tool uses LD_PRELOAD to intercept network system calls, providing transparent Tor routing for applications that don't natively support SOCKS proxies.

参数

--shell
Spawn a new Tor-enabled shell
-i, --isolate
Isolate traffic through a different Tor circuit
-a, --address _IP_
Connect to Tor proxy at specified address
-P, --port _PORT_
Connect to Tor proxy on specified port
show
Check if current shell is Tor-enabled
on|off
Toggle Tor routing in current shell

FAQ

What is the torsocks command used for?

torsocks routes network traffic from applications through the Tor network by intercepting network calls and redirecting them through Tor's SOCKS proxy. By default, it connects to the Tor daemon running at 127.0.0.1:9050. The tool uses LD_PRELOAD to intercept network system calls, providing transparent Tor routing for applications that don't natively support SOCKS proxies.

How do I run a basic torsocks example?

Run `torsocks [command]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --shell do in torsocks?

Spawn a new Tor-enabled shell