megatools: fixing the network part

It requires some env vars to work