The tl;dr is that there were laws, like vagrancy (i.e. not having a job), that were vague and applied to "everybody" but realistically only applied to black people through legal jiu jitsu and selective blindness on the part of police. Sundown towns are known as such for that behavior. They were (are) very unwelcoming if you're not white.
Black people who are passing through have to leave by sundown. There's still some small towns in the US with this expectation, although it's no longer written on signs.
A town in the USA that the excluded non-white people from the community...coming from signs that warned non-whites saying "don't let the sun set on you in whatever city".