https://www.aclu.org/know-your-rights/border-zone
KNOW YOUR RIGHTS
100 Mile Border Zone
The Fourth Amendment of the U.S. Constitution protects people from random and arbitrary stops and searches. Although the federal government claims the power to conduct certain kinds of warrantless stops within 100 miles of the U.S. border, important Fourth Amendment protections still apply. This helps you understand your rights within the 100-mile border zone.
Are immigration officials allowed to stop people in places wholly inside the U.S.?
U.S. Customs and Border Protection, the federal agency tasked with patrolling the U.S. border and areas that function like a border, claims a territorial reach much larger than you might imagine. A federal law says that, without a warrant, CBP can board vehicles and vessels and search for people without immigration documentation within a reasonable distance from any external boundary of the United States. These external boundaries include international land borders but also the entire U.S. coastline.
lots more