add autoproxy configuration script

see script comments