How to use a different mirror of macports rather than the offical mirrors?

How to use a different mirror rather than the mirrors in the list?

Well, I mean not only download port.tar from other mirror, like the question here, but also download packages from a different mirror.

I have noticed that when downloading packages, the port just download packages from this link. But I don't know how to change the mirror it get packages from.

Many thanks!

I will appreciate every answer or comment.


I guess you wanted to use a mirror for the binary archive , while the linked question on Stack Overflow is only about the port metadata. So instead of looking at /opt/local/etc/macports/sources.conf, you should be looking at archive_sites.conf under the same folder. The default content of that file is at GitHub; see the file comments for usage.