# This is another working description of $ETC$\SOCKS.CFG file format,
# taked from IBM WTE distributive, (c) by IBM.
# --------------------------------------------------------------------------
#
#
#  socks.conf - SOCKS clients configuration file 
#
#  /etc/socks.conf 
#
#  DESCRIPTION 
#
#  All SOCKS client programs use this file to determine whether to use 
#  direct or proxy connetion to a given destination host, and to exert access 
#  control based on the destination host, the requested service (port number 
#  on the destination host). If this file is absent, SOCKS clients will only 
#  try direct connections, making them behave like their regular counterparts. 
#
#  Each line in the file may be up to 1024 characters long. Lines starting 
#  with a '#' are comments.  Non-comment lines must be of one of the three 
#  forms: 
#
#      deny   dstaddr dstmask [op dstport] 
#      direct dstaddr dstmask [op dstport] 
#      sockd @=serverlist dstaddr dstmask [op dstport] 
#
#  Spaces and tabs separate the fields. Fields enclosed in square brackets 
#  are optional. 
#
#  The dstaddr dstmask pair together specify the destination IP address or the 
#  rage of destination IP addresses. They are both given in the usual dotted 
#  form, e.g., 129.1.2.3. Bits in dstmask that are set to 0 indicate the bit 
#  positions whcih should be masked off (i.e., ignored) during comparison of 
#  dstaddr and the actual destination IP address. So specifying 255.255.255.255 
#  in dstmask demands an exact mathc with dstaddr, whereas 0.0.0.0 in dstmask 
#  causes an address match no matter what is specified for dstaddr.  
#  (NOTE: This is the same way netmasks are interpreted, but is the direct 
#  opposite of how the address masks are used in cisco router's access-lists.) 
#
#  The op field must be eq, neq, lt, gt, le, or ge, for the condition of 
#  equal, not equal, less than, greater than, less than or equal, and greater 
#  than or equal, respectively. The dstport filed can be either a port number, 
#  e.g. 23, or the equivalent service name as specified in the file 
#  /etc/services, e.g., telnet for port number 23. If this pair is omitted, 
#  the line applies to all services. 
#
#  The serverlist, which may only be used in a sockd line, consists of one or 
#  more SOCKS proxy SERVER, whcih the client program should try to use (in the 
#  indicated order) for establising a proxy connection. Only commas can be used 
#  as separator, no spaces or tabs are allowed in the list.  Domain names of 
#  the servers may be used in the list, though it is probably more prudent to 
#  specify IP addresses. If this field is omitted, the client program will 
#  attempt a direct connection. 
#
#  Example: 
#
#     sockd @=1.2.3.4 11.12.13.14 255.255.255.255 eq www 
#
#  To match the condition indicated in this line, a request must come from a 
#  local user whose destination IP address must be 11.12.13.14 exactly and the 
#  service requested must be www (port 79). In that case, connection to host 
#  11.12.13.14 should be done via a SOCKS proxy server on host 1.2.3.4. 
#
#  Every time a SOCKS client has to make a network connection, it checks the 
#  pending request against the contents of /etc/socks.conf, one line at a time. 
#  Once it finds a line with conditions that are matched by the request, the 
#  action specified on that line is taken. The remaining lines are skipped. So 
#  the order of the lines in the file is important; switch two lines and 
#  you may have entirely different results. If no matching line is found, 
#  the request is denied (a direct connection is attempted). 
#
#  The conection to address 127.0.0.1 or 0.0.0.0 is always done directly to 
#  localhost, so there is no need to specify either of them in the 
#  configuration file. 
#
#
#  More examples:
#
#   A file containing the following lines would connect directly to the
#   IP address '1.2.3.4'.  If that doesn't match, the server would try 
#   contacting socks servers crums and socks.blah.com (in that order) 
#   for requests for documents at '1.2.4.x'.  Otherwise, an attempt is
#   made to contact 1.2.5.1 for all other requests.  If none of these
#   lines match, a direct connection is attempted.
#
#    direct 1.2.3.4 255.255.255.255
#    sockd@=crums,socks.blah.com 1.2.4.* 255.255.255.0
#    sockd @=1.2.5.1 0.0.0.0 0.0.0.0
#
#
