[PATCH] 80%-finished code to support http and ssh in package downloads