psy 2 éve
szülő
commit
2dee8fb0d9

+ 0 - 61
.cspell.json

@@ -1,61 +0,0 @@
-{
-  "version": "0.1",
-  "language": "en",
-  "words": [
-    "AGPL",
-    "APPDATA",
-    "Argyris",
-    "CSRF",
-    "EACCESS",
-    "EXIF",
-    "Hintjens",
-    "Kata",
-    "LGPL",
-    "Machinekit",
-    "OSSEC",
-    "Pieter",
-    "Termux",
-    "abortable",
-    "autoconf",
-    "automake",
-    "christianbundy",
-    "dogfood",
-    "hyperaxe",
-    "hyperscript",
-    "libsodium",
-    "libtool",
-    "manyverse",
-    "mebibyte",
-    "mebibytes",
-    "minlength",
-    "mkdir",
-    "monokai",
-    "msgs",
-    "multiserver",
-    "muxrpc",
-    "nanohtml",
-    "noauth",
-    "nosniff",
-    "paramap",
-    "patchbay",
-    "patchfoo",
-    "patchfox",
-    "piexifjs",
-    "promisify",
-    "rebecca",
-    "recps",
-    "roadmap",
-    "sameorigin",
-    "sbot",
-    "shortname",
-    "socio",
-    "ssbc",
-    "sulphurpool",
-    "summerfruit",
-    "systemctl",
-    "systemd",
-    "unfollow",
-    "unikitty",
-    "zeromq"
-  ]
-}

+ 0 - 2
.dockerignore

@@ -1,2 +0,0 @@
-node_modules
-.git

+ 0 - 4
.mailmap

@@ -1,4 +0,0 @@
-Cinnamon <cinnamon_oasis@fastmail.com> <cinnamon_bun_github@fastmail.com>
-Cinnamon <cinnamon_oasis@fastmail.com> <32660718+cinnamon-bun@users.noreply.github.com>
-Jonathan Dahan <github@jonathan.is> <hi@jonathan.is>
-kawaiipunk <kawaiipunk@posteo.net> <georgeowell@users.noreply.github.com>

+ 1 - 1
README.md

@@ -4,7 +4,7 @@
 
 ## Description:
 
-SNH-Oasis is a **free, open-source, encrypted, peer-to-peer**... project networking application 
+SNH-Oasis is a **free, open-source, encrypted, peer-to-peer, decentralized & federated**... project networking application 
 that helps you follow interesting content and discover new ones.
 
   ![SNH](https://solarnethub.com/_media/socialnet/snh-oasis_profile-2.png "SolarNET.HuB")

+ 0 - 25
contrib/Dockerfile

@@ -1,25 +0,0 @@
-FROM node:lts
-
-# Ensure that the ~/.ssb directory is persistent and owned by the 'node' user.
-RUN mkdir /home/node/.ssb && chown node:node /home/node/.ssb
-VOLUME /home/node/.ssb
-
-# Don't run as root.
-USER node
-
-# Create app directory and use it.
-RUN mkdir /home/node/app
-WORKDIR /home/node/app
-
-# Add dependency metadata and install dependencies.
-ADD package.json package-lock.json ./
-RUN npm ci
-
-# Add the rest of the source code.
-ADD ./ ./
-
-# Expose ports for Oasis and SSB replication.
-EXPOSE 3000 8008
-
-# Listen on the container's public interfaces but allow 'localhost' connections.
-CMD ["node", ".", "--host", "0.0.0.0", "--allow-host", "localhost"]

+ 0 - 36
contrib/install-systemd-service.js

@@ -1,36 +0,0 @@
-const fs = require("fs");
-const path = require("path");
-const mkdirp = require("mkdirp");
-const { execSync } = require("child_process");
-const open = require("open");
-
-let xdgConfigHome = process.env.XDG_CONFIG_HOME;
-let systemdUserHome = process.env.SYSTEMD_USER_HOME;
-
-if (xdgConfigHome == null) {
-  // Note: path.join() throws when arguments are null-ish.
-  xdgConfigHome = path.join(process.env.HOME, ".config");
-}
-
-if (systemdUserHome == null) {
-  systemdUserHome = path.join(xdgConfigHome, "systemd", "user");
-}
-
-const targetPath = path.join(systemdUserHome, "oasis.service");
-
-if (fs.existsSync(targetPath)) {
-  console.log("Cowardly refusing to overwrite file:", targetPath);
-} else {
-  mkdirp.sync(systemdUserHome);
-
-  const sourcePath = path.join(__dirname, "oasis.service");
-  fs.copyFileSync(sourcePath, targetPath);
-
-  execSync("systemctl --user daemon-reload");
-  console.log("Service configuration has been installed to:", targetPath);
-}
-
-// Since this isn't in a post-install script we can enable, start, and open it.
-execSync("systemctl --user enable oasis");
-execSync("systemctl --user start oasis");
-open("http://localhost:4515");

+ 0 - 15
contrib/oasis.service

@@ -1,15 +0,0 @@
-[Unit]
-Description=Oasis - Project Network Web Interface
-Documentation=https://code.03c8.net/KrakensLab/snh-oasis.git
-After=network.target
-
-[Service]
-Type=simple
-# %s : run in the user's shell because they might have a custom PATH
-# -l : invoke a login shell to make sure to source .profile, .zprofile, .bash_profile, ...
-# -c : invoke a shell because we'd have to hardcode a path using ExecStart
-ExecStart=%s -l -c 'oasis --host localhost --port 4515 --no-open'
-Restart=on-failure
-
-[Install]
-WantedBy=default.target

+ 6 - 0
docs/CHANGELOG.md

@@ -13,6 +13,12 @@ All notable changes to this project will be documented in this file.
 ### Security
 -->
 
+## v0.2.3 - 2022-11-05
+
+### Added
+
+- Federation with SSB Multiverse
+
 ## v0.1.0 - 2022-07-24
 
 ### Added

+ 0 - 1
docs/MAINTAINERS

@@ -1,2 +1 @@
 psy <epsylon@riseup.net>
-Christian Bundy <christianbundy@fraction.io>

+ 0 - 17
docs/architecture.md

@@ -1,17 +0,0 @@
-# Architecture
-
-```
-├── assets: static assets like CSS
-├── cli:    command-line interface (yargs)
-├── http:   HTTP interface (koa)
-├── index:  mediator that ties everything together
-├── models: data sources
-├── ssb:    SSB connection and interfaces
-└── views:  HTML presentation to be exposed over HTTP
-```
-
-## Debugging
-
-Debugging is never going to be easy, but the debug script helps a bit. You can
-use `oasis --debug` or debug the source with `npm run debug` / `yarn debug`.
-

+ 0 - 35
docs/blob-security.md

@@ -1,35 +0,0 @@
-# Blob security
-
-**This is how we secure blob pages from interacting with Oasis. If you notice
-any errors or omissions, please follow the steps in the security policy.**
-
-One of the problems we have when hosting content from other people in a P2P
-network is avoiding
-[arbitrary code execution](https://en.wikipedia.org/wiki/Arbitrary_code_execution).
-In the context of Oasis, we need to be very sure that we aren't letting any code
-other than Oasis run in the browser. Markdown is a security concern, but it's
-got lots of eyeballs on the problem, whereas blob security is a security
-concern without any common best practices. The problem we need to solve isn't
-super common: hosting arbitrary data, especially HTML, in a safe way that doesn't
-open security vulnerabilities.
-
-The way we currently deal with this is a [content security policy (CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP),
-which gives Oasis a way to tell the web browser which features can be safely
-disabled. Since Oasis doesn't use any front-end JavaScript, we can disable all
-JavaScript being run by the web browser. This is _huge_ and massively reduces
-the surface area that might be vulnerable to attack. You can find all of the
-CSP code in [`http.js`].
-
-With JavaScript out of the way, the only attack vector that we should worry
-about is an [HTML form](https://developer.mozilla.org/en-US/docs/Learn/Forms#See_also).
-If one of these were embedded in a blob, they would be able to send HTTP POST
-requests to our API endpoints, impersonating the user. A button called "click
-me", could publish posts, change follow status, make changes to our settings
-page, or other bad behavior that we want to avoid.
-
-The mitigation for this is a referrer check on all POST endpoints, which helps
-us guarantee that all form submissions came from a non-blob page. If we receive
-an HTTP POST without a referrer, we throw an error. If we receive a referrer from
-a blob page, we throw an error. If a form submission passes these two checks,
-we can safely assume that the POST request came from a legitimate person using
-Oasis.

+ 0 - 48
docs/configuring.md

@@ -1,48 +0,0 @@
-# Configuring
-
-The default options can be permanently set with a configuration file found in a
-standard folder for configuration, depending on your operating system:
-
-- Linux: `$XDG_CONFIG_HOME/oasis/default.json`.
-  Usually this is `/home/<your username>/.config/oasis/default.json`
-- Windows `%APPDATA%\oasis\default.json`.
-- Mac OS, `/Users/<your username>/Library/Preferences/oasis/default.json`
-
-The configuration file can override any or all of the command-line _defaults_.
-Here is an example customizing the port number and the "open" settings:
-
-```json
-{
-  "open": false,
-  "port": 19192
-}
-```
-
-If you run `oasis --help` you'll see all of the parameters.
-
-## Semantics
-
-Which value is given is decided like this:
-
-1. If an argument is given on the command-line, use that value.
-2. Otherwise, use the value from the configuration file if present.
-3. If neither command-line nor configuration file are given, use the built-in default value.
-
-# Custom Styles
-
-The stylesheet values may be overridden by adding custom values to a file found in a
-standard folder for configuration, depending on your operating system:
-
-- Linux: `$XDG_CONFIG_HOME/oasis/custom-style.css`.
-  Usually this is `/home/<your username>/.config/oasis/custom-style.css`
-- Windows `%APPDATA%\oasis\custom-style.css`.
-- Mac OS, `/Users/<your username>/Library/Preferences/oasis/custom-style.css`
-
-As an example the width used for the main body may be changed to a different
-fixed width or a dynamic width:
-
-```css
-:root {
-  --measure: 75%;
-}
-```

+ 0 - 6
docs/install.md

@@ -14,9 +14,3 @@ For a GNU/Linux based system, execute the following steps (from a shell):
     cd oasis
     npm install .
     npm run start
-
---------------
-
-If you want to run it in the background, see [`with-systemd.md`](./with-systemd.md).
-
-If you want to run it in a container, see [`with-docker.md`](./with-docker.md).

+ 0 - 20
docs/with-docker.md

@@ -1,20 +0,0 @@
-# With Docker
-
-**Warning:** Experimental.
-
-Use [Docker](https://www.docker.com/) to run Oasis in a container.
-
-## Build
-
-```shell
-docker build --tag oasis --file contrib/Dockerfile  .
-docker volume create ssb
-```
-
-## Run
-
-```
-docker run --mount source=ssb,target=/home/node/.ssb --publish 127.0.0.1:3000:3000 --rm oasis
-```
-
-You should now be able to open http://localhost:3000 in your browser.

+ 0 - 14
docs/with-systemd.md

@@ -1,14 +0,0 @@
-## With systemd
-
-**Warning:** Experimental.
-
-If you're using Linux and your distribution supports
-[systemd](https://systemd.io/), you may be able to have Oasis automatically
-start in the background when you start your computer. This is good for SSB and
-makes it more likely that you'll download messages that you want.
-
-```shell
-node contrib/install-systemd-service.js
-```
-
-Follow the instructions to finish configuring the background service.

+ 1 - 1
package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "@krakenslab/oasis",
-  "version": "0.2.3",
+  "version": "0.2.4",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@krakenslab/oasis",
-  "version": "0.2.3",
+  "version": "0.2.4",
   "description": "SNH-Oasis Project Network GUI",
   "repository": {
     "type": "git",

+ 2 - 2
src/views/i18n.js

@@ -164,7 +164,7 @@ const i18n = {
     invitesDescription:
       "Use the PUB's invite codes here.",
     acceptInvite: "Accept invite",
-    acceptedInvites: "Accepted",
+    acceptedInvites: "Federated Networks",
     noInvites: "No invites accepted.",
     // search page
     searchLabel: "Seek inhabitants and keywords, among the posts you have downloaded.",
@@ -351,7 +351,7 @@ const i18n = {
     invitesDescription:
       "Utiliza los códigos de invitación de los PUBs aquí.",
     acceptInvite: "Aceptar invitación",
-    acceptedInvites: "Aceptadas",
+    acceptedInvites: "Redes Federadas",
     noInvites: "Sin invitaciones aceptadas.",
     // search page
     searchLabel: