Open Source for Open Society is a software performance art experiment to explore the idea of depriving a closed society of tech that was built in an open society.
What does it do?
Any software that includes OSOS code will not start in China, to the extent that detecting the location easily is possible.
Societies that rely heavily on silencing and censorship are fundamentally incompatible with societies that grow from open sharing of knowledge and information. Open source software is the global tech frontier in this regard, and so making open source software that essentially "dies" within a closed society is intended as a commentary on how we must always stand against censorship to survive.
But what about <my definition of a closed society>?
This is an art experiment, not a serious piece of software, and is not required to be functionally complete in order to make its point. I chose China because it is an "easy target" so to speak in this regard.
How do I use it?
You can contribute in two ways: 1) implement the OSOS code for your preferred your language, or 2) open a pull-request against a favorite open source project that includes OSOS code.
Or you can head over to the Issues and discuss why this is or is not a good idea, and other further implications.
How do I implement the code for my language?
See the initial Python module. The only obfuscated portion is the embedded base64 data, which is simply packed, 4-byte, big-endian, integer pairs representing start and end ip address ranges.
The code is very simple. Upon import, or as part of module initialization, OSOS code determines its WAN IP address. Using this address, we check against known China IP blocks, from https://lite.ip2location.com/china-ip-address-ranges. If the WAN IP is in one of those ranges, the module should print a message and exit, otherwise continue as normal.
Finding your WAN IP address can be done a few different ways of varying complexity, but the most straightforward way is to reach out to the internet to a site that will tell you where you are connecting from. That means that machines that do not have outside internet access cannot determine their WAN IP, so we pass through without exiting. We are currently checking icanhazip.com for the public IP. The ideal situation would be to get the ip from github.com because blocking requests to Github in order to fool the OSOS code only further isolates the entity executing the code from the broader open source community.