Distributed convex optimization with proximal methods