Contains mappings between network destinations and SOCKSv5 servers.
The /etc/socks5c.conf file contains basic mappings between network destinations (hosts or networks) and SOCKSv5 servers to use when accessing those destinations. This is an ASCII file that contains records for server mappings. Text following a pound character ('#') is ignored until the end of line. Each record appears on a single line and is the following format:
<destination>[/<prefixlength>] <server>[:<port>]
You must separate fields with whitespace. Records are separated by new-line characters. The fields and modifiers in a record have the following values:
If a name fragment destination is present in /etc/socks5c.conf, all target addresses is SOCKSv5 operations will be converted into hostnames for name comparison (in addition to numeric comparisons with numeric records). The resulting hostname is considered to match if the last characters in the hostname match the specified name fragment.
When using this configuration information to determine the address of the appropriate SOCKSv5 server for a target destination, the "best" match is used. The "best" match is defined as:
destination is numeric | Most bits in comparison (i.e. largest prefixlength) |
destination is a name fragment | Most characters in name fragment. |
When both name fragment and numeric addresses are present, all name fragment entries are "better" than numeric address entries.
Two implicit records:
0.0.0.0/0 NONE #All IPv4 destinations; no associated server.
::/0 NONE #All IPv6 destinations; no associated server.
are assumed as defaults for all destinations not specified in /etc/socks5c.conf.
Access Control: This file should grant read (r) access to all users and grant write (w) access only to the root user.
#Sample socks5c.conf file
9.0.0.0/8 NONE #Direct communication with all hosts in the 9 network. 129.35.0.0/16 sox1.austin.ibm.com ibm.com NONE #Direct communication will all hosts matching "ibm.com" (e.g. "aguila.austin.ibm.com")
The sock5tcp_connect subroutine, socks5tcp_bind subroutine, socks5tcp_accept subroutine, socks5udp_associate subroutine, socks5udp_sendto subroutine, socks5_getserv subroutine, connect subroutine.