Sync script for two way syncing with proxy-only support