Add offline mode support

This is needed for the proxy to work