APPROX.CONF(5)

πŸ“¦
version 5.13 Β· 3 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸŽ€ APPROX.CONF(5) β€” the file formats manual page, but make it make sense πŸŽ€

okay bestie, gather round, because this is the glow-up of the approx.conf man page β€” it's the config file for the approx proxy server, and no cap, it's literally just a list of vibes (name/value pairs) that tells approx how to behave. it's from the File Formats Manual section of the manual, and we're gonna read it together like it's a group chat. πŸ’…


✨ NAME ✨

approx.conf β€” configuration file for approx proxy server


πŸ¦‹ SYNOPSIS πŸ¦‹

/etc/approx/approx.conf

πŸ’– DESCRIPTION πŸ’–

so every non-blank line in the config file is a little name/value duo, separated by white space. that's it. that's the whole format. name, value, slay. πŸ’…

comments start with a # character and just keep going to the end of the line β€” so you can yap your thoughts in there, the parser will not read them, it's giving "not my business, not my problem". πŸ™ˆ

now here's the tea: names that begin with the $ character are reserved for use as configuration parameters. and the following parameters are currently defined:

  • $cache β€” where the approx cache directory lives (default: /var/cache/approx). and bestie, listen: it and ALL of its subdirectories must be owned by the approx server (peep the $user and $group parameters below, they're the ones doing the owning). πŸ‘‘
  • $interval β€” the time in minutes after which a cached file is considered too old to hand over without first checking with the remote repository for a newer version (default: 60). like, it's not expired expired, it's just "let me text the repo first" energy. ⏰
  • $max_rate β€” the maximum download rate from remote repositories, in bytes per second (default: unlimited). and you can suffix the value with "K", "M", or "G" to mean kilobytes, megabytes, or gigabytes per second, respectively. cute little unit abbreviations, we love a shortcut. 🏎️
  • $max_redirects β€” the maximum number of HTTP redirections that will be followed when downloading a remote file (default: 5). so approx will chase the link five times max and then, respectfully, stop. πŸ”
  • $user, $group β€” the user and group that owns the files in the approx cache (default: approx). they're a package deal, one bullet, iconic. 🫢
  • $syslog β€” the syslog(3) facility to use when logging (default: daemon). πŸͺ΅
  • $pdiffs β€” whether to support IndexFile diffs (default: true). ✨
  • $offline β€” whether to deliver (possibly out-of-date) cached files when they cannot be downloaded from remote repositories (default: false). yes, "possibly out-of-date" is doing a lot of work in that sentence, that's on purpose, that's the tradeoff. πŸ’€
  • $max_wait β€” how many seconds an approx(8) process will wait for a concurrent download of a file to complete, before attempting to download the file itself (default: 10). sharing is caring but only for ten seconds apparently. ⏳
  • $curl_path β€” the path to the curl binary (default: /usr/bin/curl). πŸŒ€
  • $verbose β€” whether informational messages should be printed in the log (default: false). πŸ—£οΈ
  • $debug β€” whether debugging messages should be printed in the log (default: false). πŸ›

and the other name/value pairs? those are the main character ones β€” they map distribution names to remote repositories. for example:

debian          http://ftp.debian.org/debian
debian-security http://security.debian.org/debian-security

so you write the distro name, you write the URL, and approx knows exactly where to go get the goods. no cap. πŸ“


🌈 TCP PORT NUMBER 🌈

okay so plot twist: the port that approx(8) listens on is NOT specified in this file. it's specified in /etc/inetd.conf instead. the default value is 9999, for compatibility with apt-proxy(8), but you can change it by running this command:

dpkg-reconfigure approx
fr fr, don't go looking for a port setting in approx.conf, it's simply not there, bestie, it lives in /etc/inetd.conf. 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

approx(8), inetd(8)


πŸ’œ AUTHOR πŸ’œ

Eric Cooper <ecc@cmu.edu>


and that's the whole page, you ate it, periodt. this little number came from the File Formats Manual, dated Apr 2012, and it goes by APPROX.CONF(5) in the footer, which is a very demure, very mindful way of signing off. bye bestie, go configure something. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from