Simple; you force ISPs to block any incoming connections to services/machines that don't have the proper governmental license. Any servers that allow two client nodes to communicate freely (like a proxy, or VPN) won't get a license.
To prevent smartasses from using servers in countries without these restrictions, you further force ISPs to prevent any large amounts of data from being uploaded to those countries (cumulative, to avoid tricks like uploading small parts to many servers). E.g. back in the early 00s, some of our ISPs used to have different traffic caps for national vs international connections, here in Portugal.
It's not that hard if you're willing to go the full mile.