The proxy supports the following three use cases
These settings can be done by creating a configuration file which can be pointed by setting either
config.dev.toml or setting
ATHENS_FILTER_FILE as an environment variable.
Every line of the configuration can start either with a
+denoting that the module has to be included by the proxy
Ddenoting that the module has to be fetched directly from an upstream proxy and not stored locally
-denoting that the module is excluded and will not be fetched into the proxy or from the upstream proxy
It allows for
# to add comments and new lines are skipped. Anything else would result in an error
# This is a comment - github.com/azure + github.com/azure/azure-sdk-for-go # get golang tools directly D golang.org/x/tools
In the above example,
golang.org/x/tools is fetched directly from the upstream proxy. All the modules from from
github.com/azure are excluded except
The list of modules can grow quickly in size and sometimes may want to specify configuration for a handful of modules. In this case, they can set a default mode for all the modules and add specific rules to certain modules that they want to apply to. The default rule is specified at the beginning of the file. It can be an either
An example default mode is
D - github.com/manugupt1/athens + github.com/gomods/athens
In the above example, all the modules are fetched directly from the source.
github.com/manugupt1/athens is excluded and
github.com/gomods/athens is stored in the proxy storage.