Creating set_proxy, which generates proxy urls

Making it a function reduces the amount of repetition.