At some point I saw a design for a machine you could park at the Lagrange point between Mars and the Sun that would collect solar power and spit out a magnetic field strong enough to deflect enough of the solar winds that we wouldn't need to worry about that.