Why don't you configure a wpad server? As long as users are in the same (dns) domain, the same wpad server is valid. A good wpad.dat script finds out what network the user is in and always points to the right proxy server.
Just enable the "Automatic Configuration" via GPO or via login script.