index: don't mutate the `opts` object
index: use `proxy-agent` for "PROXY" and "SOCKS"