To a large extent, that is what borders are for. To keep out all crap from the un-free parts of the world that would subvert a free society.
You get searched there, even arbitrarily, you are effectively guilty until proven innocent at them, if you don't like it, just don't try to go past them and this was uncontroversial until recent history in the US, even when the founding fathers themselves were at the helm.
To a large extent, that is what borders are for. To keep out all crap from the un-free parts of the world that would subvert a free society.
You get searched there, even arbitrarily, you are effectively guilty until proven innocent at them, if you don't like it, just don't try to go past them and this was uncontroversial until recent history in the US, even when the founding fathers themselves were at the helm.