Skip to content
Disable OSS that runs in China
Branch: master
Clone or download
amoffat update readme
reference the github issues section, which i didn't imagine would have much discussion
Latest commit b4712d6 Oct 9, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
javascript first commit Oct 8, 2019
python first commit Oct 8, 2019
ruby first commit Oct 8, 2019
LICENSE first commit Oct 8, 2019 update readme Oct 9, 2019


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.

Languages supported

  • Python
  • Javascript
  • Java
  • Ruby


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.

Technical details

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 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 for the public IP. The ideal situation would be to get the ip from 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.

You can’t perform that action at this time.