xmpp-site/defaults.py

503 lines
18 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

XMPP_DOMAIN = "localhost"
SUPPORT_ADDRESS = "help@localhost"
SERVICE_NAME = "Good Service"
CLAIM = "Us Be Good."
API_BASE_URL = 'http://localhost:5280/register_api'
BOSH_URL = 'http://localhost:5280/http-bind'
OS_INFO = {
'android': {
'title': "Android",
'installer_recommend': 'f-droid',
'client_recommend': 'conversations',
},
'ios': {
'title': "iOS",
'installer_recommend': 'ios_appstore',
'client_recommend': 'siskin',
},
'windows': {
'title': "Windows",
'installer_recommend': 'manual',
'client_recommend': 'gajim',
},
'macos': {
'title': "MacOS",
'installer_recommend': 'homebrew',
'client_recommend': 'beagle',
},
'linux': {
'title': "Linux",
'installer_recommend': 'pkg',
'client_recommend': 'dino',
},
'freebsd': {
'title': "FreeBSD",
'installer_recommend': 'pkg',
'client_recommend': 'dino',
},
'openbsd': {
'title': "OpenBSD",
'installer_recommend': 'pkg',
'client_recommend': 'dino',
},
'netbsd': {
'title': "NetBSD",
'installer_recommend': 'pkg',
'client_recommend': 'dino',
},
}
INSTALLER_INFO = {
# keyed by os names (OS_INFO.keys)
# subdicts keys:
# * title: yes
# * guide: a guide on installing this installer (such meta)
# * guide_package: a guide on installing packages (i.e. an XMPP client) with this installer
'android': {
'playstore': {
'title': "Play Store",
'url_support': True,
'magic_support': True,
'pkgname_support': False,
'step_install': {
'gratis': 'Tap <em>Install</em>',
'paid': 'Tap the price tag and deal with the payment bullshit',
},
'guide_magic': """
<ol>
<li><a href="{client.url_magic}" class="button" target="_blank" rel="noreferrer">Tap here</a> to open the <em>{client.name}</em> page in the Play Store</li>
<li>{installer.step_install}</li>
<li>After installing, <em>{client.name}</em> will start and handle the registration</li>
</ol>
""",
'guide_package': """
<ol>
<li><a href="{client.url_install}" target="_blank" rel="noreferrer">Tap here</a> to open the <em>{client.name}</em> page in the Play Store</li>
<li>{installer.step_install}</li>
<li>{register}</li>
</ol>
""",
},
'f-droid': {
'title': "F-Droid",
'url_support': False,
'magic_support': False,
'pkgname_support': False,
'guide': """
<details>
<summary>Android 8 and later</summary>
<ol>
<li>Download the current <a href="https://f-droid.org/F-Droid.apk" target="_blank" rel="noreferrer">F-Droid.apk</a></li>
<li>Tap on it, allow installation and follow instructions.</li>
</ol>
</details>
<details>
<summary>Older Android versions</summary>
<ol>
<li>
<span>Enable <em>developer mode</em></span>
<ol>
<li>Open the <em>Settings</em> app</li>
<li>Select <em>About phone</em> at the very bottom</li>
<li>Scroll down to <em>Build number</em> and tap it 7 times (until a notification bubble indicates success)</li>
</ol>
</li>
<li>
<span>Enable <em>Unknown Sources</em></span>
<ol>
<li>Open the <em>Settings</em> app</li>
<li>Select <em>Security</em></li>
<li>Tap <em>Unknown Sources</em> so it is activated</li>
</ol>
</li>
<li>Download the current <a href="https://f-droid.org/F-Droid.apk" target="_blank" rel="noreferrer">F-Droid.apk</a></li>
<li>Tap on the downloaded .apk file and follow installation instructions</li>
</ol>
</details>""",
'guide_package': """
<p>Install <a href="https://f-droid.org/" target="_blank" rel="noreferrer">F-Droid</a>,
if you didn't already:
{installer.guide}</p>
<p>Install <em>{client.name}</em>
<ol>
<li>Open <em>F-Droid</em></li>
<li>Search for <em>{client.name}</em></li>
<li>Tap the search result with the right name</li>
<li>Tap <em>Install</em></li>
<li>Tap <em>Install</em> again in the following dialogue</li>
<li>{register}</li>
</ol>
</p>"""
},
},
'ios': {
'ios_appstore': {
'title': "iOS App Store",
'url_support': True,
'magic_support': False,
'pkgname_support': False,
'step_install': {
'gratis': 'Tap on <em>Get</em>',
'paid': 'Tap on the price tag and deal with the payment bullshit',
},
'guide_package': """
<ol>
<li><a href="{client.url_install}" target="_blank" rel="noreferrer">Tap here</a> and on any "Open App Store"-popup you might get to open the <em>{client.name}</em> page in the App Store</li>
<li>{installer.step_install}</li>
<li>{register}</li>
</ol>
""",
},
},
'windows': {
'manual': {
'title': "Manual Installation",
'url_support': True,
'magic_support': False,
'pkgname_support': False,
'guide_package': """
<ol>
<li><a href="{client.url_install}" target="_blank" rel="noreferrer">Click here</a> and download the <em>{client.name}</em> installer</li>
<li>Run the <em>{client.name}</em> installer, follow instructions.</li>
<li>{register}</li>
</ol>
""",
},
},
'macos': {
'macos_appstore': {
'title': "MacOS App Store",
'url_support': True,
'magic_support': False,
'pkgname_support': False,
'step_install': {
'gratis': 'Click on <em>Get</em>',
'paid': 'Click on the price tag and deal with the payment bullshit',
},
'guide_package': """
<ol>
<li><a href="{client.url_install}" target="_blank" rel="noreferrer">Click here</a> and on any "Open App Store"-popup you might get to open the <em>{client.name}</em> page in the App Store</li>
<li>{installer.step_install}</li>
<li>{register}</li>
</ol>
""",
},
'homebrew': {
'title': "Homebrew",
'url_support': False,
'magic_support': False,
'pkgname_support': True,
'guide': "TODO",
'guide_package': "TODO",
},
},
'linux': {
'pkg_generic': {
'title': "Package manager",
'url_support': False,
'magic_support': False,
'pkgname_support': True,
'guide_package': """
<p>Your OS should come with a pre-installed package manager.</p>
<p>Depending on your particular flavor of OS, it might be called
<code>apt</code>, <code>dnf</code>, <code>zypper</code> or something else.</p>
<p>Using <code>apt</code> as an example:</p>
<ol>
<li>Run this in a terminal: <code>sudo apt install {client.pkgname}</code></li>
<li>When prompted, type in your password</li>
<li>Follow instructions (usually you only have to press <code>y</code> and Enter, if anything)</li>
<li>{register}</li>
</ol>
""",
}
},
'freebsd': {
'pkg_freebsd': {
'title': "pkg",
'url_support': False,
'magic_support': False,
'pkgname_support': True,
'guide_package': """
<p>FreeBSD comes with pkg pre-installed and does all necessary configuration automatically when it's first run.</p>
<ol>
<li>Run this in a terminal: <code>sudo pkg install {client.pkgname}</code></li>
<li>When prompted, type in your password</li>
<li>{register}</li>
</ol>
""",
},
},
'openbsd': {
'pkg_openbsd': {
'title': "pkg_add",
'url_support': False,
'magic_support': False,
'pkgname_support': True,
'guide_package': """
<p>OpenBSD comes with pkg_add pre-installed.</p>
<ol>
<li>Run this in a terminal: <code>sudo pkg_add {client.pkgname}</code></li>
<li>When prompted, type in your password</li>
<li>{register}</li>
</ol>
""",
},
},
'netbsd': {
'pkg_netbsd': {
'title': "pkg_add",
'url_support': False,
'magic_support': False,
'pkgname_support': True,
'guide_package': """
<p>NetBSD comes with pkg_add pre-installed.</p>
<ol>
<li>Run this in a terminal: <code>sudo pkg_add {client.pkgname}</code></li>
<li>When prompted, type in your password</li>
<li>{register}</li>
</ol>
""",
},
},
}
REGISTER_INFO = {
'client': '<a class="button" href="{invite.uri}" target="_blank" rel="noreferrer">Open <em>{client.name}</em> to register</a>',
'web': '<a class="button" href="{invite.register_url}">Register</a>',
}
FEATURE_INFO = {
'omemo': {
'title': 'OMEMO',
'help': 'An End-to-End Encryption (E2EE) scheme; Basically a copy of Signals encryption mechanism for XMPP. Well-audited and offers plausible deniability. Currently considered state of the art.'
},
'openpgp': {
'title': 'OpenPGP',
'help': 'The open standard for Pretty Good Privacy, the grandaddy of all End-to-End Encryption. Well-audited and battle-proven, but does not offer plausible deniability.'
},
'muc': {
'title': 'Groupchat',
'help': 'Text chat with multiple users in one room.',
},
'audiochat': {
'title': 'Audiochat',
'help': 'One-on-one audiocalls',
},
'videochat': {
'title': 'Videochat',
'help': 'One-on-one videocalls'
},
'invites': {
'title': 'Invites',
'help': 'The ability to handle invites for XMPP services in the client iself, instead of on the web.'
}
}
HELP_INFO = {
'jid': """
<p>The address your XMPP can be reached under.<p>
<p>It is globally unique, so <strong>IF</strong> you depend on pseudonymity,
<strong>DO NOT EVER</strong> connect it to any identities of yours that are
in turn connected with your real-life identity.</p>
In more concrete terms, this means that you should <strong>NEVER</strong>
share this address by means of any online account which you registered
with your "real" name, phone number or other information from which
your real identity can be directly inferred.</p>
<p>If that sounds borderline impossible to you, we are painfully aware.
If you're looking for a more trustworthy approach to social media, you
might want to <a href="https://joinmastodon.org/" target="_blank" rel="noreferrer">join the fediverse</a>.</p>
""",
'password': """
<p>The password granting access to your XMPP account.</p>
<p>We do not store this password, so don't lose it.</p>
<p>We strongly recommend using an encrypted
password manager never share your passwords
with anyone else, never put them down on paper.</p>"""
}
CLIENT_INFO = { # only put clients in here you want to support / recommend
'beagle': {
'title': "Beagle",
'description': "Can't tell you much. It runs on MacOS and does OMEMO. Made by the same people as Siskin.",
'features': ['omemo'],
'project_url': "https://beagle.im/",
'os': ['macos'],
'installer_recommend': {
'macos': 'macos_appstore',
},
'installer_magic': {},
'installer_manual': {
'macos': {
'macos_appstore': {
'url': "https://apps.apple.com/us/app/beagleim-by-tigase-inc/id1445349494",
'gratis': True,
},
},
},
},
'conversations': {
'title': "Conversations",
'description': "Hands down one of, if not <em>the</em>, best XMPP client for moblie devices. Simple but powerful, this client is a great choice for people who aren't very tech-savvy but still value their privacy. Only runs on Android.",
'features': ['omemo', 'openpgp', 'muc', 'audiochat', 'videochat', 'invites'],
'project_url': "https://conversations.im/",
'help_url': "https://conversations.im/#support",
'os': ['android'],
'installer_recommend': {
'android': 'f-droid',
},
'installer_magic': {
'android': {
'playstore': {
'url': "https://play.google.com/store/apps/details?id=eu.siacs.conversations&referrer={invite.uri}",
'gratis': False,
},
},
},
'installer_manual': {
'android': {
'playstore': {
'url': "https://play.google.com/store/apps/details?id=eu.siacs.conversations",
'gratis': False,
},
'f-droid': {
'gratis': True,
}
},
}
},
'conversejs': {
'title': "converse.js",
'description': "Converse is a web-based XMPP client. We <em>strongly</em> recommend you install and use one of the other clients, but provide this as a fall-back.",
'features': ['omemo', 'muc'],
'project_url': "https://conversejs.org/",
'help_url': "xmpp:discuss@conference.conversejs.org?join",
'os': [],
},
'dino': {
'title': "Dino",
'description': "Dino is currently the best XMPP client for most desktop operating systems. Audio- and videochats aren't in any releases yet, but will likely be included in 0.3.0.",
'features': ['omemo', 'openpgp', 'muc'],
'project_url': "https://dino.im/",
'help_url': "xmpp:chat@dino.im?join",
'os': ['linux', 'freebsd', 'openbsd', 'netbsd'],
'installer_recommend': {
'linux': 'pkg_generic',
'freebsd': 'pkg_freebsd',
'openbsd': 'pkg_openbsd',
'netbsd': 'pkg_netbsd',
},
'installer_magic': {},
'installer_manual': {
'linux': {
'pkg_generic': {
'gratis': True,
'pkgname': "dino",
},
},
'freebsd': {
'pkg_freebsd': {
'gratis': True,
'pkgname': "dino",
},
},
'openbsd': {
'pkg_openbsd': {
'gratis': True,
'pkgname': "dino",
},
},
'netbsd': {
'pkg_netbsd': {
'gratis': True,
'pkgname': "dino",
},
},
},
},
'gajim': {
'title': "Gajim",
'description': "Might be the most featureful XMPP client in the universe. Mostly recommended for advanced users.",
'features': ['omemo', 'openpgp', 'muc', 'audiochat', 'videochat'],
'project_url': "https://gajim.org/",
'help_url': "https://dev.gajim.org/gajim/gajim/-/wikis/help/Help",
'os': ['windows', 'linux', 'freebsd', 'openbsd', 'netbsd'],
'installer_recommend': {
'windows': 'manual',
'linux': 'pkg_generic',
'freebsd': 'pkg_freebsd',
'openbsd': 'pkg_openbsd',
'netbsd': 'pkg_netbsd',
},
'installer_magic': {},
'installer_manual': {
'windows': {
'manual': {
'gratis': True,
'url': "https://gajim.org/download/",
'caption': "Download Gajim Installer",
},
},
'linux': {
'pkg_generic': {
'gratis': True,
'pkgname': "gajim",
},
},
'freebsd': {
'pkg_freebsd': {
'gratis': True,
'pkgname': "gajim",
},
},
'openbsd': {
'pkg_openbsd': {
'gratis': True,
'pkgname': "gajim",
},
},
'netbsd': {
'pkg_netbsd': {
'gratis': True,
'pkgname': "gajim",
},
},
},
},
'siskin': {
'title': "Siskin",
'description': "We don't know anything about Siskin, but it seems to be the only usable XMPP client on iOS that supports OMEMO.",
'features': ['omemo'],
'project_url': "https://siskin.im/",
'os': ['ios'],
'installer_recommend': {
'ios': 'ios_appstore',
},
'installer_magic': {},
'installer_manual': {
'ios': {
'ios_appstore': {
'url': "https://apps.apple.com/us/app/tigase-messenger/id1153516838",
'caption': "Install from App Store",
'gratis': True,
},
},
},
}
}