title: How do you specify a custom MacPorts distfiles mirror?
body: <p>We have an isolated network with a mirror of MacPorts. I am trying to get a machine to properly reference this mirror for the various needs of <code>port</code>, and I have managed to get it to use our mirror for the base image and the <code>packages</code> directory (ala <a href="https://stackoverflow.com/q/17545770/10619727">this post</a>), but some packages don't have pre-built images in the <code>packages</code> directory so it tries to fetch the corresponding source package from <code>distfiles</code>. However, I haven't found any way to make it automatically use our mirror of <code>distfiles</code>. If I manually sync individual packages from our mirror to the local cache directory, that works, but I'm trying to make this work automatically and avoid the tedious process of syncing individual packages as needed. I'd also like to avoid having to sync the whole distfiles mirror locally.</p>
  <p>I've tried to search for where the distfiles mirror list comes from to even try manually editing it, but I can't seem to find that, either.</p>
  <p>Is there a proper way to do this?</p>
  <p>If not, does anyone know what file I need to change to hack in our own URL?</p>