From 17846b33e256e4d3a899efa259bf23b4d4f3f32e Mon Sep 17 00:00:00 2001 From: quadrismegistus Date: Mon, 21 Sep 2020 10:52:09 +0100 Subject: [PATCH] readme --- README.md | 7 +- docs/www/{README.md => README-static.md} | 121 +++++++---- docs/www/build.py | 14 ++ docs/www/index.html | 245 +++++++++++++++++++++++ docs/www/theme.html | 34 ++++ komrade/cli/cli.py | 2 +- 6 files changed, 384 insertions(+), 39 deletions(-) rename docs/www/{README.md => README-static.md} (52%) create mode 100755 docs/www/build.py create mode 100644 docs/www/index.html create mode 100644 docs/www/theme.html diff --git a/README.md b/README.md index c260104..121b4f8 100644 --- a/README.md +++ b/README.md @@ -178,7 +178,8 @@ Plain old object-oriented code in Python. The root entity is a "Keymaker": anyon We are using [Themis](https://github.com/cossacklabs/themis), a high-level cross-platform cryptography library, for all cryptographic functions, rather than handling any primitives ourselves. Code is primarily in: -* [komrade/backend/keymaker.py](komrade/backend/keymaker.py) -* [komrade/backend/komrades.py](komrade/backend/komrades.py) -* [komrade/backend/phonelines.py](komrade/backend/phonelines.py) + + * [komrade/backend/keymaker.py](komrade/backend/keymaker.py) + * [komrade/backend/komrades.py](komrade/backend/komrades.py) + * [komrade/backend/phonelines.py](komrade/backend/phonelines.py) diff --git a/docs/www/README.md b/docs/www/README-static.md similarity index 52% rename from docs/www/README.md rename to docs/www/README-static.md index a08b109..3e22d7a 100644 --- a/docs/www/README.md +++ b/docs/www/README-static.md @@ -93,39 +93,90 @@ ``` @Tor: Hiding your IP by hopping it around the globe: +--> Balashikha, Russia (Aramis70)____ _ __________ _ +--> Kuala Lumpur, Malaysia (PressF)__ __ _ _______________ __ +--> Frankfurt am Main, Germany (Unnamed) ___ __ ______________________ +--> Berlin, Germany (niftyentry74)__ ______ ___ _______________________ +--> Düsseldorf, Germany (grobosolforte) _______ _______ _______________________ +______________________ ___ ___ _ ___ __ ________________________________ +____________________ _ __ ___ _____________________________________ +__________________ __ __ ____ ___________________________________ _ + __ ______________ ____ _ ___ _______________________________ __ + ____________________ _ _ ________@__________________________ _ + ___________________ ___@@+______+_________________________ + _______________ __ ______++_____+________________________ + _______________ _______++ ___+______________________ _ + ______________ ___ _____++__ +____________________ + ____________ ___ _ _____++ _+_______________ _ + ___________ ____ ____++_+_______________ __ + __________ _________________+++______________ + _ ___ __ ______________________++____________ + ___ ______________ ____ ++_ ___ + __ ________________ _ +++ ____ _ + _____ ________________ _+ ++_ _ + _______ _ __________ + +@ _ + _________ _________ _ ___ + ____________ ______ _ _ ___ + ____________ _______ __ + __________ _______ _ __ _ + ________ ______ _ _________ + ______ _____ __________ + ______ _____ __________ + ____ _ _ _____ + ____ __ + __ _ + __ + __ + __ +``` + +## Exchange public keys + + + +## Post to all @komrades + +Posts are end-to-encrypted between the @Operator (server) and you: by request, messages to @komrades are decrypted by that account on the server, and then re-encrypted on the fly back to the requester. + +``` +############################################################ +from: @marxxx +to: @komrades +############################################################ + +Nature builds no machines, ... These are products of human +industry; ... organs of the human brain, created by the +human hand; the power of knowledge, objectified. The +development of [machinery] indicates to what degree ... +knowledge has become a direct force of production, and to +what degree, hence, the conditions of the process of social +life itself have come under the control of the general +intellect and been transformed in accordance with it. + + +############################################################ + +Type "r" to reply to this message, "d" to delete it, or hit +Enter to continue. +``` + +## Send end-to-end encrypted messages + +``` + +############################################################ +from: @marxbot +to: @marxxx +############################################################ + +Let's talk secretly about the coming revolution? + +############################################################ + +Type "r" to reply to this message, "d" to delete it, or hit +Enter to continue. + +@marxxx: + +``` ---> Haarlem, Netherlands (cGbu7BKzxg7hB2m)____ _ ____________ _ ---> Freiburg, Germany (Avalon2) __________ __ _ _________________ _ ___ ---> Olive Branch, United States (nonanet04)__ ___ __ ___________________________ ---> Berlin, Germany (niftyentry74) ________ _______ __ _ ____________________________ ---> Düsseldorf, Germany (grobosolforte)____ _________ _________ ____________________________ -___________________________ ___ ____ __ ____ ___ _______________________________________ - ________________________ __ ___ ____ _____________________________________________ -_______________________ __ __ ____ ___________________________________________ _ - __ _________________ _____ _ ___ ______________________________________ __ - _______________ ________ _ _ ___________________________________________ _ - _______________________ +++++_@@+@_________________________________________ - ___________________ __ +++++ +++++@___________________________________________ - __________________ +++++ ++++++ _____ ____ ___ ____________________________ _ - _________________ +++++++++++ __ __ _ ___ __ ___ _________________________ - _______________++++++++++ __ _ _ _________ _____________________ _ - _________@++++++++ _ ____ ____________________________ __ - ____________ __ ________________________________________ - _ ___ __ _____ _______________________________________ - ____ ____ _____________ _____ ____ ____ - __ _____ ______________ _ __ ____ _ - ______ ___ _________________ _ _ _ - ________ _ ____________ _ _ - __________ ___________ _ ____ - ______________ ________ _ _ ___ - ______________ _________ _ _ - ____________ _________ _ __ _ - __________ ________ __ ___________ - _______ _____ _____________ - _______ _____ ____________ - _____ _ _ ______ - _____ ___ - ___ _ - ___ - ___ -``` \ No newline at end of file diff --git a/docs/www/build.py b/docs/www/build.py new file mode 100755 index 0000000..f0bc262 --- /dev/null +++ b/docs/www/build.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python +import os +ROOT = os.path.dirname(__file__) +os.chdir(ROOT) +theme_fn=os.path.join(ROOT,'theme.html') +with open(theme_fn) as theme_f: theme=theme_f.read() + +os.system('pandoc ../../README.md > content.html') +with open('content.html') as content_f,open('index.html','w') as of: + content = content_f.read() #.replace('\n * ','\n
  • ') + content=content.replace('<','<').replace('>','>') + total = theme.replace('[[CONTENT]]',content) + of.write(total) +os.remove('content.html') diff --git a/docs/www/index.html b/docs/www/index.html new file mode 100644 index 0000000..a6a2513 --- /dev/null +++ b/docs/www/index.html @@ -0,0 +1,245 @@ + + + + + + + Ryan Heuser + + +
    +

    Komrade

    +

    Komrade is a socialist network. It seizes the means of digital production.

    +

    Why another social network?

    +

    Is a 'socialist network' possible? Although the internet began with anarchic design principles, it quickly consolidated into the hands of a few of the largest corporations in the world. It has effectively recreated the capitalist mode of production within itself: the means of content production (social media platforms) are privatized while the work of production (posting) remains socially distributed. Exploitation inheres in that relation, whether in the industrial factory or the digital platform, because the value you produce is taken from you, concentrated and privatized.

    +

    But a digital network can be redesigned. The technology behind these social media platforms is actually quite simple. We can easily build our own social network, one which is secure, insurveillable, and unmonetizable—one which would give people the security they need to communicate about whatever they want, including protesting against capital and the state..

    +

    Core principles

    +

    Confidential

    +

    All of your data are strongly encrypted end-to-end: only you and those you write to can decrypt and read it. To anyone without the right decryption 'key', the data is nonsense.

    +

    Untraceable

    +

    All network traffic is routed through Tor, a "deep web" of computers so dense even the FBI can't follow you through it. Komrade's "Operator" or central server is accessible only from Tor. It's impossible to tell who is sending what to whom, or even who is using the app at all.

    +

    Unmonetizable

    +

    What's untraceable is also unmonetizable: your data can't be harvested by technology companies and used for advertising algorithms. You're protected from both surveillance capitalism and the surveillance state.

    +

    Democratized

    +

    Group accounts or 'collectives', like @portland or @socialists, grow as existing members 'vouch for' new ones, forming webs of trust. Other komrades can see how many times a given person has been vouched for, both within a group and overall, but not who has vouched for them. In order to join a group, at least one member must vouch for you; this minimum (or 'quorum') may grow as the group grows.

    +

    (Semi-)decentralized

    +

    Data is deleted as soon as possible from Komrade. Komrade's "Operator" simply sorts and holds the mail temporarily: as soon as users log in to download their mail, the messages are deleted from the server and network forever.

    +

    Anti-profit

    +

    Not just non-profit, we're anti-profit.

    +

    Open-source

    +

    Information wants to be communist.

    +

    Social media features

    +

    We present a simplified set of social media features drawn from everything that's out there:

    +

    Profile

    +
      +
    • Curate a profile with photo and posts (e.g. Twitter)
    • +
    • Show profile to world (e.g. Twitter)
    • +
    • Show profile only to those you trust (e.g. Facebook)
    • +
    • Show profile only to your local area (e.g. Nextdoor)
    • +
    +

    Posting

    +
      +
    • Post up to 1 image and/or 1000 characters
    • +
    • Post to the entire world (e.g. Twitter) ✔
    • +
    • Post to those you trust (e.g. Facebook)
    • +
    • Post to your surrounding area by a distance radius (e.g. Nextdoor)
    • +
    • Anonymously up-vote or down-vote posts (e.g. Reddit)
    • +
    +

    Organizing

    +
      +
    • Host events and invite others (e.g. Facebook)
    • +
    • Host events like protests anonymously (new)
    • +
    • Anonymously pin on a map sites of danger, like police (e.g. Waze)
    • +
    +

    Messaging

    +
      +
    • Message securely with encrypted contents (e.g. Signal) ✔
    • +
    • Message with untraceable metadata via Tor (new) ✔
    • +
    +

    How is this different from...

    +

    Comparison table

    + ++++++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Other cool thingWhat is it?Kind of like...Decentralized?Anonymous?Confidential?Data persistence?Identity verification?Need invitation/server?What data can user find?
    KomradeSocial networkTwitterNo (central server on Tor)Yes (everything routed via Tor)Yes (100% E2EE)Minimal server (deleted ASAP)Yes (central public key repository)No (works like twitter)Mixed (global feed; hashtag search only)
    Secure ScuttlebuttSocial networkTwitter/FacebookFully (P2P)No (P2P reveals IP; friend networks public)Partly (private E2EE, public unencrypted)Distributed across friend networks?Yes? (federated key exchange?)Yes (need initial pub)Limited (search friends-of-friends' data)
    DiasporaSocial networkTwitterPartly (federated)No (unless via Tor Browser)No (unencrypted?)??Yes (need 'pod' server)
    MastodonSocial networkTwitterPartly (federated)No (unless via Tor Browser)No (unencrypted?)??Yes (need 'instance' server)
    MatrixGroup chatSlackPartly (federated)No?Yes? (100% E2EE)?Yes (?)Yes (invited channels only?)
    Briar MessengerMessengerWhatsAppFully (P2P)Yes? (Tor)Yes (100% E2EE)None (needs 24/7 listener)Partly (public keys traded IRL)Yes (need initial contact?)
    Cabal ChatChatroomsIRCFully (P2P)No (P2P reveals IP) 1Mostly (shared key, not E2EE)Distributed Hash TableNo (?)Not really (public chat is open)
    +

    Sources:

    +

    1. Cabal FAQ: What kind of security is involved with Cabal?

    +

    In words

    +
      +
    1. Secure Scuttlebutt? SSB is probably the most impressive alternative social network out there. It's truly P2P, not just federated like Diaspora or Mastodon, so the content you see is coming to you via your friends and their friends: you download it directly from them. It has a great user base...
    2. +
    +

    Progress

    +

    Animations from mobile/desktop app

    +

    As of the 23rd of August.

    +

    GIF animation

    +

    Animations from terminal app

    +

    Connecting through Tor

    +

    GIF animation of Tor connection

    +

    Register/Login

    +

    GIF animation of registering new user

    +

    "Meeting" (exchanging public keys)

    +

    GIF animation of meeting process

    +

    Messaging

    +

    GIF animation of messaging

    +

    Posting

    +

    GIF animation of posting

    +

    Usage

    +

    Install

    +

    In one line:

    +
    bash <(curl http://komrade.app/run)
    +

    (That's a shortcut to this auto-installer script.)

    +

    Using pyenv, it installs Komrade in a virtual environment with the correct version (3.7) of Python attached. It doesn't override your existing Python configurations.

    +

    Run

    +

    Install as above.

    +

    For the terminal client, run:

    +
    komrade-cli
    +

    For the mobile/desktop app, run:

    +
    komrade-app
    +

    Or to run the server or Operator (for development only):

    +
    komrade-op
    +

    Details

    +

    Frontend

    +

    Mobile/desktop

    +

    The mobile/desktop app is made with KivyMD, a variant of Kivy, a cross-platform app development framework in Python. Python is an easy and versatile progamming language to learn, which keeps the code accessible to as many people as possible. Code for the app is in komrade/app.

    +

    Terminal app

    +

    Vanilla Python. Code is in komrade/cli.

    +

    Backend

    +

    API

    +

    Plain old object-oriented code in Python. The root entity is a "Keymaker": anyone from @Telephone, to @Operator, to users, to groups, who has a public/private key pair. The database uses a simple file-based key-value store, written in Python (simplekv). Code is in komrade/backend.

    +

    Cryptography

    +

    We are using Themis, a high-level cross-platform cryptography library, for all cryptographic functions, rather than handling any primitives ourselves.

    +

    Code is primarily in: * komrade/backend/keymaker.py * komrade/backend/komrades.py * komrade/backend/phonelines.py

    + +
    + + + \ No newline at end of file diff --git a/docs/www/theme.html b/docs/www/theme.html new file mode 100644 index 0000000..48cbaa0 --- /dev/null +++ b/docs/www/theme.html @@ -0,0 +1,34 @@ + + + + + + + Ryan Heuser + + +
    + [[CONTENT]] +
    + + + \ No newline at end of file diff --git a/komrade/cli/cli.py b/komrade/cli/cli.py index c349f7d..e9de7be 100644 --- a/komrade/cli/cli.py +++ b/komrade/cli/cli.py @@ -397,7 +397,7 @@ class CLI(Logger): res = self.komrade.get_updates() #print(res.get('success')) if not res.get('success'): - self.stat(res.get('status')) + self.stat(res.get('status'),komrade_name='') return self.stat('@Telephone: Patching you through to the @Operator. One moment please...')