Changing the location of the approx cache

  Use the $cache parameter in /etc/approx.conf. Make sure the
  specified location exists and is owned by the approx user and group.
  Use a subdirectory for the cache, not a top-level filesystem with a
  lost+found directory in it, to avoid complaints from the approx-gc
  program.

Changing the temporary directory used by approx

  The TMPDIR environment variable can be used to specify the temporary
  directory used by approx. Please see the section on
  "Passing environment variables to approx", below.

Using approx with xinetd

  An example configuration file is provided in
  /usr/share/doc/approx/examples/approx.xinetd

Exporting a local package repository

  This is supported with file URLs. Note that the syntax for file URLs
  requires 3 leading slashes (two for the URL syntax, and one for
  the root of the pathname). So you can add something like this
  to /etc/approx/approx.conf:

      local   file:///my/local/repo

  The repo must have the structure that apt expects, including a
  Packages.bz2 index. You can maintain a local repo with a tool like
  dpkg-scanpackages or reprepro.

Changing the TCP port on which approx listens

  Modify the "ListenStream" line in approx.socket file.

Changing the IP addresses on which approx listens

  Modify the "ListenStream" line in approx.socket file (see systemd.socket(5)
  manual page for more information).

Controlling access to approx using TCP wrappers (hosts.allow and hosts.deny)

  The /etc/hosts.allow and /etc/hosts.deny files can be used for
  host-based control of the approx service.

  After adding the appropriate entries (see the hosts_access(5) manual page),
  add the line
      OPTIONS="-l"
  to the file /etc/default/openbsd-inetd and then restart openbsd-inetd.

Making approx use a proxy for its downloads

  Since approx uses the curl(1) command to download files from
  remote repositories, you can use the http_proxy environment variable
  (or one of the others documented in the curl(1) manual page).
  Please see the section on "Passing environment variables to approx", below.

Handling high client load

  The openbsd-inetd version of inetd limits the rate of requests by default.
  See the inetd(8) man page for ways to change the limit.

Passing environment variables to approx

  The openbsd-inetd version of inetd passes only certain environment
  variables to servers. Here are some workarounds:

  1. Modify the inetd.conf entry for approx to run an executable wrapper
     script instead of the /usr/sbin/approx binary. You can use something
     like this for the wrapper:

         #!/bin/sh
         export MY_ENVIRONMENT_VARIABLE=...
         exec /usr/sbin/approx

  2. Modify the inetd.conf entry for approx to run the "/usr/bin/env" command,
     with the desired environment variable settings and "/usr/sbin/approx"
     as arguments.

Passing options to the curl(1) command used by approx

  Use the above method to pass the CURL_HOME environment variable to approx,
  and use the file $CURL_HOME/.curlrc to specify the desired curl options.

  For example, adding the line "--ipv4" to this file will force curl to
  resolve hostnames to IPv4 addresses only.
