SOCKS.CONF(5)
โจ SOCKS.CONF(5) โจ
okay bestie, gather round ๐ this is the manual page for socks.conf, the socks client configuration file syntax โ and ngl it's the little file that decides where all your socksified traffic actually goes. lowkey iconic.
๐ NAME ๐
socks.conf โ socks client configuration file syntax
๐ DESCRIPTION ๐
so the config file for the socks client library is what lets you control logging and server selection. that's the whole vibe.
it's split into two parts, bestie:
- global settings
- routes
and you can comment out any line using the standard comment character #. yes queen, comment your life away ๐ซถ
๐ฆ FORMAT ๐ฆ
the global settings are just a keyword, then a colon, then the value. simple as that. โจ
debugโ set this field to1and boom, debugging is turned on ๐ฅlogoutputโ this value controls where the client library sends its logoutput. it can be eithersyslog,stdout,stderr, a filename, or a combination of those. the default is no logging. heads up though: the valuesyslogmay conflict with the program being socksified if that program also uses syslog ๐ญ so watch out for that.resolveprotocolโ the protocol used to resolve hostnames. valid values areudp,tcpandfake. the default isudp.route.badexpireโ how long the"bad"marking of a route should remain set before it is removed. default is300seconds.route.maxfailโ how many times a route can fail before it is marked as bad. default is1.timeout.connectโ the number of seconds the client will wait for a connect to the proxy server to complete. the default is0, which means the client should use the system's default. periodt.
๐ ROUTES ๐
the routes are specified with a route keyword. inside a pair of parenthesis ({}) a set of keywords control the behavior of the route. yes bestie, {} โ that's the parenthesis situation here, don't come for me.
each route can contain three address specifications: from, to and via. a route is selected for a connection based on the values within the route block. it's giving matchmaking but for packets ๐
when searching for a route to match the client's request, the library will look in this order, no skipping:
- first for a direct route
- then for a
socks_v4route - then a
socks_v5route - then a
httproute - and lastly for a
upnproute
depending on how the library is configured and what environment variables are set (peep the manual for socksify(1)), there may or may not be an automatic fallback to an auto-generated direct route if no other route is found. so like... sometimes it saves you, sometimes it doesn't ๐
the route block can contain the following:
๐ ADDRESSES ๐
each address field can consist of:
- a IP-address (and where meaningful, a netmask, separated from the IP-address by a
/sign) - a hostname
- a domainname (designated by the leading
.) - or an interfacename (where meaningful)
each address can be followed by a optional port specifier. slay.
fromโ the route is used only by requests coming from the address given as value.toโ the route is used only by requests going to the address given as value.viaโ address of the proxy server that should be used as a gateway for the connection, or the special valuedirectto indicate the connection should be direct rather than go via any proxy server.
in the case of upnp, the address can also be the name of the interface to use for discovering the upnp controlpoint, if the full url for the IGD is not yet known, or the special value broadcast to indicate the client should broadcast for an upnp-router on all available network interfaces. yes bestie, broadcast โ it's yelling into the void hoping a router answers ๐ฃ
portโ parameter tofrom,toandvia. accepts the keywordseq/=,ne/!=,ge/>=,le/<=,gt/>,lt/<followed by a number. a portrange can also be given as"port <start #> - <end #>", which will match all port numbers within the range<start #>and<end #>. math girlie hours ๐ง
๐ธ Options ๐ธ
clientcompatibilityโ enables certain options for compatibility with broken servers. valid values are:necgssapi, for compatibility with servers implementing gssapi the NEC socks way. (yes, "broken servers" is literally in the manual. we said what we said ๐)commandโ the server supports the given commands. valid commands arebind,bindreply,connect,udpassociateandudpreply. the default is all commands supported by the protocols set for the route.
can be used instead of, or to complement, protocol.
gssapi.enctypeโ which encryption to enforce for GSSAPI-authenticated communication. possible values areclear,integrity, orconfidentiality. the default is to try for confidentially, but accept whatever the server offers exceptclear, asclearis not part of the SOCKS GSSAPI standard. ๐ซgssapi.servicenameโ which servicename to use when involving GSSAPI. default is"rcmd".methodโ list of authentication methods the client supports and which to offer the server. currently supported values arenone,gssapi, andusername. the default is all supported methods.protocolโ the protocols the server supports. supported values aretcpandudp. the default is all supported protocols.proxyprotocolโ the proxy protocols the server supports. currently supported values aresocks_v4,socks_v5,http, andupnp. the default issocks_v4andsocks_v5.
โ ๏ธ note that if the socks server requires any form of authentication, you need to explicitly set this to socks_v5, as v4 does not support authentication. no cap, v4 simply cannot do it.
๐ EXAMPLES ๐
see the example directory in the distribution. (yes that's the whole section, they're keeping it mysterious ๐)
โญ ENVIRONMENT โญ
SOCKS_USERNAMEโ use the value ofSOCKS_USERNAMEas the username when doing username authentication.SOCKS_PASSWORDโ use the value ofSOCKS_PASSWORDas the password when doing username authentication.
๐ญ not recommended as other users on the system might be able to see your password. bestie please, do not do this.
SOCKS_AUTOADD_LANROUTESโ if this variable is set to"no", the client will not try to auto-add direct routes for all addresses on the LAN. the default is to add them.SOCKS_DISABLE_THREADLOCKโ if this variable is set, the client will not perform threadlocking. the default is for the client to attempt to figure out for itself whether the application to socksify needs threadlocking or not. main character energy: it just figures it out itself ๐
some additional environment variables are documented in socksify(1).
FILESโ/etc/socks.conf๐
๐ซถ AUTHORS ๐ซถ
for inferno Nettverk A/S:
- Michael Shuldman
- Karl-Andre' Skevik
๐ฅ SEE ALSO ๐ฅ
socksify(1), sockd(8), sockd.conf(5)
information about new releases and other related issues can be found on the Dante WWW home page: http://www.inet.no/dante/
๐ BUGS ๐
see the accompanying BUGS file. new ones should be reported to dante-bugs@inet.no. (they're collecting them like pokรฉmon cards, send yours in ๐ฎ)
and that's the whole page bestie!! this one is from the File Formats Manual, dated July 29 2013, and it's SOCKS.CONF(5) โ go forth and route responsibly โจ๐
๐ฆ where this page comes from
- alpine 3.24: dante-doc 1.4.4-r1 ยท BSD-3-Clause
- arch rolling: dante 1.4.4-2 ยท LicenseRef-Dante
- epel 10: dante 1.4.4-1.el10_0 ยท BSD-Inferno-Nettverk
- epel 9: dante 1.4.4-1.el9 ยท BSD-Inferno-Nettverk
- fedora 43: dante 1.4.4-8.fc43 ยท BSD-Inferno-Nettverk
- fedora 43: dante 1.4.4-8.fc43 ยท BSD-Inferno-Nettverk
- fedora 44: dante 1.4.4-10.fc44 ยท BSD-Inferno-Nettverk
- fedora 44: dante 1.4.4-10.fc44 ยท BSD-Inferno-Nettverk
- nixos 26.05: dante 1.4.4
- nixpkgs unstable: dante 1.4.4
- opensuse-leap 16.0: dante 1.4.3-bp160.1.12 ยท BSD-3-Clause
- opensuse-leap 16.0: dante 1.4.3-bp160.1.12 ยท BSD-3-Clause
- opensuse-leap 16.0: dante 1.4.3-bp160.1.12 ยท BSD-3-Clause
- opensuse-leap 16.0: dante 1.4.3-bp160.1.12 ยท BSD-3-Clause
- Copyright (c) 1997, 1998, 1999, 2000, 2001, 2003, 2005, 2008, 2009, 2010 2011, 2012, 2013
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms