SYD-TOR(1)
π SYD-TOR(1) β SOCKS Proxy Forwarder β¨
okay bestie, welcome to the General Commands Manual page for syd-tor, and no cap this one is kind of a whole vibe. It's a SOCKS proxy forwarder, it's locked down like a vault, and it is not gonna hold your hand. Let's get into it π«Ά
πΈ NAME πΈ
syd-tor β SOCKS Proxy Forwarder. That's the whole name, that's the whole job. slay.
β¨ SYNOPSIS β¨
syd-tor [-dh] -i <socket-fd> [-o addr:port] [-u unix-sock]
That's it, that's the whole entry point. Iconic, honestly π
π¦ DESCRIPTION π¦
So here's the tea: syd-tor receives a listening socket from a file descriptor (that's the fd) and then forwards all the traffic to either addr:port or a UNIX socket.
The external address has to be either an IPv4 address, or an IPv6 address, or a path to a UNIX domain socket. If you don't say anything at all, it lowkey defaults to 127.0.0.1:9050. defaults are a love language fr fr π
π OPTIONS π
-hβ display help. that's it. that's the whole flag. ask and ye shall receive β¨-dβ run in debug mode without confinement. β οΈ this is permitted only if Syd is built with the trusted Cargo feature β otherwise, no dice, bestie.-i socket-fdβ the socket file descriptor to receive the listening socket from. this one's the whole point of the program ngl.-o ext-addrβ specify the external address to forward traffic to. the address can be an IPv4/IPv6 address in the formataddr:port. defaults to127.0.0.1:9050.-u unix-sockβ specify a UNIX domain socket to forward traffic to. π this option has precedence over-oβ when both show up to the party,-uis the main character.
π USAGE π
bestie listen, syd-tor(1) is not meant to be used as a standalone tool. like, at all. Syd itself invokes syd-tor(1) at startup when Proxy sandboxing is set to on with "sandbox/proxy:on". for the full lore, go read the PROXY SANDBOXING section in the syd(7) manual page. iykyk π
But say you do want to use syd-tor(1) in your own project β okay, entrepreneur, i see you. here's the ritual, in order:
- create a UNIX socket-pair
- enter a network namespace
- bring up the loopback device
bind(2)a socket to a port on it- send this socket file descriptor through the write end of the socket-pair with
sendmsg(2)and theSCM_RIGHTSoption - finally, pass the read end of the socket-pair to
syd-tor(1)with the-i <socket-fd>argument
six steps, no shortcuts, that's the whole choreography π
π IMPLEMENTATION π
syd-tor(1) is designed for performance, security, and privacy β the holy trinity, honestly. the details:
- it uses edge-triggered
epoll(7)for event notification and fully asynchronous operations, so it can handle multiple connections without blocking. no waiting in line, we're built different. - it transfers data with zero-copy
splice(2), moving bytes directly between file descriptors within the kernel without ever exposing plaintext in user space. the data doesn't even stop to say hi π - two pairs of pipes carry bidirectional traffic between the client and the external address.
- the execution environment is confined with
seccomp(2)andlandlock(7), restricting system calls and file access to the bare minimum required. minimalist queen. - compared to
socksns, which uses the Tokio runtime for asynchronous I/O,syd-tor(1)relies on kernel-level primitives for efficiency and confinement. different breed fr fr π₯
π‘οΈ SECURITY π‘οΈ
okay this section is long but it's so good. syd-tor(1) applies multiple confinement layers to mitigate risks associated with running outside the Syd sandbox, preventing potential Meddler-in-the-Middle (MITM) attacks against containers. yes, Meddler-in-the-Middle β that's the spelling in the original, we don't editorialize, we respect the source π
- Linux
capabilities(7)are dropped early, and the no-new-privs attribute is set, so no unwanted capability leaks into the process. - Resource limits
RLIMIT_CORE,RLIMIT_FSIZE,RLIMIT_NPROC,RLIMIT_LOCKS,RLIMIT_MEMLOCK, andRLIMIT_MSGQUEUEare all set to zero, to prevent core dumps and file/process/lock/msgqueue creation inside the main loop. zero, nada, none π« seccomp(2)filters are configured to allow only required syscalls.socket(2)is limited to a single domain, type, and protocol, whileconnect(2)is restricted to a single memory address β preventing unauthorized network connections. one address only, we don't wander.sigaction(2)andrt_sigaction(2)system calls are not permitted to install new signal handlers, andrt_sigreturn(2)isn't permitted either.pipe2(2),socket(2),connect(2),accept4(2), andshutdown(2)system calls are protected by syscall argument cookies determined randomly usinggetrandom(2)at startup. for the full cookie lore, refer to the Syscall Argument Cookies section of thesyd(7)manual page. πͺ- these restrictions require direct socket system calls. they are permitted without restrictions on architectures
x86,m68k,mips,mipsel,ppc,ppc64,ppc64le,s390,s390x,sheb, andsh, which multiplex sockets throughsocketcall(2). - on 64-bit Linux 6.10 and later, the memory area containing the external network address is sealed using
mseal(2)and the surrounding memory is protected with guard pages to prevent overflow or adjacent corruption. - executable memory is also disallowed to prevent code injection attacks.
- if available,
landlock(7)andnamespaces(7)impose further restrictions by disallowing all filesystem access, providing an extra layer of security. - the root directory is moved into
/proc/self/fdinfo, or/proc/self/fdif the external address is a UNIX socket, withpivot_root(2), and the old root is detached withMNT_DETACH, so no path to the host filesystem remains in the mount namespace.
together, these techniques ensure that even if syd-tor(1) is compromised, the scope of malicious actions is significantly limited, maintaining the overall integrity and security of the system. that's the whole point and she ate π
π± ENVIRONMENT π±
SYD_TOR_DEBUGβ run in debug mode without confinement, equivalent to the-doption. β οΈ this is ignored unless Syd is built with the trusted Cargo feature.
π CAVEATS π
real talk: the syd-tor(1) process runs as a single process, and it can potentially hit file descriptor (FD) limits due to the number of FDs it opens per connection. here's the math, bestie:
each client connection involves six FDs:
- one for the client socket
- one for the external socket
- four for pipes used for bidirectional data transfer (two pipes, with an input and output FD each)
to mitigate this, syd-tor(1) sets the file-max limit to the hard limit by overriding the soft limit at startup. but sometimes that's still not enough, and you'll have to manually adjust your FD limits. it's giving "we tried our best" π
π SEE ALSO π
syd homepage: https://sydbox.exherbo.org/ π
π AUTHORS π
Maintained by Ali Polatel. up-to-date sources can be found at https://gitlab.exherbo.org/sydbox/sydbox.git and on Radicle at rad:z38HCnbmcDegA2BMxuPaPRPMdp6wF. bugs/patches can be submitted to https://gitlab.exherbo.org/groups/sydbox/-/issues. discuss in #sydbox on Libera Chat or in #sydbox:mailstation.de on Matrix. come say hi, we don't bite π«Άπ¬
and that's the page!! this edition is dated 2026-09-01 and it's the SYD-TOR(1) page, straight from the General Commands Manual. go forth and forward those SOCKS, bestie β safely, sandboxed, and absolutely slaying. πβ¨ππ¦
π¦ where this page comes from
- arch rolling: syd 3.59.0-1 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms