Caravan protection

How does caravan protection automatically pass through ships?