diff --git a/CHANGELOG.md b/CHANGELOG.md index f29eee3..fff4d91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. ## [0.7.5] - Orm (2026-04-05) +### Changed + +- file patching to in-flight injection + +## [0.7.5] - Orm (2026-04-05) + ### Added - per tab workspaces diff --git a/Dockerfile b/Dockerfile index 10b0a15..dfbed6b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ COPY server/plugins/ ./server/plugins/ RUN npm run build # Production image. No Obsidian code included. -# On first run, the entrypoint downloads and patches Obsidian. +# On first run, the entrypoint downloads Obsidian. FROM node:22-slim RUN apt-get update && apt-get install -y --no-install-recommends \ diff --git a/README.md b/README.md index 607234a..c1c098e 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,11 @@ ## What is this -Ignis is a javascript shim that replaces the Electron APIs used by Obsidian and allows Obsidian to be run in the browser while keeping your vault on the server. As an alternative to sync based solutions, this lets you access your notes without installing an app on your device. Obsidian is not included in this repository, the Docker container downloads Obsidian directly from its official source on first run. +Ignis is a compatibility shim that provides browser-compatible implementations of the Electron APIs used by Obsidian, allowing Obsidian to run in a standard browser while keeping your vault on the server. Obsidian is not included in or distributed with this project. The Docker container downloads Obsidian directly from its official source on first run. ## Why -Obsidian's local first approach may not be the preference of some users, and while synchroniztion between devices is a perfectly good way to access your notes on multiple devices, options for accessing Obsidian remotely has been limited to VNC based solutions that have rather poor user experience. Ignis is an alternative for people who want to self-host a copy of Obsidian for easy access, in a (close-to) native format. +While Obsidian's local-first approach works well for most users, options for accessing your own Obsidian installation remotely have been limited to VNC-based solutions with poor user experience. Ignis provides an alternative for users who want to access their own copy of Obsidian from a browser, in a close-to-native format. ## Project Status @@ -67,8 +67,8 @@ If you are exposing Ignis to the internet, **you should really** put an authenti Ignis is not published to a registry yet. You need to build the image locally. ```bash -git clone https://github.com/user/obsidian-bridge.git -cd obsidian-bridge +git clone https://github.com/Nystik-gh/ignis.git +cd ignis docker compose up -d ``` @@ -126,3 +126,49 @@ See [ARCHITECTURE.md](docs/ARCHITECTURE.md) for details on the shim layer, plugi ## License This project is licensed under the [GNU Affero General Public License v3.0](LICENSE). + +## Legal Notice + +Ignis is not affiliated with, endorsed by, or associated with Dynalist Inc. or Obsidian. + +Ignis is an independently developed interoperability tool. It contains no Obsidian source code, binaries, or assets. No part of Obsidian is distributed, bundled, or included in this repository. Obsidian's own files are not altered, patched, or modified on disk. The shim is loaded before Obsidian at runtime and intercepts API calls in memory. + +Ignis works by providing a compatibility layer that implements browser-compatible equivalents of the Node.js and Electron APIs that Obsidian depends on. The user must obtain their own licensed copy of Obsidian separately. Ignis has no standalone functionality without it. + +### Interoperability under EU law + +The development of Ignis involved studying Obsidian's module interface layer to understand how it interacts with the Electron and Node.js runtime. This work falls under the interoperability provisions of [Directive 2009/24/EC of the European Parliament and of the Council](https://eur-lex.europa.eu/eli/dir/2009/24/oj/eng) (the EU Software Directive), which permits decompilation and analysis of a computer program to achieve interoperability with an independently created program. + +Specifically: + +- **Article 6(1)** permits reproduction and translation of code where it is indispensable to obtain the information necessary to achieve interoperability of an independently created program with other programs, provided that: (a) the acts are performed by a person having a right to use the program, (b) the interoperability information was not previously readily available, and (c) the acts are confined to the parts necessary to achieve interoperability. +- **Article 5(3)** permits a lawful user to observe, study, and test the functioning of a program to determine the ideas and principles underlying its elements, including its interfaces. +- **Article 8** states that any contractual provisions contrary to Article 6 or the exceptions in Article 5(2) and (3) shall be null and void. + +The shim layer targets the runtime interface boundary, the points where Obsidian calls Node.js and Electron APIs, and replaces them with browser-compatible equivalents backed by a server. No Obsidian application logic, algorithms, or non-interface code is reproduced. Ignis also includes a plugin that uses Obsidian's plugin API to add browser-specific functionality such as file upload and download. This plugin interacts with Obsidian in the same manner as any third-party community plugin. + +### What Ignis does and does not do + +**Does:** +- Provide independently written JavaScript modules that implement Node.js and Electron API surfaces in a browser context +- Provide a server that exposes filesystem operations over HTTP and WebSocket +- Load a shim layer at runtime that intercepts Obsidian's API calls before they reach the (absent) Node.js and Electron environment + +**Does not:** +- Distribute, bundle, or include any Obsidian source code, binaries, or assets in this repository. Obsidian is downloaded by the user's own container instance directly from official sources at runtime. +- Modify, patch, or alter any of Obsidian's files on disk +- Reproduce Obsidian's application logic, algorithms, or non-interface code +- Function as a standalone application without Obsidian +- Compete with or replace Obsidian + +### Regarding Obsidian's Terms of Service + +Obsidian's Terms of Service (Section: Restrictions, item iii) restrict reverse engineering except for the purpose of developing third-party plugins for non-commercial use. To the extent that this restriction conflicts with the rights granted under the EU Software Directive, Article 8 of the Directive renders such contractual provisions null and void. + +This project is developed and maintained by an individual based in the European Union, where the Directive applies as implemented in national law. + +### Good faith + +This project exists because its author uses Obsidian daily and wants to access it from a browser. It is shared in the belief that tools enabling software interoperability benefit users and are protected under EU law. There is no intent to harm Obsidian, Dynalist Inc., or their business. If you are a representative of Dynalist Inc. and wish to discuss this project, please reach out via the contact information provided below. + +Email: ignis@thiefling.com \ No newline at end of file diff --git a/package.json b/package.json index f28661b..a6a50b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ignis", - "version": "0.7.5", + "version": "0.7.6", "private": true, "description": "An Electron shim and server bridge for running Obsidian in a browser.", "scripts": { diff --git a/plugin/manifest.json b/plugin/manifest.json index f6d5646..16db9a2 100644 --- a/plugin/manifest.json +++ b/plugin/manifest.json @@ -1,7 +1,7 @@ { "id": "ignis-bridge", "name": "Ignis Bridge", - "version": "0.7.5", + "version": "0.7.6", "minAppVersion": "1.12.4", "description": "Additional Ignis specific functionality and ignis plugin management.", "author": "Nystik", diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index c1943b1..dc1d9d9 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -52,12 +52,6 @@ else echo "[ignis] Obsidian already set up." fi -# Always patch and copy latest bundles (they may have been updated between rebuilds) -node /app/scripts/patch-obsidian.js "$OBSIDIAN_DIR" -cp /app/dist/ignis-ui.js "$OBSIDIAN_DIR/ignis-ui.js" -cp /app/dist/shim-loader.js "$OBSIDIAN_DIR/shim-loader.js" -cp /app/images/favicon.png "$OBSIDIAN_DIR/favicon.png" -cp /app/server/assets/* "$OBSIDIAN_DIR/" 2>/dev/null || true # Install obsidian-headless (ob CLI) if not already present. # Not included in the image for legal reasons - installed at runtime. diff --git a/scripts/patch-obsidian.js b/scripts/patch-obsidian.js deleted file mode 100644 index 023353e..0000000 --- a/scripts/patch-obsidian.js +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env node -// Patches the extracted Obsidian asar for browser use: -// 1. Removes Content-Security-Policy meta tag -// 2. Injects shim-loader.js script (non-deferred, before all other scripts) -// 3. Injects favicon link - -const fs = require("fs"); -const path = require("path"); -const { getVersion } = require("../server/version"); - -const asarDir = process.argv[2]; -if (!asarDir) { - console.error("Usage: node patch-obsidian.js "); - process.exit(1); -} - -function patchHtml(filePath, version) { - const backupPath = filePath + ".orig"; - - if (!fs.existsSync(filePath) && !fs.existsSync(backupPath)) { - console.warn(`[patch] Skipping (not found): ${filePath}`); - return; - } - - // Create backup of the original on first patch; restore from it on subsequent runs - if (!fs.existsSync(backupPath)) { - fs.copyFileSync(filePath, backupPath); - console.log(`[patch] Backed up original: ${backupPath}`); - } else { - fs.copyFileSync(backupPath, filePath); - } - - let html = fs.readFileSync(filePath, "utf-8"); - - // Remove CSP meta tag - html = html.replace( - /\s*]*>\s*/g, - "\n", - ); - - // Inject favicon into - html = html.replace( - "", - ' \n', - ); - - // Inject ignis scripts before the first \n` + - `\n` + - '\n` + + `\n` + + '