#!/bin/sh
whoami > /tmp/whoami
id > /tmp/id

tee /tmp/in | /usr/lib/apt/methods/http "$@" | tee /tmp/out