proxy: support setting hostname via env variable