Make Macports work behind proxy

I ended up struggling for months to get Macports to work and tried every installation method in http://www.macports.org but nothing worked. After drudging through numerous forums I finally discovered that sudo command “sanitizes” the shell environment and gets rid of the environment variables concerning proxy settings because of which commands like sudo port -d selfupdate […]