Compare commits

..

510 Commits

Author SHA1 Message Date
anonpenguin
8b8f0a4251
Merge pull request #93 from DeBrosDAO/nightly
release: 0.122.47 — nightly → main
2026-06-11 17:37:20 +03:00
anonpenguin23
8472861ed3 merge main into nightly — keep nightly (staging) on all conflicts
Reconciles the divergence created by the May-13 nightly history rewrite
(main absorbed pre-rewrite SHAs via PRs #90-92). Content conflicts all
resolve in nightly's favor; nightly is the deployed, verified branch
(v0.122.47 live on devnet).
2026-06-11 17:32:37 +03:00
anonpenguin23
cd8c717363 chore(version): bump to 0.122.47
- refactor(turn): extract decodeTURNConfig for testability
- feat(turn): add stealth domain fields to config
- fix(apns): nest custom data under "body" for expo-notifications compatibility
2026-06-11 11:45:12 +03:00
anonpenguin23
f4c58db710 release: 0.122.46 2026-06-11 10:06:19 +03:00
anonpenguin23
8375d92109 feat(namespace): reuse caddy wildcard certificate for stealth turns
- Implement `resolveStealthCert` to use existing `*.<baseDomain>` wildcard certificates instead of dynamic Caddyfile provisioning.
- Avoids EROFS errors caused by `ProtectSystem=strict` on the orama-node service.
- Add strict validation to ensure stealth hosts are single-label subdomains covered by the wildcard.
2026-06-11 10:04:45 +03:00
DeBros
85e6dd8a9c
Merge pull request #92 from DeBrosDAO/nightly
release: 0.122.10
2026-05-12 10:18:52 +03:00
anonpenguin23
55b86cdcfc release: 0.122.10
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 10:14:53 +03:00
anonpenguin
b13948d15a
Merge pull request #91 from DeBrosDAO/nightly
ci(publish-sdk): allow same-version on npm bump
2026-05-12 10:13:50 +03:00
anonpenguin23
cd690bd28c ci(publish-sdk): allow same-version on npm bump
When /VERSION is bumped on the source branch before tagging, the SDK
package.json already matches the release tag. Without --allow-same-version,
npm version errors as 'Version not changed' and the workflow fails on
stable main releases (nightly worked by accident because the bump was
done in the previous commit cycle and package.json was a step behind).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 10:07:34 +03:00
anonpenguin
c172f1355f
Merge pull request #90 from DeBrosDAO/nightly
Nightly
2026-05-12 10:01:25 +03:00
anonpenguin23
fbe05d94b3 ci: goreleaser v2 hooks need string form, bump to 0.122.9
GoReleaser v2.15.4 rejects the {cmd: ..., dir: ...} map syntax for
before.hooks even though v2 docs show it. Reverting to the simple
string form `go -C core mod tidy` that worked in v1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 09:54:58 +03:00
anonpenguin23
fb609d66d9 ci: single VERSION file, version guards, goreleaser v2, CI on push
Workflow hardening based on the four-cycle release-debugging session:

Centralized versioning
- Add /VERSION at repo root as single source of truth.
- core/Makefile reads VERSION via `$(shell cat ../VERSION)`.
- Add `make bump VER=X.Y.Z` target that updates /VERSION and syncs
  sdk/package.json in one shot.

Version mismatch guards
- All three release workflows (release.yaml, release-apt.yml,
  publish-sdk.yml) now verify the release tag matches /VERSION at the
  very first step. Stale-VERSION releases fail fast with a clear hint
  to run `make bump`.

GoReleaser v2 migration
- Upgrade goreleaser-action v5 -> v6 (pinned `~> v2`).
- Add `version: 2` to .goreleaser.yaml.
- Migrate to v2 syntax: `archives.format` -> `formats: [...]`,
  `brews.folder` -> `directory`, `snapshot.name_template` ->
  `version_template`, `builds`-style references replaced with `ids:`.
- `before.hooks` can use map syntax again (v2 supports it).

Homebrew tap on stable only
- `brews.skip_upload` is now `'{{ if .Prerelease }}true{{ else }}false{{ end }}'`.
- Stops nightly releases from polluting the tap and from hitting 401
  on stale HOMEBREW_TAP_TOKEN. Stable main releases still publish.

CI on every push
- New ci.yml runs `go vet` + `go test -race` on the core module and
  typecheck/build/unit-tests on the SDK for every push to main/nightly
  and every PR. version-sanity job warns when /VERSION and
  sdk/package.json drift.

Version bump for next pipeline test
- /VERSION: 0.122.8
- sdk/package.json: 0.122.8

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 09:49:33 +03:00
anonpenguin23
10056fe5db ci: point goreleaser at renamed DeBrosDAO/orama repo, bump to 0.122.7
The repo moved from DeBrosOfficial/network to DeBrosDAO/orama.
GoReleaser was uploading artifacts to the old URL and getting 307
redirects, then retrying until secondary rate limits kicked in.

- release.github.owner/name: DeBrosOfficial/network -> DeBrosDAO/orama
- brews.repository.owner: DeBrosOfficial -> DeBrosDAO
- all homepage URLs updated
- bump VERSION to 0.122.7 for fourth pipeline test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 09:42:51 +03:00
anonpenguin23
daa96a5c2f ci: fix goreleaser nfpm README path and bump to 0.122.6
- goreleaser nfpm contents pointed to ./core/README.md which doesn't
  exist; switched to repo-root ./README.md
- bump VERSION to 0.122.6 for third pipeline test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 09:37:32 +03:00
anonpenguin23
6c0ada087e ci: fix remaining release pipeline bugs and bump to 0.122.5
- goreleaser: 'cd core && go mod tidy' didn't work — hooks run via exec,
  not shell. Switched to 'go -C core mod tidy' which is shell-free.
- release-apt: remove redundant mv that renamed file to itself
  (PKG_NAME and target name were identical, dpkg-deb already named it
  correctly)
- bump VERSION to 0.122.5 for second pipeline test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 09:32:59 +03:00
anonpenguin23
fd45d26d51 ci: fix release workflows and bump version to 0.122.4
- goreleaser: switch hooks to v1 string syntax (was map syntax, caused
  yaml unmarshal error on action v1.26.2)
- release-apt: build ./cmd/cli and ./cmd/node as packages (was building
  single .go files, missed sibling files → undefined: runCLI)
- publish-sdk: remove main-only guard; nightly releases now publish to
  npm with --tag nightly (stable releases still go to @latest)
- bump VERSION to 0.122.4 for first end-to-end release pipeline test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 09:30:13 +03:00
anonpenguin23
887669ae36 chore(sdk): bump version to 0.122.3 2026-05-12 09:19:50 +03:00
anonpenguin23
59b4df976b ci(workflow): restrict sdk publish to manual triggers or main branch releases 2026-05-12 09:19:15 +03:00
anonpenguin23
7c76790ad3 ci(publish-sdk): trigger workflow on release
- add release event trigger to automate publishing
- update versioning logic to support release tags
- conditionally skip git tagging when triggered by release
2026-05-12 09:17:49 +03:00
anonpenguin23
5ccacb91d6 fix(gateway): update rqlite consistency level and improve column mapping
- Change RQLite consistency level from `none` to `weak` to ensure reads
  route to the leader and prevent stale data reads (fixes #235)
- Add `normalizeColumnKey` to allow snake_case SQL columns to map to
  CamelCase Go struct fields automatically (fixes #65)
- Add comprehensive unit tests for DSN generation and column mapping
2026-05-12 09:13:03 +03:00
anonpenguin23
6d9822dc35 feat(gateway): implement self-service tenant push notifications
- Add `namespace_push_config` table for per-namespace provider settings
- Introduce `cluster_secret_path` to enable deterministic JWT signing and
  AES-256-GCM encryption for push credentials
- Update gateway config to support per-namespace overrides of push
  notification providers (ntfy/Expo)
- Bump version to 0.122.3
2026-05-08 11:23:53 +03:00
anonpenguin23
333b7233c1 docs: update deployment and serverless documentation
- bump version to 0.122.2
- document schema migration invariants and push notification configuration
- add serverless host function aliases and v2 database API documentation
- introduce schema roundtrip test to prevent migration drift
2026-05-07 07:33:52 +03:00
anonpenguin23
c2556a14d7 feat(serverless): register host module under "orama" alias
- Add "orama" to the list of host module registration names to support
  common developer intuition and prevent instantiation errors.
- Add comprehensive regression tests to ensure all aliases ("env",
  "host", "orama") remain registered.
- Update SDK documentation to clarify import conventions and alias
  support.
2026-05-06 15:43:11 +03:00
anonpenguin23
96029e5ded Update version 2026-05-06 09:12:24 +03:00
anonpenguin23
f865b174ed feat(migrations): implement schema version contract enforcement
- Add `contract.go` to manage and validate embedded SQL migrations
- Introduce `AssertSchema` to verify database version at startup
- Include `SchemaMismatchError` with actionable recovery instructions
- Add comprehensive unit tests for version parsing and validation
2026-05-06 08:23:13 +03:00
anonpenguin
46d511eb5e
Merge pull request #89 from DeBrosDAO/blockchain
Blockchain
2026-05-05 12:30:45 +03:00
anonpenguin23
c2f6b19493 Updated Version 2026-05-05 12:30:15 +03:00
8fdf03b143 chore: untrack bin/ and add to .gitignore
Compiled binaries should not be in version control.
2026-05-05 12:20:04 +03:00
7d322dc84f etc 2026-05-05 11:35:35 +03:00
abd0b2651d Serverless Engine Patch 2026-05-05 07:40:16 +03:00
anonpenguin23
d10f8c35bb feat(gateway): implement persistent webhooks and namespace sequencing
- Add migrations for per-namespace publish sequences and persistent WebSocket function settings
- Integrate PersistentWSManager and WSBridge into the gateway dependency graph
- Upgrade serverless engine to use a multi-tier rate limiter
- Update JWT claims to support custom application-defined fields
2026-05-04 11:38:19 +03:00
anonpenguin23
0379dc39f1 feat(core): implement sni-router for stealth turn
- add `orama-sni-router` binary to build process
- introduce `cmd/sni-router` for TLS-level SNI routing
- add documentation for stealth turn deployment architecture
2026-05-03 18:20:21 +03:00
anonpenguin23
54852076f9 feat(ssh): allow running remote commands via ssh
- update ssh command to accept optional remote command argument
- modify sshInto to execute commands non-interactively when provided
- comment out unreachable node in nodes.conf
2026-05-03 14:55:43 +03:00
anonpenguin23
69c7ed5e5a Fix 2026-04-02 15:22:06 +03:00
anonpenguin23
7284cb4578 feat(cli): add fanout push strategy and improve website responsiveness
- Add --fanout flag to push command for server-to-server deployment
- Implement agent forwarding for efficient multi-node distribution
- Update landing page scene heights and section padding for mobile devices
2026-03-28 15:27:54 +02:00
anonpenguin23
b9b6e19bb8 Changes 2026-03-28 14:58:25 +02:00
anonpenguin23
f3f4a84762 feat(cli): add push command and improve node setup
- Add `orama push` command to upload and extract binary archives to nodes
- Update `node setup` to pass operator metadata and auto-configure environments
- Improve SSH configuration and node registration logic
2026-03-28 14:30:55 +02:00
anonpenguin23
ab1be4105c feat(cli): add node setup command
- implement automated VPS bootstrapping for Orama nodes
- add SSH key management via rootwallet
- support genesis node creation and cluster joining via invite tokens
2026-03-28 10:24:48 +02:00
anonpenguin23
c27faa02fa feat(auth): integrate rootwallet agent and update service hardening
- Replace CLI-based rootwallet calls with agent-based communication
- Update production provisioner to support sudo-based service management
- Add API key-to-wallet resolution for gateway operator handlers
2026-03-28 08:59:11 +02:00
anonpenguin23
8d7d1c6621 feat(cli): add node management and rollout commands
- implement `nodes`, `rollout`, `ssh`, and `status` commands
- add `migrate-conf` utility to register existing nodes with the gateway
- update database schema to support operator wallet tracking for nodes
2026-03-27 16:25:32 +02:00
anonpenguin23
2017fcb432 feat(monitor): add vault health checks and reporting
- integrate vault into node alerts (service, responsive, status, restarts)
- add vault report collection (systemd, logs, HTTP status)
- update production CLI (clean, restart, stop, services)
- add comprehensive unit tests for vault alerts
2026-03-27 14:52:41 +02:00
anonpenguin23
318eea33ae refactor(cli): extract AddEnvironment/RemoveEnvironment functions
- support upsert in AddEnvironment, no-op RemoveEnvironment if absent
- fallback active env to devnet on remove, add tests
- integrate with sandbox create/destroy, ignore core/plans/
2026-03-27 14:16:51 +02:00
anonpenguin23
fd59131ff4 docs(landing): update operator sections for testnet launch 2026-03-27 12:13:38 +02:00
anonpenguin23
59d881afe6 no index no follow 2026-03-26 19:07:25 +02:00
anonpenguin23
81083402a1 feat(website): add deployment script and SEO enhancements
- add deploy.sh for rsync-based remote deployment
- add SEO/Open Graph/Twitter meta tags and og-image
- ignore remote.conf and update pnpm build deps
2026-03-26 19:05:19 +02:00
DeBros
82c477266d
Merge pull request #88 from DeBrosDAO/nightly
ci: upgrade go to 1.24, add caching, run unit tests
2026-03-26 18:49:00 +02:00
anonpenguin23
169be97026 ci: upgrade go to 1.24, add caching, run unit tests
- upgrade go to 1.24 in release-apt.yml
- add go.sum dependency caching to release workflows
- update publish-sdk.yml to run vitest unit tests
2026-03-26 18:48:07 +02:00
anonpenguin
4b7c342c77
Merge pull request #87 from DeBrosDAO/nightly
Nightly
2026-03-26 18:44:22 +02:00
anonpenguin23
7d5ccc0678 Added orama sdk 2026-03-26 18:40:20 +02:00
anonpenguin
1ca779880b
Merge pull request #86 from DeBrosDAO/0.120.0
0.120.0
2026-03-26 18:27:14 +02:00
anonpenguin23
3b779cd5a0 Updated version 2026-03-26 18:26:09 +02:00
anonpenguin23
b94fd1efcd Fixed pre push on core 2026-03-26 18:24:47 +02:00
anonpenguin23
abcc23c4f3 refactor(monorepo): restructure repo with core, website, vault, os packages
- add monorepo Makefile delegating to sub-projects
- update CI workflows, GoReleaser, gitignore for new structure
- revise README, CONTRIBUTING.md for monorepo overview
- bump Go to 1.24
2026-03-26 18:21:55 +02:00
anonpenguin23
ebaf37e9d0 Merge commit '7c165b9579ac02394438d93ca22e09443bea7131' as 'vault' 2026-03-26 18:15:11 +02:00
anonpenguin23
c536e45d0f Merge commit '655bd921784bd5aaa339cffc6b72a37879fb6534' as 'website' 2026-03-26 18:14:59 +02:00
anonpenguin23
211c0275d3 refactor: move Go project into core/ for monorepo structure 2026-03-26 18:14:52 +02:00
anonpenguin23
5456d57aeb feat(sandbox): add preflight checks and auto-build archive to create
- validate agent, API token, archive before provisioning
- auto-build archive via `make build-archive` if missing
- add tests and Makefile install target
2026-03-26 17:33:19 +02:00
anonpenguin
8ea4499052
Merge pull request #85 from DeBrosDAO/0.115.0
0.115.0
2026-03-20 07:25:50 +02:00
anonpenguin23
6657c90e36 Merge branch '0.115.0' of github-debros:DeBrosOfficial/network into 0.115.0 2026-03-20 07:23:16 +02:00
anonpenguin23
0764ac287e refactor(remotessh): use rwagent directly instead of rw CLI subprocesses
- replace `rw vault ssh` calls with `rwagent.Client` in PrepareNodeKeys,
  LoadAgentKeys, EnsureVaultEntry, ResolveVaultPublicKey
- add vaultClient interface, newClient func, and wrapAgentError for
  testability and improved error messages
- prefer pre-built systemd dir in installNamespaceTemplates
2026-03-20 07:23:10 +02:00
anonpenguin
c4fd1878a7
Merge pull request #83 from DeBrosDAO/0.115.0
0.115.0
2026-03-20 07:22:43 +02:00
anonpenguin
3d70f92ed5
Merge branch 'nightly' into 0.115.0 2026-03-20 07:22:31 +02:00
anonpenguin23
fa826f0d00 refactor(sandbox): integrate rootwallet SSH keys
- replace standalone sandbox keys with "sandbox/root" vault entry
- update inspector config to use vault targets (no passwords/keys)
- make sandbox default active environment
- add vault helpers and tests for remotessh
2026-03-10 05:25:41 +02:00
anonpenguin23
733b059681 feat(sandbox): add --anyone-client flag to rollout
- propagate `--anyone-client` to `orama node upgrade` on all nodes
- prioritize explicit `--anyone-client` over prefs/auto-detect in production
- ensure mutual exclusivity between relay/client modes in prefs
2026-03-09 10:59:15 +02:00
anonpenguin23
78d876e71b feat(monitor): add sandbox environment support
- load nodes from active sandbox state for env=sandbox
- extract fanoutArchive for efficient server-to-server distribution
2026-03-09 10:19:40 +02:00
anonpenguin23
6468019136 feat(sandbox): optimize archive upload via server-to-server fanout
- add WithNoHostKeyCheck option for ephemeral server IPs
- upload binary to genesis then distribute to other nodes (faster)
- improve provisioning error handling for cleanup on partial failure
2026-03-07 14:27:09 +02:00
anonpenguin23
e2b6f7d721 docs: add security hardening and OramaOS deployment docs
- Document WireGuard IPv6 disable, service auth, token security, process isolation
- Introduce OramaOS architecture, enrollment flow, and management via Gateway API
- Add troubleshooting for RQLite/Olric auth, OramaOS LUKS/enrollment issues
2026-02-28 15:41:04 +02:00
anonpenguin23
fd87eec476 feat(security): add manifest signing, TLS TOFU, refresh token migration
- Invalidate plaintext refresh tokens (migration 019)
- Add `--sign` flag to `orama build` for rootwallet manifest signing
- Add `--ca-fingerprint` TOFU verification for production joins/invites
- Save cluster secrets from join (RQLite auth, Olric key, IPFS peers)
- Add RQLite auth config fields
2026-02-28 15:40:43 +02:00
anonpenguin23
a0468461ab feat(sandbox): add reset command and interactive setup
- new `orama sandbox reset` deletes Hetzner resources (IPs, firewall, SSH key) and local config
- interactive location/server type selection during `setup`
- add Hetzner API methods for listing locations/types, deleting resources
- update defaults to nbg1/cx23
2026-02-28 10:14:02 +02:00
anonpenguin23
2f5718146a Fixed builder bug 2026-02-27 15:56:22 +02:00
anonpenguin23
f26676db2c feat: add sandbox command and vault guardian build
- integrate Zig-built vault-guardian into cross-compile process
- add `orama sandbox` for ephemeral Hetzner Cloud clusters
- update docs for `orama node` subcommands and new guides
2026-02-27 15:22:51 +02:00
anonpenguin23
fade8f89ed Added hatzhner support for clustering cli orama to spin up clusters 2026-02-25 15:13:18 +02:00
anonpenguin23
ed4e490463 Fixed bug on rqlite array overflow buffer 2026-02-25 08:37:55 +02:00
anonpenguin23
6898f47e2e Replace sshpass password auth with RootWallet SSH keys
Replaces plaintext password-based SSH authentication (sshpass) across
the entire Go CLI with wallet-derived ed25519 keys via RootWallet.

- Add `rw vault ssh agent-load` command to RootWallet CLI for SSH
  agent forwarding in push fanout
- Create wallet.go bridge: PrepareNodeKeys resolves keys from `rw
  vault ssh get --priv`, writes temp PEMs (0600), zero-overwrites
  on cleanup
- Remove Password field from Node struct, update config parser to
  new 3-field format (env|user@host|role)
- Remove all sshpass branches from inspector/ssh.go and
  remotessh/ssh.go, require SSHKey on all SSH paths
- Add WithAgentForward() option to RunSSHStreaming for hub fanout
- Add PrepareNodeKeys + defer cleanup to all 7 entry points:
  inspect, monitor, push, upgrade, clean, recover, install
- Update push fanout to use SSH agent forwarding instead of sshpass
  on hub
- Delete install/ssh.go duplicate, replace with remotessh calls
- Create nodes.conf from remote-nodes.conf (topology only, no
  secrets)
- Update all config defaults and help text from remote-nodes.conf
  to nodes.conf
- Use StrictHostKeyChecking=accept-new consistently everywhere
2026-02-24 17:24:16 +02:00
anonpenguin23
f0d2621199 Removed extract deploy script 2026-02-24 14:28:11 +02:00
anonpenguin23
c6998b6ac2 Remove legacy deployment and upgrade scripts
- Deleted redeploy.sh, which handled redeployment to nodes in devnet/testnet environments.
- Removed upgrade-nodes.sh, responsible for rolling upgrades of nodes.
- Eliminated upload-source-fanout.sh, which uploaded source archives to nodes in parallel.
- Removed upload-source.sh, used for uploading and extracting source archives to VPS nodes.
2026-02-24 14:24:25 +02:00
anonpenguin23
45a8285ae8 updated version 2026-02-24 10:16:41 +02:00
anonpenguin23
80e26f33fb feat: add sourceUserID to publishedTrack and update TrackAddedData and TrackRemovedData structures 2026-02-24 10:16:27 +02:00
anonpenguin23
25495448ed fix: update test to verify is_active value as 1 instead of TRUE 2026-02-24 09:15:00 +02:00
anonpenguin23
1882876922 chore: update version to 0.112.6 and add Secure field to yamlTURNServer struct 2026-02-24 08:17:43 +02:00
anonpenguin23
7227e5ceb9 updated version 2026-02-24 08:00:21 +02:00
anonpenguin23
7f1c592235 refactor: remove UUID generation from DNS record creation for cleaner inserts 2026-02-24 08:00:15 +02:00
anonpenguin23
72fb5f1a5a feat: add secrets and triggers management to function commands
- Introduced `secrets` command for managing function secrets, including set, list, and delete operations.
- Added `triggers` command for managing PubSub triggers associated with functions, allowing addition, listing, and deletion of triggers.
- Implemented API handlers for secrets management, including setting, listing, and deleting secrets.
- Updated serverless handlers to support new secrets and triggers functionalities.
- Enhanced tests for the new features, ensuring proper functionality and error handling.
2026-02-23 19:18:39 +02:00
anonpenguin23
2fecebc0c2 feat: add upload source scripts for devnet and testnet environments 2026-02-23 17:26:24 +02:00
anonpenguin23
85eb98ed34 feat: add TURN domain configuration and certificate provisioning via Caddy 2026-02-23 16:57:29 +02:00
anonpenguin23
714a986a78 Bump version to 0.112.2 and update TURN server configuration
- Updated version in Makefile to 0.112.2.
- Enhanced SFU server error handling to ignore http.ErrServerClosed.
- Added TURNS (TURN over TLS) configuration options in TURN server and related components.
- Updated firewall rules to include TURNS ports and modified related tests.
- Implemented self-signed certificate generation for TURNS.
- Adjusted TURN server to support both UDP and TCP listeners.
- Updated WebRTC and SFU components to accommodate new TURNS configurations.
2026-02-23 16:32:32 +02:00
anonpenguin23
bcfdabb32d feat: update WebRTC handlers to support dynamic SFU host configuration and add monitoring script 2026-02-23 06:30:57 +02:00
anonpenguin23
3597c61cfc feat: add WebRTC configuration support for gateway instances 2026-02-22 13:11:16 +02:00
anonpenguin23
552fde428e Updated gitignore 2026-02-22 11:42:25 +02:00
anonpenguin23
ca86becf85 Updated version 2026-02-22 11:40:37 +02:00
anonpenguin23
bfff2a241b Updated gitignore 2026-02-22 11:40:32 +02:00
anonpenguin23
3e9ef5ac6c feat: enhance WebRTC port allocation with existing allocation checks and increase upload timeout 2026-02-22 11:39:59 +02:00
anonpenguin
f1dc3014fc
Merge pull request #82 from DeBrosOfficial/nightly-webrtc
feat: implement SFU and TURN server functionality
2026-02-21 18:30:51 +02:00
anonpenguin23
19463b8621 feat: disable HTTP/3 in Caddy to free UDP 443 for TURN server and add patch script 2026-02-21 18:30:28 +02:00
anonpenguin23
a79ae41dd5 feat: implement PubSub trigger management with API endpoints for adding, listing, and removing triggers 2026-02-21 16:26:36 +02:00
anonpenguin23
e4d51676cc feat: add WebRTC feature management commands and public API endpoints for enabling, disabling, and checking status 2026-02-21 13:14:46 +02:00
anonpenguin23
e6f828d6f1 feat: add WebRTC support with SFU and TURN server integration, including configuration, monitoring, and API endpoints 2026-02-21 11:31:20 +02:00
anonpenguin23
8ee606bfb1 feat: implement SFU and TURN server functionality
- Add signaling package with message types and structures for SFU communication.
- Implement client and server message serialization/deserialization tests.
- Enhance systemd manager to handle SFU and TURN services, including start/stop logic.
- Create TURN server configuration and main server logic with HMAC-SHA1 authentication.
- Add tests for TURN server credential generation and validation.
- Define systemd service files for SFU and TURN services.
2026-02-21 11:17:13 +02:00
anonpenguin23
58ea896cb0 Updated makefile 2026-02-21 08:46:41 +02:00
anonpenguin23
d256a83fb7 feat: enhance namespace management with cluster state deletion and improved deprovisioning process 2026-02-21 06:41:19 +02:00
anonpenguin23
c731486454 feat: update version to 0.110.0 and enhance dead node recovery handling with deployment status updates 2026-02-20 10:08:17 +02:00
anonpenguin23
8cabe48f7d feat: enhance WASM upload functionality with replication and error handling 2026-02-20 09:44:13 +02:00
anonpenguin23
c499b2d76e Enhance health checker and deployment handling
- Added support for "degraded" deployment status in types.
- Updated health checker initialization to include process manager and node ID.
- Refactored health checker tests to accommodate new process manager functionality.
- Implemented logic to handle unhealthy deployments, including restart and failure marking.
- Enhanced deployment reconciliation to manage under-replicated scenarios.
- Updated gateway handlers and middleware to consider "degraded" status in deployment queries.
2026-02-20 09:44:07 +02:00
anonpenguin23
4ebf558719 feat: implement suspect node handling with callbacks for DNS record management 2026-02-20 09:27:35 +02:00
anonpenguin23
2b0bfaaa12 feat: enhance deployment scripts with improved error handling and add rolling upgrade functionality 2026-02-20 08:18:53 +02:00
anonpenguin23
a71b979036 feat: add RQLite export/import functionality and related handlers + Deployments DNS Fixes 2026-02-20 07:29:18 +02:00
anonpenguin23
106c2df4d2 feat: implement wallet-based SSH authentication using Ed25519 keys
- Added documentation for wallet-based SSH authentication in WALLET_SSH_AUTH.md.
- Introduced SSH key derivation and management in rootwallet core and CLI.
- Created commands for generating, loading, and unloading SSH keys in the CLI.
- Updated Orama network to support SSH key authentication.
- Added migration steps for nodes to transition from password-based to key-based authentication.

feat: add serverless function management commands

- Implemented function command structure in CLI for managing serverless functions.
- Added commands for initializing, building, deploying, invoking, deleting, and listing functions.
- Created helper functions for handling function configuration and API requests.
- Integrated TinyGo for building functions to WASM.
- Added logging and version management for deployed functions.
2026-02-19 10:51:03 +02:00
anonpenguin23
40600c3557 Enhance PID collection by adding namespace service support and extending timeout for systemd queries 2026-02-19 10:24:49 +02:00
anonpenguin23
aa2da83969 Bump version to 0.109.0 and add tests for TCP port waiting and Olric config YAML parsing 2026-02-19 08:57:32 +02:00
anonpenguin23
bb98418ac9 Unmask and re-enable services before restarting to ensure proper startup 2026-02-19 06:43:28 +02:00
anonpenguin23
b58e1d80ee Implement WireGuard peer authentication and enhance internal request validation 2026-02-19 06:43:06 +02:00
anonpenguin23
4f1709e136 Bug fixing 2026-02-18 11:20:16 +02:00
anonpenguin23
83804422c4 Namespace bug fix and fixing bugs on serverless and deployments 2026-02-17 15:57:32 +02:00
anonpenguin23
8aef779fcd Updated docs and bug fixing 2026-02-17 08:49:16 +02:00
anonpenguin23
0b5b6e68e3 A ton of updates on the monitoring mostly bug fixes 2026-02-16 16:35:29 +02:00
anonpenguin23
f889c2e358 Added some new alerts on monitoring 2026-02-16 11:47:18 +02:00
anonpenguin23
1e38fc2861 Created new monitoring cli interface for nodes, namespaces and cluster 2026-02-16 11:16:02 +02:00
anonpenguin23
88ba08fcba updated makefile 2026-02-16 10:31:37 +02:00
anonpenguin23
865a4f3434 Refactored cli to make things more clear and easy to understand for developers 2026-02-16 10:31:17 +02:00
anonpenguin23
7163aad850 Refactor installation scripts and improve security measures
- Updated `clean-testnet.sh` to stop and disable legacy services.
- Added `upload-source.sh` for streamlined source archive uploads.
- Enhanced password input handling in `ssh.go` for better security.
- Adjusted directory permissions in `validator.go` for improved security.
- Simplified node configuration logic in `config.go`.
- Removed unnecessary commands from `gateway.go` to streamline installation.
2026-02-16 10:01:35 +02:00
anonpenguin23
25a167f9b4 removed script 2026-02-14 14:33:47 +02:00
anonpenguin23
bc9cbb3627 Moved everything to root user and to /opt/orama from home/orama/.orama 2026-02-14 14:33:38 +02:00
anonpenguin23
ef8002bf13 Removed rqlite mcp 2026-02-14 14:14:16 +02:00
anonpenguin23
29d255676f Renamed debros to orama 2026-02-14 14:14:04 +02:00
anonpenguin23
ba4e2688e4 Updated installation process simplified it 2026-02-14 14:06:14 +02:00
anonpenguin23
749d5ed5e7 Bro i did so many things to fix the problematic discovery and redeployment and i dont even remember what i did 2026-02-14 10:56:26 +02:00
anonpenguin23
afbb7d4ede Updated makefile 2026-02-13 16:18:43 +02:00
anonpenguin23
2986e64162 Writing more tests and fixed bug on rqlite address 2026-02-13 16:18:22 +02:00
anonpenguin23
1ab63857d3 Security audit, code cleanup 2026-02-13 14:33:11 +02:00
anonpenguin23
61ccad952a Improved health check , plus bug fixing 2026-02-13 13:40:33 +02:00
anonpenguin23
85a556d0a0 Did a lot of cleanup and bug fixing 2026-02-13 12:47:02 +02:00
anonpenguin23
ed82c8ca6b Cleaned up development environment 2026-02-13 10:33:11 +02:00
anonpenguin23
266507ef09 Auto node recovery and failover if node is dead, added wallet authentication with phantom and root wallet + cluster repair logic 2026-02-13 08:16:01 +02:00
anonpenguin23
5fed8a6c88 Fixed firewall problem with anyone rellay and added authentication with root wallet 2026-02-13 07:38:54 +02:00
anonpenguin23
1d186706f6 Improved collector added anyone on health check 2026-02-12 09:36:07 +02:00
anonpenguin23
83bd495f0f updated makefile 2026-02-12 07:41:01 +02:00
anonpenguin23
5c73330be6 created patch and fixed authentication issue for ipfs bug and cross node communication 2026-02-12 07:40:43 +02:00
anonpenguin23
ee0f035948 Updated makefile 2026-02-11 15:10:54 +02:00
anonpenguin23
b5dfcab1d6 Collector updates and bug fixes + patches scripts created 2026-02-11 15:08:20 +02:00
anonpenguin23
4356f5544a Improved how we present results on inspector and added anyone tests 2026-02-11 11:07:56 +02:00
anonpenguin23
ebdd08f71c updated makefile 2026-02-11 10:36:57 +02:00
anonpenguin23
35ad8bdb16 Added system prompt on inspector 2026-02-11 10:36:40 +02:00
anonpenguin
051c002ec8
Merge pull request #81 from DeBrosOfficial/cleanup/dead-code
Cleanup/dead code
2026-02-11 09:57:34 +02:00
anonpenguin23
fbeecb617a Updated version 2026-02-11 09:57:17 +02:00
anonpenguin23
f3f0716715 added docs about inspector 2026-02-11 09:56:16 +02:00
anonpenguin23
7dc6fecac2 Created inspector , it is hot as fuck 2026-02-11 09:53:46 +02:00
anonpenguin23
eddf0553b7 Did a small refactor, code clean, remove dead code, legacy etc 2026-02-11 07:43:33 +02:00
anonpenguin23
888df0385e Removed dead code 2026-02-11 07:24:27 +02:00
anonpenguin23
b305f562d7 Updated git ignore 2026-02-11 07:12:25 +02:00
anonpenguin23
1fb6f9a13e Improved scripts and updated makefile 2026-02-11 07:09:13 +02:00
anonpenguin23
490c4f66da Moved examples inside docs and added common problems doc 2026-02-11 07:06:52 +02:00
anonpenguin23
91ac56c50a Fixed bug on spawn handler and cluster manager 2026-02-11 06:44:07 +02:00
anonpenguin23
f7db698273 Bug fix on production orchestrator on start and stop 2026-02-10 19:32:08 +02:00
anonpenguin23
a78e09d2b9 Added failover for namespaces 2026-02-10 17:32:29 +02:00
anonpenguin23
359fb5ae04 Updated health check 2026-02-10 16:40:01 +02:00
anonpenguin23
21e82abb65 Fixed WG port issues and production firewall fixes 2026-02-10 09:39:26 +02:00
anonpenguin23
a02c63a7ee updated make file 2026-02-09 15:55:57 +02:00
anonpenguin23
cbdde6ab66 updated makefile 2026-02-09 15:39:18 +02:00
anonpenguin23
af5250ccad Updated goreleaser 2026-02-09 15:39:00 +02:00
anonpenguin23
7a7553f0eb Updated github action 2026-02-09 15:29:22 +02:00
anonpenguin23
d5cfb12435 Updated makefile 2026-02-09 15:23:20 +02:00
anonpenguin23
a297a14b44 Updated docs and bug fixes and updated redeploy script 2026-02-09 15:23:02 +02:00
anonpenguin23
e2b38c409a Fixed bug on limiting to 10 nodes on cluster because of WG 2026-02-09 09:12:08 +02:00
anonpenguin
5d543b2662
Merge pull request #79 from DeBrosOfficial/0.100.0
0.100.0
2026-02-06 14:26:10 +02:00
anonpenguin23
b382350f76 Rate limit fixes 2026-02-06 11:09:34 +02:00
anonpenguin23
7690b22c0a Improved performance on request journey with cache and some tricks 2026-02-06 08:30:11 +02:00
anonpenguin23
3999253685 Create redeploy script with creds 2026-02-06 07:23:28 +02:00
anonpenguin23
854523c3a9 Fixed bugs on pubsub and ipfs 2026-02-06 07:21:26 +02:00
anonpenguin23
02b5c095d0 More bug fixing 2026-02-05 16:12:52 +02:00
anonpenguin23
a7f100038d Fixed system service sudoer error on debros user 2026-02-05 13:32:06 +02:00
anonpenguin23
c855b790f8 Updated the way we spawn services on namespace added systemd 2026-02-04 17:17:01 +02:00
anonpenguin23
f972358e78 Bored of fixing bugs 2026-02-04 16:14:49 +02:00
anonpenguin23
0c4af88388 Updated docs 2026-02-03 17:34:07 +02:00
anonpenguin23
d85ed032f8 Bug fixing 2026-02-03 17:27:36 +02:00
anonpenguin23
156de7eb19 Bug fixing 2026-02-03 13:59:03 +02:00
anonpenguin23
65ffd28151 DNS Bug Fixing Filtering out private WG ip's 2026-02-03 07:01:54 +02:00
anonpenguin23
11d5c1b19a Bug fixing 2026-02-02 16:18:13 +02:00
anonpenguin23
859c30fcd9 Bug fixing 2026-02-02 14:55:29 +02:00
anonpenguin23
79a489d650 Fix ensure only nameservers nodes added on schema for caddy load balancing 2026-02-02 11:17:54 +02:00
anonpenguin23
e95ecfb12a Fixed filter our prviate ips on dns register 2026-02-02 09:31:47 +02:00
anonpenguin23
b43e6d77b7 Fixed zombie rqlite on upgrade 2026-02-02 09:19:02 +02:00
anonpenguin23
e3dd359e55 Bug fixing 2026-02-02 08:39:42 +02:00
anonpenguin23
765ce46ea7 fixed ipfs problem forming cluster 2026-02-01 18:19:43 +02:00
anonpenguin23
3343ade433 New check node health script 2026-02-01 17:36:03 +02:00
anonpenguin23
c7036cb931 Fixed ipfs blocking WG 2026-02-01 17:09:58 +02:00
anonpenguin23
9c52287af9 fixed upload scripts 2026-02-01 17:01:32 +02:00
anonpenguin23
af5f5f9893 WG Fix for IPFS 2026-02-01 16:17:36 +02:00
anonpenguin23
683ce50106 Made building faster 2026-02-01 16:15:37 +02:00
anonpenguin23
c401fdcd74 fixed more bugs and updated docs 2026-02-01 15:58:28 +02:00
anonpenguin23
73dfe22438 fixes 2026-02-01 14:26:36 +02:00
anonpenguin23
4b3b7b3458 updated docs 2026-02-01 12:06:20 +02:00
anonpenguin23
9282fe64ee Deployement updates 2026-02-01 12:01:31 +02:00
anonpenguin23
b5109f1ee8 Added delete namespace handler 2026-01-31 13:13:09 +02:00
anonpenguin23
16eaf9a129 Fixed olric bug 2026-01-31 13:11:26 +02:00
anonpenguin23
8c392194bb Fixed olric cluster problem 2026-01-31 12:14:49 +02:00
anonpenguin23
51371e199d Added self signed cert fallback, fixed dns bugs 2026-01-31 10:07:15 +02:00
anonpenguin23
04f345f9ee Added flags on cli auth login 2026-01-31 07:27:55 +02:00
anonpenguin23
810094771d Updated docs and fixed WG bugs and ip's bugs 2026-01-31 07:09:09 +02:00
anonpenguin23
4acea72467 Added wireguard and updated installation process and added more tests 2026-01-30 15:30:18 +02:00
anonpenguin23
dcaf695fbc Fixed more tests, fixed gateway ip to use domain 2026-01-30 06:30:04 +02:00
anonpenguin23
9a8fba3f47 Fixed some broken tests 2026-01-30 05:35:50 +02:00
anonpenguin23
46aa2f2869 fixed some e2e tests 2026-01-29 15:05:50 +02:00
anonpenguin23
7b12dde469 Fixed dns failover middleware 2026-01-29 13:07:05 +02:00
anonpenguin23
82963c960e Updated docs and added replication and load balancing for deployments 2026-01-29 11:44:50 +02:00
anonpenguin23
d6106bcbb8 Added nyx auto install with anyone relay 2026-01-29 10:23:40 +02:00
anonpenguin23
15ecf366d5 Added Stats for deployments on CLI 2026-01-29 10:13:29 +02:00
anonpenguin23
e706ed3397 Fixed failing unit test on handlers 2026-01-29 09:54:26 +02:00
anonpenguin23
42c0c61d19 Round Robin DNS fix for deployments (update, rollback etc) 2026-01-29 09:53:11 +02:00
anonpenguin23
cd4189f64b Updated testdata for e2e tests 2026-01-29 09:29:41 +02:00
anonpenguin23
d8c93f6ee9 Fixed services on caddy 2026-01-29 08:56:28 +02:00
anonpenguin23
571f8babb4 Fixed IPFS systemd service and deploy issue on nextjs 2026-01-29 08:38:33 +02:00
anonpenguin23
4b24b0aa6c Fixed swarm problem flag and install TUI problem 2026-01-29 08:03:06 +02:00
anonpenguin23
6397efde25 updated cli env to use https 2026-01-29 07:52:59 +02:00
anonpenguin23
29581bec51 refactored all e2e tests 2026-01-29 07:50:40 +02:00
anonpenguin23
81414722cd core dns https issue 2026-01-29 07:45:40 +02:00
anonpenguin23
c3d6500785 fixed cert issue 2026-01-29 07:45:15 +02:00
anonpenguin23
5ec292a4f2 fixed bugs on dns for deployment 2026-01-29 07:22:32 +02:00
anonpenguin23
d4f5f3b999 added more tests 2026-01-28 14:30:28 +02:00
anonpenguin23
c3f87aede7 bug fixing on namespaces 2026-01-28 13:33:15 +02:00
anonpenguin23
7ded21939b fixed test issues 2026-01-28 11:52:58 +02:00
anonpenguin23
edd9c1f3dc namespaces on gateway, load balancer and rqlite and olric namespaces 2026-01-28 11:24:21 +02:00
anonpenguin23
468ca06398 added support for anyone relay with rewards 2026-01-28 08:36:57 +02:00
anonpenguin23
c827651245 fixed mobile not running e2e tests and process update 2026-01-26 15:55:40 +02:00
anonpenguin23
2c374b2156 fixed some bugs on tests and nextjs and nodejs 2026-01-26 15:19:00 +02:00
anonpenguin23
039c246d47 fixed nextjs problem 2026-01-26 15:12:51 +02:00
anonpenguin23
380b10add3 fixing bugs on tests and on codebase 2026-01-26 14:41:26 +02:00
anonpenguin23
1a717537e5 enchanced e2e tests, fixed rqlite issue 2026-01-26 10:04:30 +02:00
anonpenguin23
e94da3a639 Fixed problem on ipfs 2026-01-26 08:52:52 +02:00
anonpenguin23
6c3d16c332 fixed bug on nextjs deployment 2026-01-26 08:10:19 +02:00
anonpenguin23
ec664466c0 Extra tests and a lot of bug fixing 2026-01-26 07:53:35 +02:00
anonpenguin23
6101455f4a bug fixing 2026-01-24 17:37:52 +02:00
anonpenguin23
3d3b0d2ee6 update install and upgrade 2026-01-24 16:42:58 +02:00
anonpenguin23
2281899784 removed executable 2026-01-24 16:03:19 +02:00
anonpenguin23
fb229af2a0 pushed more changes 2026-01-24 16:00:28 +02:00
anonpenguin23
00c9792780 updated docs 2026-01-24 13:18:14 +02:00
anonpenguin23
fc0b958b1e fixed deployments 2026-01-24 12:55:17 +02:00
anonpenguin23
84c9b9ab9b fixes 2026-01-24 11:12:00 +02:00
anonpenguin23
da8c9822f4 Changed from dbn to orama 2026-01-24 09:40:42 +02:00
anonpenguin23
b1011c29b5 added support for different domain except orama.network 2026-01-24 09:26:31 +02:00
anonpenguin23
ec66213e2e updated docs 2026-01-22 18:55:00 +02:00
anonpenguin23
5547c8ccb5 some more fixes 2026-01-22 18:23:37 +02:00
anonpenguin23
1c2bde2d81 fixed ore tests 2026-01-22 18:00:24 +02:00
anonpenguin23
b33da4282b more test fixes 2026-01-22 17:49:10 +02:00
anonpenguin23
903bef14a3 fixed some more tests 2026-01-22 17:13:08 +02:00
anonpenguin23
0a7e3ba3c7 did some fixes 2026-01-22 16:05:03 +02:00
anonpenguin23
c2071586f8 fixed more tests 2026-01-22 15:42:54 +02:00
anonpenguin23
1338b32a0e fixing tests 2026-01-22 15:21:46 +02:00
anonpenguin23
76bbf23f25 fixed test problems 2026-01-22 14:52:50 +02:00
anonpenguin23
0dcde29f7c added some tests 2026-01-22 14:39:50 +02:00
anonpenguin23
9fc9bbb8e5 a lot of changes 2026-01-22 13:04:52 +02:00
anonpenguin
ade6241357
Merge pull request #78 from DeBrosOfficial/nightly
Nightly version 0.9
2026-01-20 10:19:01 +02:00
anonpenguin
d3d1bb98ba
Merge pull request #77 from DeBrosOfficial/big-cleanup
Big cleanup
2026-01-20 10:13:50 +02:00
anonpenguin23
ccee66d525 Merge branch 'big-cleanup' of github-debros:DeBrosOfficial/network into big-cleanup 2026-01-20 10:13:21 +02:00
anonpenguin23
acc38d584a Fixed issue on wallet handler 2026-01-20 10:12:33 +02:00
anonpenguin
c20f6e9a25
Merge branch 'main' into big-cleanup 2026-01-20 10:06:55 +02:00
anonpenguin23
b0bc0a232e Refactored the whole codebase to be much cleaner 2026-01-20 10:03:55 +02:00
anonpenguin
86f73a1d8e
Merge pull request #76 from DeBrosOfficial/0.80.0
0.80.0
2026-01-05 20:00:41 +02:00
anonpenguin23
8c82124e05 Updated cursor rule 2026-01-05 20:00:20 +02:00
anonpenguin23
6f4f55f669 feat: disable debug logging in Rqlite MCP server to reduce disk writes
- Commented out debug logging statements in the Rqlite MCP server to prevent excessive disk writes during operation.
- Added a new PubSubAdapter method in the client for direct access to the pubsub.ClientAdapter, bypassing authentication checks for serverless functions.
- Integrated the pubsub adapter into the gateway for serverless function support.
- Implemented a new pubsub_publish host function in the serverless engine for publishing messages to topics.
2026-01-05 10:25:03 +02:00
anonpenguin23
fff665374f feat: disable debug logging in Rqlite MCP server to reduce disk writes
- Commented out debug logging statements in the Rqlite MCP server to prevent excessive disk writes during operation.
- Added a new PubSubAdapter method in the client for direct access to the pubsub.ClientAdapter, bypassing authentication checks for serverless functions.
- Integrated the pubsub adapter into the gateway for serverless function support.
- Implemented a new pubsub_publish host function in the serverless engine for publishing messages to topics.
2026-01-05 10:22:55 +02:00
anonpenguin23
2b3e6874c8 feat: disable debug logging in Rqlite MCP server to reduce disk writes
- Commented out debug logging statements in the Rqlite MCP server to prevent excessive disk writes during operation.
- Added a new PubSubAdapter method in the client for direct access to the pubsub.ClientAdapter, bypassing authentication checks for serverless functions.
- Integrated the pubsub adapter into the gateway for serverless function support.
- Implemented a new pubsub_publish host function in the serverless engine for publishing messages to topics.
2026-01-03 21:02:35 +02:00
anonpenguin23
cbbf72092d feat: add Rqlite MCP server and presence functionality
- Introduced a new Rqlite MCP server implementation in `cmd/rqlite-mcp`, enabling JSON-RPC communication for database operations.
- Updated the Makefile to include the build command for the Rqlite MCP server.
- Enhanced the WebSocket PubSub client with presence capabilities, allowing members to join and leave topics with notifications.
- Implemented presence management in the gateway, including endpoints for querying current members in a topic.
- Added end-to-end tests for presence functionality, ensuring correct behavior during member join and leave events.
2026-01-03 14:25:13 +02:00
anonpenguin23
9ddbe945fd feat: update mockFunctionRegistry methods for serverless function handling
- Modified the Register method to return a function instance and an error, enhancing its functionality.
- Added a new GetLogs method to the mockFunctionRegistry for retrieving log entries, improving test coverage for serverless function logging.
2026-01-02 08:41:54 +02:00
anonpenguin23
4f893e08d1 feat: enhance serverless function management and logging
- Updated the serverless functions table schema to remove the version constraint for uniqueness, allowing for more flexible function definitions.
- Enhanced the serverless engine to support HTTP fetch functionality, enabling external API calls from serverless functions.
- Implemented logging capabilities for function invocations, capturing detailed logs for better debugging and monitoring.
- Improved the authentication middleware to handle public endpoints more effectively, ensuring seamless access to serverless functions.
- Added new configuration options for serverless functions, including memory limits, timeout settings, and retry parameters, to optimize performance and reliability.
2026-01-02 08:40:28 +02:00
anonpenguin23
df5b11b175 feat: add API examples for Orama Network Gateway
- Introduced a new `example.http` file containing comprehensive API examples for the Orama Network Gateway, demonstrating various functionalities including health checks, distributed cache operations, decentralized storage interactions, real-time pub/sub messaging, and serverless function management.
- Updated the README to include a section on serverless functions using WebAssembly (WASM), detailing the build, deployment, invocation, and management processes for serverless functions.
- Removed outdated debug configuration file to streamline project structure.
2026-01-01 18:53:51 +02:00
anonpenguin23
a9844a1451 feat: add unit tests for gateway authentication and RQLite utilities
- Introduced comprehensive unit tests for the authentication service in the gateway, covering JWT generation, Base58 decoding, and signature verification for Ethereum and Solana.
- Added tests for RQLite cluster discovery functions, including host replacement logic and public IP validation.
- Implemented tests for RQLite utility functions, focusing on exponential backoff and data directory path resolution.
- Enhanced serverless engine tests to validate timeout handling and memory limits for WASM functions.
2025-12-31 12:26:31 +02:00
anonpenguin23
4ee76588ed feat: refactor API gateway and CLI utilities for improved functionality
- Updated the API gateway documentation to reflect changes in architecture and functionality, emphasizing its role as a multi-functional entry point for decentralized services.
- Refactored CLI commands to utilize utility functions for better code organization and maintainability.
- Introduced new utility functions for handling peer normalization, service management, and port validation, enhancing the overall CLI experience.
- Added a new production installation script to streamline the setup process for users, including detailed dry-run summaries for better visibility.
- Enhanced validation mechanisms for configuration files and swarm keys, ensuring robust error handling and user feedback during setup.
2025-12-31 10:48:15 +02:00
anonpenguin23
b3b1905fb2 feat: refactor API gateway and CLI utilities for improved functionality
- Updated the API gateway documentation to reflect changes in architecture and functionality, emphasizing its role as a multi-functional entry point for decentralized services.
- Refactored CLI commands to utilize utility functions for better code organization and maintainability.
- Introduced new utility functions for handling peer normalization, service management, and port validation, enhancing the overall CLI experience.
- Added a new production installation script to streamline the setup process for users, including detailed dry-run summaries for better visibility.
- Enhanced validation mechanisms for configuration files and swarm keys, ensuring robust error handling and user feedback during setup.
2025-12-31 10:16:26 +02:00
anonpenguin23
54aab4841d feat: add network MCP rules and documentation
- Introduced a new `network.mdc` file containing comprehensive guidelines for utilizing the network Model Context Protocol (MCP).
- Documented available MCP tools for code understanding, skill learning, and recommended workflows to enhance developer efficiency.
- Provided detailed instructions on the collaborative skill learning process and user override commands for better interaction with the MCP.
2025-12-29 14:09:48 +02:00
anonpenguin23
ee80be15d8 feat: add network MCP rules and documentation
- Introduced a new `network.mdc` file containing comprehensive guidelines for utilizing the network Model Context Protocol (MCP).
- Documented available MCP tools for code understanding, skill learning, and recommended workflows to enhance developer efficiency.
- Provided detailed instructions on the collaborative skill learning process and user override commands for better interaction with the MCP.
2025-12-29 14:08:58 +02:00
anonpenguin
6740e67d40
Merge pull request #75 from DeBrosOfficial/nightly
chore: update README and configuration for improved clarity and funct…
2025-12-15 14:59:02 +02:00
anonpenguin23
670c3f99df chore: update README and configuration for improved clarity and functionality
- Removed outdated feature list from README for a more concise overview.
- Updated health check instructions and command references in the README.
- Changed `make down` to `make stop` for consistency in stopping the development environment.
- Enhanced the configuration in `config.go` to include additional RQLite and Raft addresses for better node communication.
- Adjusted the build process in the release workflow to ensure all necessary gateway files are included.
2025-12-09 07:23:24 +02:00
DeBros
9f43cea907
Merge pull request #74 from DeBrosOfficial/JohnySigma-patch-1
Update README.md
2025-12-03 12:27:57 +02:00
65286df31e
Update README.md 2025-12-03 12:26:04 +02:00
anonpenguin
b91b7c27ea
Merge pull request #73 from DeBrosOfficial/nightly
Nightly
2025-11-28 22:30:03 +02:00
anonpenguin
432952ed69
Merge pull request #72 from DeBrosOfficial/super
Super
2025-11-28 22:27:52 +02:00
anonpenguin23
9193f088a3 feat: update node and gateway commands to use Orama naming convention
- Renamed the node executable from `node` to `orama-node` in the Makefile and various scripts to reflect the new naming convention.
- Updated the gateway command to `orama-gateway` for consistency.
- Modified service configurations and systemd templates to ensure proper execution of the renamed binaries.
- Enhanced the interactive installer to prompt for the gateway URL, allowing users to select between local and remote nodes.
- Added functionality to extract domain information for TLS configuration, improving security for remote connections.
2025-11-28 22:27:27 +02:00
anonpenguin23
3505a6a0eb feat: update RQLite configuration for direct TLS support
- Modified the RQLite node configuration to use direct TLS on port 7002 when HTTPS is enabled, bypassing SNI gateway conflicts.
- Updated the join address logic to reflect the new direct RQLite TLS connection method.
- Enhanced documentation comments to clarify the changes in TLS handling and port usage for Raft communication.
2025-11-28 15:14:26 +02:00
anonpenguin23
3ca4e1f43b feat: enhance RQLite service startup with TLS certificate readiness
- Added a certificate ready signal to coordinate RQLite node-to-node TLS startup with certificate provisioning.
- Updated the RQLite service generation to include a log file path for better logging management.
- Implemented a timeout mechanism for waiting on TLS certificates, improving error handling during RQLite startup.
2025-11-28 14:26:51 +02:00
anonpenguin23
2fb1d68fcb feat: enhance IPFS integration and swarm key management
- Introduced IPFS peer information handling for improved network discovery and configuration.
- Added validation for the 64-hex swarm key, ensuring proper input during installation.
- Updated the installer to collect and store IPFS peer details, enhancing the setup experience for private networks.
- Enhanced the production setup to configure IPFS peering for better node discovery in private environments.
- Improved documentation to reflect new IPFS-related configuration options and swarm key requirements.
2025-11-28 14:25:31 +02:00
anonpenguin23
7126c4068b feat: enhance HTTPS support and certificate management
- Added a new CertificateManager for managing self-signed certificates, ensuring secure communication within the network.
- Updated the configuration to support self-signed certificates and Let's Encrypt integration for HTTPS.
- Enhanced the installer to generate and manage certificates automatically, improving the setup experience.
- Introduced a centralized TLS configuration for HTTP clients, ensuring consistent security practices across the application.
- Updated documentation to reflect new port requirements and HTTPS setup instructions.
2025-11-27 16:52:49 +02:00
anonpenguin23
681cef999a feat: enhance HTTPS support and certificate management
- Added a new CertificateManager for managing self-signed certificates, ensuring secure communication within the network.
- Updated the configuration to support self-signed certificates and Let's Encrypt integration for HTTPS.
- Enhanced the installer to generate and manage certificates automatically, improving the setup experience.
- Introduced a centralized TLS configuration for HTTP clients, ensuring consistent security practices across the application.
- Updated documentation to reflect new port requirements and HTTPS setup instructions.
2025-11-27 16:49:26 +02:00
anonpenguin23
5c7767b7c8 feat: enhance HTTPS support and certificate management
- Added a new CertificateManager for managing self-signed certificates, ensuring secure communication within the network.
- Updated the configuration to support self-signed certificates and Let's Encrypt integration for HTTPS.
- Enhanced the installer to generate and manage certificates automatically, improving the setup experience.
- Introduced a centralized TLS configuration for HTTP clients, ensuring consistent security practices across the application.
- Updated documentation to reflect new port requirements and HTTPS setup instructions.
2025-11-27 16:48:02 +02:00
anonpenguin23
d8994b1e4f refactor: rename DeBros to Orama and update configuration paths
- Replaced all instances of DeBros with Orama throughout the codebase, including CLI commands and configuration paths.
- Updated documentation to reflect the new naming convention and paths for configuration files.
- Removed the outdated PRODUCTION_INSTALL.md file and added new scripts for local domain setup and testing.
- Introduced a new interactive TUI installer for Orama Network, enhancing the installation experience.
- Improved logging and error handling across various components to provide clearer feedback during operations.
2025-11-26 16:14:19 +02:00
anonpenguin23
b983066016 refactor: rename DeBros to Orama and update configuration paths
- Replaced all instances of DeBros with Orama throughout the codebase, including CLI commands and configuration paths.
- Updated documentation to reflect the new naming convention and paths for configuration files.
- Removed the outdated PRODUCTION_INSTALL.md file and added new scripts for local domain setup and testing.
- Introduced a new interactive TUI installer for Orama Network, enhancing the installation experience.
- Improved logging and error handling across various components to provide clearer feedback during operations.
2025-11-26 15:36:11 +02:00
anonpenguin23
660008b0aa refactor: rename DeBros to Orama and update configuration paths
- Replaced all instances of DeBros with Orama throughout the codebase, including CLI commands and configuration paths.
- Updated documentation to reflect the new naming convention and paths for configuration files.
- Removed the outdated PRODUCTION_INSTALL.md file and added new scripts for local domain setup and testing.
- Introduced a new interactive TUI installer for Orama Network, enhancing the installation experience.
- Improved logging and error handling across various components to provide clearer feedback during operations.
2025-11-26 13:31:02 +02:00
anonpenguin23
775289a1a2 feat: enhance cluster secret management and anyone-client installation verification
- Added a new method to verify the cluster secret in the service.json file, ensuring the correct secret is used during configuration updates.
- Updated the anyone-client installation process to utilize `npx` for improved reliability and added verification steps to confirm successful installation.
- Enhanced logging to provide clearer feedback on cluster secret verification and anyone-client installation status.
2025-11-22 13:31:44 +02:00
anonpenguin23
87059fb9c4 fix: update anyone-client installation command to use scoped package name
- Changed the npm installation command for anyone-client to use the scoped package name `@anyone-protocol/anyone-client`, ensuring correct package retrieval during installation.
2025-11-22 13:10:21 +02:00
anonpenguin23
90a26295a4 feat: add port checking and anyone-client installation to production setup
- Introduced a new `PortChecker` type to verify port availability, enhancing service management during startup.
- Updated the `BinaryInstaller` to install the `anyone-client` npm package globally, ensuring its availability for SOCKS5 proxy functionality.
- Enhanced the `ProductionSetup` to include checks for port usage before starting the `anyone-client` service, improving conflict resolution.
- Added logging for the installation and service creation of `anyone-client`, providing clearer feedback during the setup process.
2025-11-22 13:01:46 +02:00
anonpenguin23
4c1f842939 feat: enhance service shutdown and logging in development environment
- Improved the `stop` target in the Makefile to ensure graceful shutdown of development services, allowing for a more reliable process termination.
- Updated the `StopAll` method in the ProcessManager to provide clearer logging during service shutdown, including progress updates and error handling.
- Added a new `PushNotificationService` to handle sending push notifications via Expo, including bulk notification capabilities and improved error handling.
- Refactored RQLite management to streamline node identification and logging, ensuring consistent behavior across node types during startup and recovery.
2025-11-21 13:52:55 +02:00
anonpenguin23
33ebf222ff feat: enhance development process management and service shutdown
- Introduced a new `stop` target in the Makefile for graceful shutdown of development services, improving user experience during service management.
- Updated the `stopProcess` method in the ProcessManager to check if a process is running before attempting to stop it, enhancing reliability.
- Improved the shutdown logic to wait for a graceful shutdown before forcefully killing processes, providing clearer logging on the shutdown status.
- Enhanced the `dev-kill-all.sh` script to specifically target debros-related processes and improve the cleanup of PID files, ensuring a more thorough shutdown process.
2025-11-16 18:39:45 +02:00
anonpenguin23
2f1ccfa473 feat: normalize wallet address handling in nonce queries
- Updated nonce handling in challenge, verify, and issue API key handlers to normalize wallet addresses to lowercase for case-insensitive comparison.
- Enhanced SQL queries to use LOWER() function for wallet address checks, improving consistency and reliability in nonce validation.
2025-11-16 18:10:08 +02:00
anonpenguin23
6f7b7606b0 refactor: remove RQLite service management and improve Olric client handling
- Eliminated the RQLite service management functions from the ProcessManager, streamlining the service startup and shutdown processes.
- Updated the Gateway to utilize a mutex for thread-safe access to the Olric client, enhancing concurrency handling.
- Refactored cache handler methods to consistently retrieve the Olric client, improving code clarity and maintainability.
- Added a reconnect loop for the Olric client to ensure resilience during connection failures, enhancing overall system reliability.
2025-11-14 17:49:27 +02:00
anonpenguin
adb180932b
Merge pull request #68 from DeBrosOfficial/nightly
Bugs, IPFS, Olric
2025-11-14 08:59:01 +02:00
anonpenguin23
5d6de3b0b8 feat: improve gateway.yaml path handling and Olric client initialization
- Enhanced the DefaultPath function to remember the preferred data path for gateway.yaml, allowing for better error messaging and fallback options.
- Introduced a new function to initialize the Olric client with retry logic, improving resilience during client setup and providing clearer logging for connection attempts.
- Updated logging to provide detailed feedback on Olric client initialization attempts, enhancing troubleshooting capabilities.
2025-11-14 08:56:43 +02:00
anonpenguin23
747be5863b feat: enforce cluster secret requirement for non-bootstrap nodes
- Added documentation for joining additional nodes, specifying the need for the same IPFS Cluster secret as the bootstrap host.
- Updated the production command to require the `--cluster-secret` flag for non-bootstrap nodes, ensuring consistent cluster PSKs during deployment.
- Enhanced error handling to validate the cluster secret format and provide user feedback if the secret is missing or invalid.
- Modified the configuration setup to accommodate the cluster secret, improving security and deployment integrity.
2025-11-14 07:12:03 +02:00
anonpenguin23
358de8a8ad
feat: enhance production service initialization and logging
- Updated the `Phase2cInitializeServices` function to accept bootstrap peers and VPS IP, improving service configuration for non-bootstrap nodes.
- Refactored the `handleProdInstall` and `handleProdUpgrade` functions to ensure proper initialization of services with the new parameters.
- Improved logging to provide clearer feedback during service initialization and configuration, enhancing user experience and troubleshooting capabilities.
2025-11-13 10:26:50 +02:00
anonpenguin23
47ffe817b4
feat: add service enable/disable functionality to production commands
- Introduced new functions to check if a service is enabled and to enable or disable services as needed during production command execution.
- Enhanced the `handleProdStart` and `handleProdStop` functions to manage service states more effectively, ensuring services are re-enabled after being stopped and disabled when stopped.
- Improved logging to provide clear feedback on service status changes, enhancing user experience during service management.
2025-11-13 07:21:22 +02:00
anonpenguin23
7f77836d73
feat: add service enable/disable functionality to production commands
- Introduced new functions to check if a service is enabled and to enable or disable services as needed during production command execution.
- Enhanced the `handleProdStart` and `handleProdStop` functions to manage service states more effectively, ensuring services are re-enabled after being stopped and disabled when stopped.
- Improved logging to provide clear feedback on service status changes, enhancing user experience during service management.
2025-11-12 17:08:24 +02:00
anonpenguin23
1d060490a8
feat: add service enable/disable functionality to production commands
- Introduced new functions to check if a service is enabled and to enable or disable services as needed during production command execution.
- Enhanced the `handleProdStart` and `handleProdStop` functions to manage service states more effectively, ensuring services are re-enabled after being stopped and disabled when stopped.
- Improved logging to provide clear feedback on service status changes, enhancing user experience during service management.
2025-11-12 11:18:50 +02:00
anonpenguin23
0421155594
refactor: improve Olric server configuration logic and enhance bootstrap peer handling
- Updated the logic for determining Olric server addresses in the gateway configuration, differentiating between bootstrap and non-bootstrap nodes for better connectivity.
- Introduced a new function to parse bootstrap host and port from the API URL, improving clarity and flexibility in handling different network configurations.
- Enhanced the handling of IP protocols (IPv4 and IPv6) when constructing bootstrap peer addresses, ensuring compatibility across various network environments.
2025-11-12 10:07:40 +02:00
anonpenguin23
32470052ba
feat: enhance production command handling and configuration management
- Updated the production command to support dynamic IP address extraction from bootstrap peer multiaddrs, improving node connectivity.
- Refactored the configuration generation to include advertised HTTP and Raft addresses based on the node type and bootstrap peers.
- Enhanced error handling and logging for service management commands, ensuring better feedback during installation and upgrades.
- Improved the README documentation with new command examples and clarified usage instructions for production deployment.
2025-11-12 09:14:26 +02:00
anonpenguin23
0ca211c983
refactor: update config paths for gateway.yaml
- Changed the default configuration path for gateway.yaml to prioritize the ~/.debros/data/ directory, ensuring better organization and clarity.
- Updated related functions to reflect the new path structure, maintaining backward compatibility with existing configurations.
- Adjusted service execution commands to align with the new configuration path, enhancing deployment consistency.
2025-11-11 17:08:56 +02:00
anonpenguin23
2b17bcdaa2
refactor: remove RQLite as a separate service management entity
- Updated production command handling to reflect that RQLite is now managed internally by the node process, eliminating the need for separate service definitions and binary paths.
- Adjusted logging and service management functions to streamline operations and improve clarity regarding RQLite's integration.
- Enhanced log file creation to be node-type specific, ensuring only relevant logs are generated based on the node type being installed.
2025-11-11 16:23:26 +02:00
anonpenguin23
c405be3e69
feat: add --ignore-resource-checks option to production commands
- Introduced a new command-line option `--ignore-resource-checks` to skip prerequisite validation for disk, RAM, and CPU during installation and upgrades.
- Updated the `ProductionSetup` struct to include a flag for skipping resource checks, enhancing flexibility for users with specific deployment needs.
- Enhanced logging to inform users when resource checks are skipped, improving transparency during the setup process.
2025-11-11 15:39:51 +02:00
anonpenguin23
c2298e476e
chore: update version to 0.69.2 and refine CLI help output
- Bumped the version number in the Makefile to 0.69.2.
- Removed deprecated environment commands from the CLI main.go file to streamline user experience.
- Enhanced help output for development and production commands, adding new options and clarifying usage instructions.
- Introduced a `--no-pull` option in production commands to skip repository updates during installation and upgrades, improving flexibility for users.
2025-11-11 15:29:23 +02:00
anonpenguin23
ee566d93b7
feat: implement service management during production upgrades
- Added functionality to stop services before upgrading binaries, ensuring a smoother upgrade process.
- Implemented a helper function to extract existing configuration settings from node and gateway config files, preserving critical parameters like bootstrap peers and domain.
- Enhanced logging to provide feedback on preserved configurations during the upgrade process.
2025-11-11 09:46:52 +02:00
anonpenguin23
7c3378a8ec
feat: enhance binary installation and ownership management
- Improved the binary installation process by adding checks for the existence and contents of the source binary directory, ensuring a successful build.
- Implemented individual file copying to avoid issues with wildcard expansion, enhancing reliability during the installation.
- Added ownership correction for directories and files created during service initialization, ensuring proper permissions for the debros user.
- Enhanced error handling for ownership changes, providing detailed output in case of failures.
2025-11-11 09:33:01 +02:00
anonpenguin23
bd4542ef56 fixed test error 2025-11-11 09:18:43 +02:00
anonpenguin23
f88a28b3df
feat: enhance binary installation and ownership management
- Improved the binary installation process by adding checks for the existence and contents of the source binary directory, ensuring a successful build.
- Implemented individual file copying to avoid issues with wildcard expansion, enhancing reliability during the installation.
- Added ownership correction for directories and files created during service initialization, ensuring proper permissions for the debros user.
- Enhanced error handling for ownership changes, providing detailed output in case of failures.
2025-11-11 09:17:45 +02:00
anonpenguin23
b0ac58af3e
feat: add production deployment documentation and service management commands
- Introduced a new section in the README for Production Deployment, detailing prerequisites, installation steps, and service management commands.
- Added commands for starting, stopping, and restarting production services in the CLI, enhancing user control over service management.
- Updated IPFS initialization to configure API, Gateway, and Swarm addresses to avoid port conflicts, improving deployment reliability.
- Enhanced error handling and logging for service management operations, ensuring better feedback during execution.
2025-11-11 09:00:45 +02:00
anonpenguin23
52b3a99bb9
feat: add branch management for production commands
- Introduced `--branch` flag for specifying Git branches (main or nightly) during installation and upgrade processes.
- Implemented validation for branch input and defaulted to 'main' if not specified.
- Enhanced help output to include examples for using the new branch feature.
- Added functionality to save and read branch preferences for future upgrades, improving user experience and flexibility.
2025-11-11 08:45:20 +02:00
anonpenguin23
19bfaff943
feat: enhance binary installation and IPFS configuration management
- Improved the binary installation process by checking if the git repository is already initialized, allowing for updates instead of re-cloning.
- Added error handling for fetching and resetting the repository to ensure the latest changes are applied.
- Enhanced IPFS configuration management by clearing AutoConf placeholders to prevent startup errors, with detailed logging for each cleanup step.
2025-11-11 08:35:40 +02:00
anonpenguin23
b58b632be9
feat: enhance gateway configuration handling with optional config flag
- Added support for a `--config` flag in the gateway configuration parser to allow absolute or relative paths for the config file.
- Improved error handling for determining the config path, ensuring robust loading of `gateway.yaml` from specified locations.
- Updated related functions to maintain backward compatibility while enhancing flexibility in configuration management.
2025-11-11 08:15:48 +02:00
anonpenguin23
a33d03c6b2
feat: enhance configuration handling for IPFS and cluster initialization
- Updated `select_data_dir_check` to handle both absolute and relative config paths, improving flexibility in configuration file management.
- Enhanced `DefaultPath` to check for config files in both legacy and production directories, ensuring backward compatibility.
- Modified `InitializeIPFSClusterConfig` to include cluster secret management and improve error handling during initialization.
- Added functionality to update the cluster secret in the service.json configuration file, enhancing security and configurability.
2025-11-11 08:04:48 +02:00
anonpenguin23
6ba0a824e0
feat: enhance binary installation process for RQLite and IPFS
- Added error handling for copying the RQLite binary to ensure successful installation.
- Updated IPFS installation to follow official steps, including downloading, extracting, and verifying the installation of Kubo.
- Improved logging for each installation step and ensured the PATH is updated for the current process.
- Added checks to verify the existence of downloaded files and installation scripts, enhancing robustness.
2025-11-11 07:43:03 +02:00
anonpenguin23
d5e28bb694 fixed test error 2025-11-11 07:14:41 +02:00
anonpenguin23
72ba75d16b
feat: implement binary resolution for systemd service generation
- Added a new method `ResolveBinaryPath` to locate required executables in the system PATH and specified extra paths.
- Updated `InitializeIPFSRepo` and `Phase5CreateSystemdServices` methods to utilize the new binary resolution logic for IPFS, IPFS Cluster, RQLite, and Olric services.
- Modified service generation functions to accept binary paths as parameters, ensuring correct executable paths are used in systemd unit files.
2025-11-11 07:13:36 +02:00
anonpenguin23
b896e37e09
fix: improve disk space check logic in ResourceChecker
- Updated CheckDiskSpace method to validate disk space against the parent directory if the specified path does not exist.
- Enhanced error handling to ensure accurate reporting of disk space validation failures.
2025-11-11 07:00:39 +02:00
anonpenguin23
b1732b2cbe
refactor: simplify flag parsing in TestProdCommandFlagParsing
- Removed unused `--force` and `--domain` flags from the test case to streamline the flag parsing logic.
- Updated the test to focus on essential flags, enhancing clarity and maintainability.
2025-11-11 06:52:31 +02:00
anonpenguin23
badaa920d9
feat: enhance production command handling and configuration generation
- Added comprehensive tests for production command flag parsing to ensure correct handling of bootstrap, VPS IP, and peer configurations.
- Updated production command help output to clarify the usage of new flags, including `--vps-ip` and `--bootstrap-join`.
- Modified the configuration generation logic to incorporate the new `bootstrapJoin` parameter for secondary bootstrap nodes.
- Enhanced systemd service generation to include the correct advertise IP and join address for non-bootstrap nodes.
- Implemented tests for RQLite service generation to verify the inclusion of join addresses and advertise IPs in the generated units.
2025-11-11 06:51:28 +02:00
anonpenguin23
ed80b5b023
feat: implement resource validation checks for production deployment
- Added a new ResourceChecker type to validate system resources including disk space, RAM, and CPU cores.
- Implemented CheckDiskSpace, CheckRAM, and CheckCPU methods to ensure minimum requirements are met for production deployment.
- Integrated resource checks into the ProductionSetup's Phase1CheckPrerequisites method to enhance deployment reliability.
- Updated systemd service generation to log output to specific log files instead of the journal for better log management.
2025-11-11 06:14:05 +02:00
anonpenguin23
e9bf94ba96
feat: implement resource validation checks for production deployment
- Added a new ResourceChecker type to validate system resources including disk space, RAM, and CPU cores.
- Implemented CheckDiskSpace, CheckRAM, and CheckCPU methods to ensure minimum requirements are met for production deployment.
- Integrated resource checks into the ProductionSetup's Phase1CheckPrerequisites method to enhance deployment reliability.
- Updated systemd service generation to log output to specific log files instead of the journal for better log management.
2025-11-11 05:44:40 +02:00
anonpenguin23
52a726ffd4
fix: update expected port count in TestPortChecker
- Adjusted the expected port count in the TestPortChecker test from 22 to 44 to align with the current RequiredPorts configuration.
2025-11-11 05:28:20 +02:00
anonpenguin23
efa26e6ec8
feat: enhance development environment topology and configuration
- Introduced a new topology structure to manage multiple bootstrap and node configurations, allowing for a more flexible development environment.
- Updated Makefile and help commands to reflect the addition of a second bootstrap and fourth node.
- Enhanced health checks to require a minimum of three healthy nodes for RQLite and LibP2P connectivity.
- Refactored service management to dynamically handle multiple nodes and their respective configurations.
- Improved logging and configuration file generation for better clarity and maintainability.
2025-11-11 05:26:43 +02:00
anonpenguin23
239fb2084b
feat: enhance Raft log index retrieval and data directory management
- Improved the `getRaftLogIndex` method to accurately report the Raft log index by incorporating fallback logic to read persisted snapshot metadata when the RQLite status is unavailable or returns zero.
- Added a new method `getPersistedRaftLogIndex` to read the highest Raft log index from snapshot metadata files, ensuring accurate reporting even before RQLite starts.
- Centralized the data directory path resolution logic in `rqliteDataDirPath`, simplifying the codebase and enhancing maintainability.
2025-11-10 16:24:05 +02:00
anonpenguin23
5463df73d5 fixed test error 2025-11-10 15:38:33 +02:00
anonpenguin23
0ea58354ca
feat: enhance E2E testing and dependency management
- Added new E2E tests for authentication, cache operations, and IPFS interactions to improve coverage and reliability.
- Introduced concurrency tests for cache operations to validate performance under load.
- Updated `go.mod` to include `github.com/mattn/go-sqlite3` as a dependency for database interactions.
- Refined Makefile to simplify E2E test execution and configuration discovery.
- Removed outdated client E2E tests and consolidated related functionality for better maintainability.
2025-11-10 15:36:58 +02:00
anonpenguin23
263fbbb8b4
feat: implement Raft state management for cluster recovery
- Added methods to check for existing Raft state and clear it if necessary, allowing for a clean join to the cluster.
- Enhanced automatic recovery logic to detect stale Raft state and clear it when peers have higher log indexes.
- Improved logging for Raft state operations to provide better visibility during cluster management.
2025-11-10 08:51:33 +02:00
anonpenguin23
a72aebc1fe
feat: add script for graceful shutdown and process cleanup
- Introduced a new script `dev-kill-all.sh` to handle graceful shutdown of development processes and cleanup of stale PID files.
- Updated Makefile to include a `kill` command that utilizes the new script for improved process management.
- Enhanced the shutdown process to verify that required ports are free after termination of processes.
2025-11-10 08:29:34 +02:00
anonpenguin23
80ea58848b
feat: add script for graceful shutdown and process cleanup
- Introduced a new script `dev-kill-all.sh` to handle graceful shutdown of development processes and cleanup of stale PID files.
- Updated Makefile to include a `kill` command that utilizes the new script for improved process management.
- Enhanced the shutdown process to verify that required ports are free after termination of processes.
2025-11-10 08:08:43 +02:00
anonpenguin23
687316b8d6 fixed 2025-11-10 06:43:54 +02:00
anonpenguin23
170665bf02
feat: add script for graceful shutdown and process cleanup
- Introduced a new script `dev-kill-all.sh` to handle graceful shutdown of development processes and cleanup of stale PID files.
- Updated Makefile to include a `kill` command that utilizes the new script for improved process management.
- Enhanced the shutdown process to verify that required ports are free after termination of processes.
2025-11-10 06:41:44 +02:00
anonpenguin23
17fc78975d
refactor: reorder production installation phases and enhance service initialization
- Adjusted the installation sequence to generate secrets before initializing services, ensuring necessary keys are in place.
- Updated service initialization to account for both bootstrap and node variants, improving service status reporting.
- Enhanced error handling during IPFS repo and cluster path initialization, providing clearer feedback on failures.
- Captured the node peer ID for logging after secret generation, improving visibility during production setup.
2025-11-10 06:03:40 +02:00
anonpenguin23
6a86592cad
refactor: streamline development and production command structure
- Consolidated development commands into a new `dev` command group for better organization.
- Introduced a `prod` command group to manage production environment operations.
- Updated Makefile to simplify the development environment setup and improve logging.
- Enhanced README to clarify the development process and health check requirements.
- Removed deprecated configuration and service management commands to streamline the CLI interface.
2025-11-10 05:34:50 +02:00
abcf9a42eb fixed ipfs error 2025-11-09 19:52:23 +02:00
anonpenguin
a9af0d2f2d
Merge pull request #69 from DeBrosOfficial/super-magic-updates
Super magic updates
2025-11-09 19:20:51 +02:00
anonpenguin23
0b24c66d56
works 2025-11-09 19:20:08 +02:00
anonpenguin23
f991d55676 fixes 2025-11-09 18:30:03 +02:00
anonpenguin23
0388c3a766
refactor: streamline development and production command structure
- Consolidated development commands into a new `dev` command group for better organization.
- Introduced a `prod` command group to manage production environment operations.
- Updated Makefile to simplify the development environment setup and improve logging.
- Enhanced README to clarify the development process and health check requirements.
- Removed deprecated configuration and service management commands to streamline the CLI interface.
2025-11-09 18:28:24 +02:00
anonpenguin23
c726dfc401 feat: update IPFS configuration and enhance cluster secret management
- Changed default IPFS API URL to port 5001 for better compatibility.
- Enhanced the initialization process for IPFS and Cluster by adding support for bootstrap peers.
- Introduced user prompts for cluster secret and swarm key generation, improving user experience during setup.
- Updated service configuration to dynamically determine paths based on existing configuration files.
2025-11-08 13:29:21 +02:00
anonpenguin23
a5c30d0141 feat: update IPFS configuration and enhance cluster secret management
- Changed default IPFS API URL to port 5001 for better compatibility.
- Enhanced the initialization process for IPFS and Cluster by adding support for bootstrap peers.
- Introduced user prompts for cluster secret and swarm key generation, improving user experience during setup.
- Updated service configuration to dynamically determine paths based on existing configuration files.
2025-11-08 12:59:54 +02:00
anonpenguin23
93b25c42e4 feat: enhance IPFS configuration and logging in CLI
- Added IPFS cluster API and HTTP API configuration options to node and bootstrap configurations.
- Improved the generation of IPFS-related URLs and parameters for better integration.
- Enhanced error logging in cache handlers to provide more context on failures during cache operations.
2025-11-08 11:59:38 +02:00
anonpenguin23
50f7abf376 feat: enhance IPFS configuration and logging in CLI
- Added IPFS cluster API and HTTP API configuration options to node and bootstrap configurations.
- Improved the generation of IPFS-related URLs and parameters for better integration.
- Enhanced error logging in cache handlers to provide more context on failures during cache operations.
2025-11-07 16:51:08 +02:00
anonpenguin23
5b21774e04 feat: add cache multi-get handler and improve API key extraction
- Implemented a new cacheMultiGetHandler to retrieve multiple keys from the Olric cache in a single request.
- Enhanced the extractAPIKey function to prioritize the X-API-Key header and improve handling of non-JWT Bearer tokens.
- Updated routes to include the new multi-get endpoint for cache operations.
2025-11-07 10:33:25 +02:00
anonpenguin
05ca685eee
Merge pull request #67 from DeBrosOfficial/ipfs
Ipfs & olric
2025-11-06 06:26:05 +02:00
anonpenguin23
a7d21d4217 remove docs files 2025-11-06 06:25:41 +02:00
anonpenguin23
fbdfa23c77 feat: enhance IPFS and Cluster integration in setup
- Added automatic setup for IPFS and IPFS Cluster during the network setup process.
- Implemented initialization of IPFS repositories and Cluster configurations for each node.
- Enhanced Makefile to support starting IPFS and Cluster daemons with improved logging.
- Introduced a new documentation guide for IPFS Cluster setup, detailing configuration and verification steps.
- Updated changelog to reflect the new features and improvements.
2025-11-05 17:32:18 +02:00
anonpenguin23
d00290d278 feat: enhance IPFS and Cluster integration in setup
- Added automatic setup for IPFS and IPFS Cluster during the network setup process.
- Implemented initialization of IPFS repositories and Cluster configurations for each node.
- Enhanced Makefile to support starting IPFS and Cluster daemons with improved logging.
- Introduced a new documentation guide for IPFS Cluster setup, detailing configuration and verification steps.
- Updated changelog to reflect the new features and improvements.
2025-11-05 17:30:25 +02:00
anonpenguin23
69d7ccf4c7 feat: enhance IPFS and Cluster integration in setup
- Added automatic setup for IPFS and IPFS Cluster during the network setup process.
- Implemented initialization of IPFS repositories and Cluster configurations for each node.
- Enhanced Makefile to support starting IPFS and Cluster daemons with improved logging.
- Introduced a new documentation guide for IPFS Cluster setup, detailing configuration and verification steps.
- Updated changelog to reflect the new features and improvements.
2025-11-05 10:52:40 +02:00
anonpenguin23
d6009bb33f feat: enhance IPFS and Cluster integration in setup 08:16:27
- Added automatic setup for IPFS and IPFS Cluster during the network setup process.
  - Implemented initialization of IPFS repositories and Cluster configurations for each node.
  - Enhanced Makefile to support starting IPFS and Cluster daemons with improved logging.
  - Introduced a new documentation guide for IPFS Cluster setup, detailing configuration and verification steps.
  - Updated changelog to reflect the new features and improvements.
2025-11-05 09:01:55 +02:00
anonpenguin23
cf26c1af2c feat: integrate Olric distributed cache support
- Added Olric cache server integration, including configuration options for Olric servers and timeout settings.
- Implemented HTTP handlers for cache operations: health check, get, put, delete, and scan.
- Enhanced Makefile with commands to run the Olric server and manage its configuration.
- Updated README and setup scripts to include Olric installation and configuration instructions.
- Introduced tests for cache handlers to ensure proper functionality and error handling.
2025-11-05 07:31:50 +02:00
anonpenguin23
3196e91e85
feat: integrate Olric distributed cache support
- Added Olric cache server integration, including configuration options for Olric servers and timeout settings.
- Implemented HTTP handlers for cache operations: health check, get, put, delete, and scan.
- Enhanced Makefile with commands to run the Olric server and manage its configuration.
- Updated README and setup scripts to include Olric installation and configuration instructions.
- Introduced tests for cache handlers to ensure proper functionality and error handling.
2025-11-03 15:30:08 +02:00
anonpenguin
42131c0e75
Merge pull request #65 from DeBrosOfficial/nightly
Nightly
2025-11-03 08:39:19 +02:00
anonpenguin23
5e7d59c7a1 fix: adjust connection timeout and remove debug logging for ephemeral ports
- Increased the connection timeout from 15 seconds to 20 seconds for improved reliability during peer connections.
- Removed debug logging that filtered out ephemeral port addresses to streamline the logging process.
2025-11-03 08:11:20 +02:00
anonpenguin23
11ce4f2a53 feat: add pre-commit hook for automatic changelog updates
- Introduced a pre-commit hook that updates the changelog if there are code changes, excluding commits that only modify the changelog or Makefile.
- Added user confirmation for proceeding with the commit after displaying the changelog preview.
- Enhanced the update_changelog.sh script to differentiate between pre-commit and pre-push contexts for better change analysis.
2025-11-03 07:34:42 +02:00
anonpenguin23
d3543ac3ab chore: update changelog and version to 0.53.16 2025-11-03 07:32:51 +02:00
anonpenguin23
2b51859ea7 fix: enhance changelog update logic to prevent infinite loops
- Added checks to skip changelog updates if the only unpushed commit is a changelog update commit.
- Improved handling of multiple unpushed commits by excluding the latest changelog commit from the diff analysis.
- Cleaned up temporary changelog preview files when no other changes are detected.
2025-11-03 07:32:42 +02:00
anonpenguin23
3ba7e88e4e chore: update changelog and version to 0.53.15 2025-11-03 07:31:53 +02:00
anonpenguin23
952132de8e chore: update changelog and version to 0.53.15 2025-11-03 07:31:08 +02:00
anonpenguin23
31e01df940 chore: update changelog and version to 0.53.14 2025-11-03 07:30:38 +02:00
anonpenguin23
9093c8937e feat: enhance bootstrap peer handling and configuration validation
- Updated DefaultBootstrapPeers function to prioritize environment variable settings for bootstrap peers, allowing for dynamic configuration.
- Added tests to ensure non-empty default bootstrap peers and validate the correct handling of bootstrap peer configurations.
- Introduced a helper function to generate valid configurations for different node types, improving test clarity and maintainability.
- Enhanced the isPrivateOrLocalHost function to properly handle IPv6 addresses, ensuring accurate host validation.
2025-11-03 07:30:27 +02:00
anonpenguin23
2088b6a0cf chore: update changelog and version to 0.53.14 2025-11-03 07:24:52 +02:00
anonpenguin23
3d02663e27 fix: ensure correct repository context in pre-push hook
- Updated the pre-push hook to change the directory to the repository root before staging CHANGELOG.md and Makefile, ensuring the commands execute in the correct context.
2025-11-03 07:24:36 +02:00
anonpenguin23
a17255e6b4 chore: automate changelog and version commit in pre-push hook
- Enhanced the pre-push hook to automatically stage and commit changes to CHANGELOG.md and Makefile, streamlining the version update process.
- Added error handling to ensure the push proceeds even if the commit fails due to no changes.
2025-11-03 07:24:06 +02:00
anonpenguin23
09c903dd14 refactor: update date handling in update_changelog.sh
- Replaced the static date field in the changelog entry with a programmatically generated date, improving accuracy and reducing manual errors.
- Removed the date validation step, streamlining the script's functionality and ensuring consistency in date formatting.
2025-11-03 07:22:46 +02:00
anonpenguin23
a895726cbd fix: improve user confirmation handling in pre-push hook
- Updated the pre-push hook to read user confirmation directly from /dev/tty, ensuring it works correctly in all terminal contexts.
- This change enhances the reliability of the push confirmation process, preventing potential issues with user input in non-interactive environments.
2025-11-03 07:21:44 +02:00
anonpenguin23
f1fcbf69cf refactor: enhance update_changelog.sh with diff counting and logging
- Added functionality to count and log the number of unstaged, staged, and unpushed changes for better visibility of the git state.
- Improved logging to provide clearer feedback on the current status of changes before generating the changelog.
2025-11-03 07:20:50 +02:00
anonpenguin23
c282cf57d6 refactor: enhance OpenRouter API key handling in update_changelog.sh
- Removed hardcoded API key assignment and implemented loading from a .env file for better security and flexibility.
- Added error handling to guide users on setting the API key through environment variables or a .env file.
- Improved API response handling and error reporting for clearer feedback on potential issues with the API key.
2025-11-03 07:19:35 +02:00
anonpenguin23
4ec47fa7ef refactor: simplify JSON payload construction in update_changelog.sh
- Improved the construction of the JSON request body for the OpenRouter API by using a here-document for better readability and maintainability.
- Ensured proper escaping of the prompt content to prevent issues with special characters in the API request.
2025-11-03 07:17:18 +02:00
anonpenguin23
6abe43ddc6 fix: update OpenRouter API key assignment in update_changelog.sh
- Changed the assignment of OPENROUTER_API_KEY to a hardcoded value for immediate use, removing the environment variable fallback.
- This change simplifies the script's usage for users who may not have the environment variable set.
2025-11-03 07:15:46 +02:00
anonpenguin23
7fe56f11d5 feat: enhance update_changelog.sh with API key handling and error reporting
- Updated the script to allow setting the OpenRouter API key via an environment variable, improving flexibility.
- Added HTTP headers for better API request context.
- Enhanced error reporting to provide clearer feedback on API errors and potential key issues.
2025-11-03 07:15:08 +02:00
anonpenguin23
909be0f18f feat: add git hook installation script and update Makefile
- Introduced a new script `install-hooks.sh` to automate the installation of git hooks from the `.githooks` directory to the `.git/hooks` directory.
- Updated the Makefile to include a new `install-hooks` target for easy execution of the hook installation process.
- Modified the pre-push hook to correctly reference the repository root directory.
2025-11-03 07:13:26 +02:00
anonpenguin23
6e59b17c6a feat: enhance pre-push hook with changelog preview and user confirmation
- Updated the pre-push hook to display a preview of the changelog and the new version before proceeding with the push.
- Added color-coded output for better visibility and user experience.
- Implemented user confirmation to abort the push if the changelog preview is not approved.
- Cleaned up temporary files created during the changelog update process.
2025-11-03 07:11:47 +02:00
anonpenguin23
69fd6e32f1 feat: add script to automate changelog updates
- Introduced a new script `update_changelog.sh` that automates the process of generating and updating the changelog based on git diffs.
- The script checks for necessary dependencies, validates the current git state, and interacts with the OpenRouter API to generate changelog entries.
- It updates the version in the Makefile and inserts the new changelog entry into `CHANGELOG.md` while ensuring proper formatting and error handling.
2025-11-03 07:10:36 +02:00
anonpenguin23
30d18aca02 feat: add RQLite command support and help documentation
- Introduced a new RQLite command in the CLI to handle RQLite-related operations.
- Implemented the 'fix' subcommand to automatically repair common RQLite cluster issues, including correcting misconfigured join addresses and cleaning stale raft state.
- Updated help documentation to include RQLite commands and their usage.
2025-11-03 07:10:25 +02:00
anonpenguin23
ed7f4ae3d9 fix: update RQLite join address to use port 5001
- Changed the RQLite join address from "localhost:7001" to "localhost:5001" in multiple locations, including node configuration and test cases.
- Ensured consistency across configuration generation and validation tests to reflect the updated join address.
2025-10-31 20:48:45 +02:00
anonpenguin23
f71ef8e60b refactor: streamline repository removal and directory setup in cloneAndBuild function
- Updated the repository removal process to always use root, with a fallback to the 'debros' user if necessary.
- Added error handling for ensuring the 'debros' home directory exists and setting its ownership.
- Improved clarity in error messages for directory setup failures.
2025-10-31 20:09:34 +02:00
anonpenguin23
6e80ff28b4 refactor: improve repository removal and directory setup in cloneAndBuild function
- Changed the repository removal process to use the 'debros' user to avoid permission issues, with a fallback to root if necessary.
- Added a delay to ensure filesystem sync after removing the repository.
- Ensured the parent directory exists and has the correct permissions, including setting ownership to the 'debros' user.
2025-10-31 20:04:17 +02:00
anonpenguin23
58224826d2 chore: update version to 0.53.10 in Makefile 2025-10-31 19:58:31 +02:00
anonpenguin23
6f30514974 refactor: streamline repository management in cloneAndBuild function
- Removed existing repository if it exists to ensure a fresh start.
- Simplified the cloning process by directly cloning the repository without checking for existing branches.
- Enhanced error handling for cloning, copying binaries, and setting permissions, providing clearer feedback on failures.
2025-10-31 19:58:05 +02:00
anonpenguin23
13e05609e0 chore: update version to 0.53.9 in Makefile and enhance HTTPS configuration prompts in setup.go
- Updated the version number in the Makefile to 0.53.9.
- Improved the interactive prompts for domain name input and DNS verification in the setup.go file, streamlining the process for enabling HTTPS configuration.
2025-10-31 19:44:31 +02:00
anonpenguin23
8a7ae4ad6f feat: add HTTPS configuration options and server setup
- Introduced new configuration fields for enabling HTTPS, specifying a domain name, and setting a TLS cache directory in the gateway configuration.
- Enhanced the main server logic to support HTTPS with ACME integration, including automatic HTTP to HTTPS redirection and error handling for server startup.
- Added validation for HTTPS settings to ensure proper domain and cache directory configuration.
- Implemented interactive prompts in the CLI for domain and HTTPS setup, including DNS verification and port availability checks.
2025-10-31 19:32:13 +02:00
anonpenguin23
f2d6254b7b chore: remove example files for Go and TypeScript SDK
- Deleted basic usage example in Go, TypeScript package.json, README.md, tsconfig.json, and client.ts to streamline the examples directory and remove outdated content.
2025-10-31 19:24:10 +02:00
anonpenguin23
5b05f52162 chore: update version to 0.53.6 in Makefile and add IP extraction utility for multiaddr in setup.go 2025-10-31 15:12:44 +02:00
anonpenguin23
042e516b8c chore: update version to 0.53.5 in Makefile and enhance setup command with peer ID retrieval and VPS IPv4 detection 2025-10-31 14:50:20 +02:00
anonpenguin
cc74a8f135
Merge pull request #64 from DeBrosOfficial/nightly
feat: enhance service management and configuration options
2025-10-31 14:36:04 +02:00
anonpenguin23
168808b007 chore: update version to 0.53.3 in Makefile 2025-10-31 14:35:13 +02:00
anonpenguin23
c326711d7c feat: enhance service management and configuration options
- Updated service startup logic to include a helper function for starting or restarting services, improving reliability and clarity in service management.
- Added new configuration options for cluster synchronization, peer inactivity limits, and minimum cluster size in the config_commands.go file, enhancing cluster management capabilities.
2025-10-31 14:34:03 +02:00
anonpenguin
685295551c
Merge pull request #63 from DeBrosOfficial/nightly
feat: add Go build cache directory to setupDirectories function
2025-10-31 14:26:23 +02:00
anonpenguin23
ebe2706ad8 feat: add Go build cache directory to setupDirectories function
- Included a new directory for the Go build cache in the setupDirectories function to enhance the Go environment setup.
2025-10-31 14:24:57 +02:00
anonpenguin
ca00561da1
Merge pull request #62 from DeBrosOfficial/nightly
chore: update version and enhance database connection configuration
2025-10-31 13:17:08 +02:00
anonpenguin23
7b7087e5eb chore: update version to 0.53.1 in Makefile 2025-10-31 12:12:40 +02:00
anonpenguin23
c5d3dd1f6d feat: enhance Go module cache setup in CLI
- Added Go module cache directory to the setupDirectories function for improved Go environment configuration.
- Updated cloneAndBuild function to set HOME environment variable, ensuring proper module cache creation during build process.
2025-10-31 12:12:27 +02:00
anonpenguin23
2aead48045 feat: enhance RQLite manager with improved logging and data directory management
- Added structured logging for RQLite components, including cluster discovery and leadership processes.
- Introduced methods for preparing the data directory and launching the RQLite process, improving code organization.
- Implemented exponential backoff for leadership checks to reduce log noise and improve reliability.
- Enhanced peer health tracking and membership update logic to streamline cluster synchronization and recovery.
2025-10-31 11:53:50 +02:00
anonpenguin23
8f82dc7ca3 feat: enhance RQLite cluster discovery and recovery mechanisms
- Introduced TriggerPeerExchange method to facilitate manual peer exchange for RQLite metadata.
- Implemented performPreStartClusterDiscovery to ensure coordinated recovery by building peers.json before RQLite startup.
- Added validation for node ID consistency with raft address during RQLite startup.
- Enhanced logging for cluster recovery processes and peer discovery progress.
- Updated cluster synchronization logic to improve reliability during node recovery scenarios.
2025-10-31 11:41:20 +02:00
anonpenguin23
ea5ef6bc1a feat: implement dynamic cluster discovery and validation for RQLite nodes
- Added ClusterDiscoveryService to manage peer discovery and synchronization for RQLite nodes.
- Introduced new configuration options for cluster synchronization intervals, peer inactivity limits, and minimum cluster size.
- Enhanced validation logic to ensure proper configuration of cluster parameters.
- Implemented metrics collection for cluster health and peer status, improving monitoring capabilities.
- Updated RQLiteManager to integrate with the new discovery service, allowing for dynamic leadership and cluster joining logic.
2025-10-31 10:46:52 +02:00
anonpenguin23
f561bc5311 refactor: improve Anon installation script for terms acceptance
- Updated the installation process to rely on debconf preseed and file-based acceptance methods, reducing the need for interactive prompts.
- Limited the number of "yes" responses piped during installation to enhance reliability and prevent infinite loops.
- Streamlined the command execution for fetching and running the installation script from GitHub.
2025-10-31 08:42:07 +02:00
anonpenguin23
624f92bf11 updated version 2025-10-31 08:37:12 +02:00
anonpenguin23
8538e2eb3f feat: streamline Anon installation with automated terms acceptance
- Implemented pre-acceptance of Anon terms in both the setup and installation scripts to eliminate interactive prompts.
- Enhanced the installation process by creating necessary directories and files to ensure terms are accepted before installation.
- Updated the installation command to use a non-interactive frontend, improving reliability during package installation.
2025-10-31 08:36:59 +02:00
anonpenguin23
472b7c10bb feat: automate terms acceptance in Anon configuration and installation
- Added automatic acceptance of terms in the Anon configuration file to streamline the setup process.
- Updated the installation script to pre-accept terms, eliminating interactive prompts during installation.
- Enhanced output messages to reflect the auto-accepted terms for better user awareness.
2025-10-31 08:24:32 +02:00
anonpenguin23
ede253afae feat: enhance Anon installation process with Ubuntu version check and improved error handling
- Added a check for unsupported Ubuntu version 25.04, providing informative messages if installation is skipped.
- Updated the installation method to use the official script from GitHub, ensuring a cleaner installation process.
- Implemented cleanup of old APT repository files and GPG keys before installation.
- Enhanced error handling for enabling and starting the Anon service, including output of command errors for better debugging.
2025-10-31 08:05:59 +02:00
anonpenguin23
45dde89175 feat: add branch selection prompt in setup process
- Introduced a new promptBranch function to allow users to select between 'main' and 'nightly' branches during the setup.
- Updated cloneAndBuild function to use the selected branch for cloning and pulling updates, enhancing flexibility in repository management.
- Implemented logic to switch branches if the current branch differs from the selected one, ensuring the correct branch is used.
2025-10-31 07:38:30 +02:00
anonpenguin23
d672f01b30 chore: bump version to 0.52.17 in the Makefile 2025-10-31 07:36:06 +02:00
anonpenguin23
56dc6892de chore: update version and enhance database connection configuration
- Bumped version from 0.52.15 to 0.52.16 in the Makefile.
- Added connection pool configuration with timeouts and limits in the RQLite adapter and gateway, improving database connection management.
2025-10-31 07:34:27 +02:00
anonpenguin
a4b4b8f0df
Merge pull request #61 from DeBrosOfficial/nightly
Nightly
2025-10-30 13:11:53 +02:00
anonpenguin23
061b17de4f feat: improve configuration generation in setup process
- Added checks to prevent overwriting existing node.yaml and gateway.yaml files during configuration generation.
- Enhanced error handling for bootstrap.yaml creation, providing informative messages based on the existence of files.
- Implemented conditional renaming of bootstrap.yaml to node.yaml, ensuring it only occurs if node.yaml does not already exist.
- Updated output messages for clarity on configuration readiness and existing file usage.
2025-10-30 13:10:57 +02:00
anonpenguin23
351ce086bf feat: enhance anonProxyHandler to handle binary data safely
- Added Base64 encoding for the response body in the anonProxyHandler to prevent corruption of binary data when returned in JSON format.
- Updated the response structure to include the encoded body, ensuring compatibility with various data types.
2025-10-30 09:00:24 +02:00
anonpenguin23
fe16d503b5 feat: integrate Anyone Relay (Anon) into the development environment
- Added support for installing and configuring the Anyone Relay (Anon) for anonymous networking in the setup process.
- Updated the Makefile to include the Anon client in the development stack, allowing it to run alongside other services.
- Implemented a new HTTP proxy handler for the Anon service, enabling proxied requests through the Anyone network.
- Enhanced the installation script to manage Anon installation, configuration, and firewall settings.
- Introduced tests for the Anon proxy handler to ensure proper request validation and error handling.
- Updated documentation to reflect the new Anon service and its usage in the development environment.
2025-10-30 06:21:32 +02:00
anonpenguin
fe05240362
Merge pull request #60 from DeBrosOfficial/nightly
Nightly
2025-10-29 08:24:57 +02:00
ad088bd476 feat: enhance API key management and ownership recording in verifyHandler
- Implemented logic to ensure an API key is created or retrieved for each wallet during the verification process.
- Added best-effort recording of ownership for both API keys and wallets in the namespace ownership database.
- Improved error handling and logging for better traceability of ownership checks and API key operations.
- Cleaned up unnecessary comments and whitespace in the auth_handlers.go file for better code readability.
2025-10-29 06:53:51 +02:00
c208ff3288 feat: enhance signature verification for multiple blockchain types
- Added support for verifying signatures from both Ethereum (ETH) and Solana (SOL) blockchains in the verifyHandler.
- Introduced a new ChainType field in the request to specify the blockchain type, defaulting to ETH for backward compatibility.
- Implemented Ed25519 signature verification for Solana, including base64 decoding of signatures and base58 decoding of public keys.
- Enhanced error handling for unsupported chain types and invalid signature formats, improving robustness of the verification process.
2025-10-28 19:19:31 +02:00
0f0237b5ea
feat: implement asynchronous libp2p publishing in pubsub handler
- Updated the pubsubPublishHandler to publish messages to libp2p asynchronously, preventing HTTP response blocking.
- Introduced context with timeout for libp2p publishing to enhance reliability and logging for success and failure cases.
- Maintained immediate response for local delivery to WebSocket subscribers, improving overall message handling efficiency.
2025-10-28 10:25:38 +02:00
8dc71e7920 feat: implement local pub/sub delivery for WebSocket subscribers
- Added local subscriber management to the Gateway for direct message delivery to WebSocket clients.
- Introduced synchronization mechanisms to handle concurrent access to local subscribers.
- Enhanced pubsub handlers to register and unregister local subscribers, improving message delivery efficiency.
- Updated message publishing logic to prioritize local delivery before forwarding to libp2p, ensuring faster response times for local clients.
2025-10-27 17:30:40 +02:00
5930c9d832
feat: enhance pubsub functionality with namespace isolation and handler management
- Implemented namespace isolation in pubsub handlers to ensure message segregation.
- Refactored subscription management to support multiple handlers per topic, allowing independent lifecycles for each handler.
- Introduced a unique HandlerID for each subscription, enabling better management of handler registrations and unsubscriptions.
- Updated message handling to broadcast to all registered handlers, improving message delivery efficiency.
2025-10-27 16:37:25 +02:00
3f3ef9d1ac Revert "feat: enhance setup process with firewall configuration"
This reverts commit 030ea88cf6dafd274f077cc87d3bdd5b968dc33e.
2025-10-27 10:29:00 +02:00
anonpenguin23
36b69047cd
updated makefile 2025-10-27 10:20:35 +02:00
anonpenguin23
572912ce98
Merge remote-tracking branch 'origin/main' into nightly 2025-10-27 09:57:10 +02:00
anonpenguin23
dbf8660941
feat: enhance configuration generation in initFullStack
- Added steps to generate node2.yaml, node3.yaml, and gateway.yaml configurations during the full stack initialization process.
- Implemented checks to prevent overwriting existing configuration files unless the --force flag is used.
- Improved output messages to provide clear feedback on generated configurations and bootstrap information.
2025-10-27 09:00:49 +02:00
anonpenguin23
030ea88cf6
feat: enhance setup process with firewall configuration
- Added a new step to configure the UFW firewall during the setup process, ensuring necessary ports are opened for SSH, P2P, and Gateway API.
- Updated the setup command output to reflect the new firewall configuration step.
- Refactored the setup logic to maintain proper sequence and clarity in the setup steps.
- Modified the installation script to update the documentation link for better user guidance.
2025-10-26 12:55:32 +02:00
anonpenguin23
71d6c292d9
updated makefile 2025-10-26 11:39:10 +02:00
anonpenguin23
e96271e28c
feat: enhance debros user setup and sudoers configuration
- Added functionality to create the 'debros' user if it does not exist during setup.
- Implemented a mechanism to configure passwordless sudo access for the 'debros' user, including validation of the sudoers rule.
- Updated setup command output to guide users on accessing the 'debros' user.
2025-10-26 11:38:31 +02:00
anonpenguin23
879ba1f2e6
fix: update supported OS versions and improve binary copy command
- Added Ubuntu 25.04 to the list of supported operating systems in the setup command.
- Modified the binary copy command to use a shell command for improved compatibility and functionality.
2025-10-26 11:27:31 +02:00
anonpenguin23
ddebb03aa6
chore: update version and enhance bootstrap configuration in setup
- Incremented version in Makefile to 0.52.7.
- Refactored the `generateConfigsInteractive` function to streamline the setup for single-node VPS configurations.
- Removed user prompts for bootstrap peers and join address, simplifying the configuration process.
- Added explicit commands for generating bootstrap and gateway configurations with improved error handling and output messages.
2025-10-26 11:20:10 +02:00
anonpenguin23
a9ac3fcb83
feat: enhance setup command with validation and refactor
- Added validation functions for multiaddr and host:port formats to improve user input handling during setup.
- Refactored the setup command steps for clarity and consistency, ensuring proper sequence in the setup process.
- Removed the `initializeEnvironments` function and its related logic to streamline the setup flow.
- Updated the cloning process to use a shallow clone for efficiency.
- Enhanced service configuration to use environment variables for better management.
2025-10-26 10:45:28 +02:00
anonpenguin23
3b4d43f808
feat: enhance setup command with validation and refactor
- Added validation functions for multiaddr and host:port formats to improve user input handling during setup.
- Refactored the setup command steps for clarity and consistency, ensuring proper sequence in the setup process.
- Removed the `initializeEnvironments` function and its related logic to streamline the setup flow.
- Updated the cloning process to use a shallow clone for efficiency.
- Enhanced service configuration to use environment variables for better management.
2025-10-26 10:39:19 +02:00
anonpenguin23
0ebce77429
updated makefile 2025-10-26 07:02:54 +02:00
anonpenguin23
c315cd4a86
feat: enhance installation script for persistent Go setup
- Updated `setup.go` to add Go binary path to the current process and the `debros` user's `.bashrc` for persistent availability.
- Implemented error handling for updating `.bashrc` and ensured proper ownership of the file.
- Refined `install-debros-network.sh` to improve OS detection, dependency checks, and installation flow, including downloading the latest release of `network-cli` from GitHub.
- Streamlined the installation process with clearer logging and error messages, enhancing user experience.
2025-10-26 07:02:25 +02:00
anonpenguin23
1bc6292db3
chore: streamline GoReleaser configuration to build only network-cli binary
- Updated `.goreleaser.yaml` to focus solely on building the `network-cli` binary, removing configurations for other binaries (node, gateway, identity).
- Adjusted archive settings to reflect changes in the build process, resulting in cleaner and smaller release packages.
- Updated version in `Makefile` to 0.52.3-beta and documented changes in `CHANGELOG.md`.
2025-10-26 06:47:17 +02:00
anonpenguin23
d59b65e0b4
chore: update GitHub Actions to use latest artifact actions and add release script
- Upgraded `actions/upload-artifact` and `actions/download-artifact` to version 4 in the release workflow for improved functionality.
- Introduced a new `release.sh` script to manage the complete release workflow, including versioning, branch checks, and tagging for both stable and nightly releases.
2025-10-26 06:42:49 +02:00
anonpenguin23
795ab01dca
updated changelog 2025-10-26 06:32:32 +02:00
anonpenguin23
43c0caaf7f
feat: overhaul GoReleaser configuration and CLI structure
- Updated `.goreleaser.yaml` to reflect the new project name and added multi-platform binary builds for `network-cli`, `node`, `gateway`, and `identity`.
- Enhanced the CLI by modularizing commands into separate packages for better maintainability and clarity.
- Introduced a comprehensive environment management system, allowing users to switch between local, devnet, and testnet environments seamlessly.
- Added interactive setup commands for VPS installation, improving user experience and installation flow.
- Updated the installation script to be APT-ready, providing clear instructions for users and ensuring a smooth setup process.
- Enhanced documentation and changelog to reflect the new features and improvements.
2025-10-26 06:30:44 +02:00
anonpenguin23
f0576846bc
ypdate 2025-10-25 16:46:08 +03:00
anonpenguin23
33a13db44d
fix: enforce interactive mode requirement in installation script
- Added a check to ensure the script is run in an interactive terminal, providing clear error messages and instructions if not.
- Removed non-interactive mode handling for user creation, streamlining the user experience and ensuring necessary prompts are displayed.
- Updated instructions for re-running the script after user creation to enhance clarity.
2025-10-25 16:12:36 +03:00
anonpenguin23
46d69baf63
fix: enhance user switching logic in installation script for non-interactive mode
- Added a check to skip re-execution of the script as the 'debros' user when running in non-interactive mode.
- Ensured that the installation can proceed as root without switching users in non-interactive scenarios, improving usability.
2025-10-25 16:04:58 +03:00
anonpenguin23
38e77c79c6
feat: enhance debros user creation in installation script for non-interactive mode
- Added support for non-interactive mode to automatically create the 'debros' user without user prompts.
- Implemented passwordless login for the 'debros' user in non-interactive mode.
- Retained interactive prompts for user creation when not in non-interactive mode, improving user experience and flexibility.
2025-10-25 16:01:44 +03:00
anonpenguin23
e5a71ba295
fix: improve user prompt in installation script for debros user creation
- Updated the user creation prompt to use `read -rp` for better user experience by allowing inline input without a newline.
- Ensured clarity in the prompt message for creating the 'debros' user.
2025-10-25 15:58:08 +03:00
anonpenguin23
6bce9f23d0
chore: remove domain configuration and ACME TLS support from gateway
- Removed the `Domain` field from the gateway configuration to simplify setup.
- Eliminated related logic for domain validation and ACME certificate management.
- Updated installation script to remove references to ACME certificate storage and HTTP/HTTPS port configurations.
- Bumped version in Makefile to 0.52.0-beta to reflect changes.
2025-10-25 15:52:47 +03:00
anonpenguin23
ecc5f3241a
feat: improve user setup and installation flow in debros network script
- Added functionality to check and create the 'debros' user if it does not exist, with options for password setup or passwordless login.
- Enhanced user switching logic to ensure the script runs as the 'debros' user or prompts for necessary actions.
- Updated the installation script to provide clearer instructions for user switching and installation continuation.
- Refined existing checks and improved error handling for a smoother installation experience.
2025-10-25 15:41:29 +03:00
anonpenguin23
a626982636
feat: enhance installation script to support user switching and directory setup
- Updated the installation directory to a specific path (`/home/debros`) for better organization.
- Added a function to check and switch to the 'debros' user if not already running as that user.
- Improved user creation logic to ensure the 'debros' user is set up correctly with the appropriate home directory.
- Enhanced directory setup to create necessary subdirectories and set permissions accordingly.
2025-10-25 14:49:55 +03:00
anonpenguin23
6ec4f7f903
refactor: update installation script to use user home directory
- Changed the installation directory from `/opt/debros` to the user's home directory for improved flexibility.
- Updated systemd service configurations to reflect the new installation path for both node and gateway services.
- Ensured that read/write paths are aligned with the new installation directory.
2025-10-25 14:40:45 +03:00
anonpenguin
2cbc3034e8
Merge pull request #59 from DeBrosOfficial/domain-proxy
feat: enhance update mode in installation script to generate missing …
2025-10-25 14:36:52 +03:00
anonpenguin23
82d7dc2f2a
feat: enhance update mode in installation script to generate missing configuration files
- Added logic to check for the presence of essential configuration files during update mode.
- If missing, the script now generates the necessary `bootstrap.yaml` and `gateway.yaml` files to ensure proper setup.
2025-10-25 14:35:13 +03:00
anonpenguin
000f32f5e5
Merge pull request #58 from DeBrosOfficial/domain-proxy
feat: add domain configuration and ACME TLS support for gateway
2025-10-25 14:28:33 +03:00
anonpenguin23
8ba3c838e9
Updated script branch to nightly 2025-10-25 14:28:11 +03:00
anonpenguin23
d2b671b335
feat: add domain configuration and ACME TLS support for gateway
- Introduced a new `Domain` field in the gateway configuration to support HTTPS and ACME certificate provisioning.
- Implemented domain validation to ensure proper format.
- Enhanced the main gateway logic to handle ACME challenges and manage TLS certificates using CertMagic.
- Updated installation script to create necessary directories for ACME certificate storage and configure firewall rules for HTTP/HTTPS ports.
2025-10-25 13:45:53 +03:00
anonpenguin
f8c81ff3a1
Merge pull request #57 from DeBrosOfficial/nightly
Fix: Use config file instead of data directory in systemd service
2025-10-25 13:07:30 +03:00
anonpenguin23
802f058345
chore: update CHANGELOG and version for v0.51.9-beta release
- Added new entries to CHANGELOG.md for the one-command `make dev` target and full stack initialization features.
- Updated version in Makefile from 0.51.7-beta to 0.51.9-beta to reflect the latest changes.
2025-10-25 13:07:04 +03:00
anonpenguin
5939cf413e
Merge branch 'main' into nightly 2025-10-25 13:05:00 +03:00
4bd91ae83e Fix: Use config file instead of data directory in systemd service 2025-10-25 12:19:31 +03:00
anonpenguin
6ce999650f
Merge pull request #56 from DeBrosOfficial/super-fixes
Super fixes
2025-10-25 11:33:55 +03:00
anonpenguin23
a9d624c0f6
refactor: enhance DeBros network installation script
- Updated script to support a complete DeBros network node installation with gateway.
- Improved user management by introducing a variable for the debros user.
- Added support for idempotent updates and secure systemd service management for both node and gateway services.
- Replaced the configuration wizard with automated configuration file generation using network-cli.
- Enhanced firewall configuration instructions and service management commands for better usability.
2025-10-25 08:40:06 +03:00
anonpenguin23
7c9851729e
chore: update .gitignore and CHANGELOG for new development features
- Added .dev/ directory to .gitignore to exclude development process files.
- Updated CHANGELOG.md with new entries for the one-command `make dev` target, full stack initialization, and improved configuration management.
- Simplified README instructions for generating configuration files and starting the complete network stack.
2025-10-25 08:19:31 +03:00
f4a6d98a03
Merge pull request #55 from DeBrosOfficial/nightly
chore: update changelog for v0.51.6 release
2025-10-24 14:20:34 +03:00
cce5326368 chore: update changelog for v0.51.6 release
- Added entry for LibP2P NAT support under version 0.51.6
- Created new unreleased section at top of changelog for future updates
- Maintained Keep a Changelog format with standard sections (Added, Changed, Deprecated, etc.)
2025-10-24 14:19:21 +03:00
c0eeabe496
Merge pull request #54 from DeBrosOfficial/nightly
Nat Fixes
2025-10-24 14:17:17 +03:00
a1050a02db
Merge pull request #53 from DeBrosOfficial/nat-feat
Nat feat
2025-10-24 14:15:51 +03:00
ffde028694 feat: add LibP2P NAT support and bump version to 0.51.6-beta
- Added LibP2P support for NAT traversal to improve peer connectivity
- Updated version from 0.51.5-beta to 0.51.6-beta
- Updated CHANGELOG.md to document the new NAT support feature
2025-10-24 13:47:25 +03:00
c770968507 feat: added support for NAT on LibP2P 2025-10-24 13:41:38 +03:00
anonpenguin
ba3c1fadc9
Merge pull request #52 from DeBrosOfficial/nightly
Nightly
2025-10-24 11:19:37 +03:00
anonpenguin
b0c8c8c5f4
Merge pull request #51 from DeBrosOfficial/config-validation
Config validation
2025-10-24 11:14:22 +03:00
anonpenguin23
b8af8e0c98
Refactor configuration handling in CLI and node package. Updated default config file naming based on node type and enhanced gateway config generation to include bootstrap peers. Improved data directory path handling by expanding environment variables and user home directory. 2025-10-24 11:13:21 +03:00
anonpenguin23
83c498892c
Update CHANGELOG.md to include new entries for version 0.51.5, highlighting the addition of YAML file validation and a new authentication command in the CLI. 2025-10-24 11:05:34 +03:00
anonpenguin23
0717296822
Update configuration management and documentation. Added commands for generating and validating configuration files in the CLI, ensuring strict YAML decoding and improved error handling. Updated README to reflect new configuration paths and filesystem permissions. Enhanced Makefile to streamline node and gateway startup processes. 2025-10-24 11:03:50 +03:00
anonpenguin23
8a9deb50ec
Enhance README with detailed authentication commands and flow. Introduced explicit commands for managing credentials, improved descriptions of authentication features, and added environment variable support for gateway URL configuration. 2025-10-24 10:02:03 +03:00
anonpenguin23
60affaec5c
Enhance configuration validation for nodes and gateways, implementing strict YAML decoding to reject unknown fields. Added comprehensive validation checks for node types, listen addresses, database settings, and discovery parameters. Updated README with configuration validation details and examples. 2025-10-24 10:01:53 +03:00
anonpenguin23
279c03df82
Enhance configuration validation for nodes and gateways, implementing strict YAML decoding to reject unknown fields. Added comprehensive validation checks for node types, listen addresses, database settings, and discovery parameters. Updated README with configuration validation details and examples. 2025-10-24 09:52:18 +03:00
anonpenguin
b98409e268
Merge pull request #50 from DeBrosOfficial/nightly
Updated changelog
2025-10-22 09:52:06 +03:00
anonpenguin23
553797ab18
Updated changelog 2025-10-22 09:48:29 +03:00
anonpenguin
76ca6ec84d
Merge pull request #49 from DeBrosOfficial/nightly
Bug fixing
2025-10-22 09:47:24 +03:00
anonpenguin23
fc8a1545c8
Update default bootstrap peers in configuration to include additional nodes for improved discovery. 2025-10-22 08:44:06 +03:00
anonpenguin23
a21655b35a
Update version in Makefile to 0.51.2-beta 2025-10-22 08:43:09 +03:00
anonpenguin
64ca6c2f99
Merge pull request #48 from DeBrosOfficial/bug-fixes
Bug fixes
2025-10-22 08:42:17 +03:00
anonpenguin
83306ac5e4
Merge branch 'nightly' into bug-fixes 2025-10-22 08:41:59 +03:00
anonpenguin23
3694a2de93
Update CHANGELOG.md for version 0.51.2, enhance API key extraction to support query parameters, and implement internal auth context in status and storage handlers. 2025-10-22 08:41:15 +03:00
anonpenguin23
229e769755
Enhance gateway configuration by adding RQLiteDSN support and updating default connection settings. Updated config parsing to include RQLiteDSN from YAML and environment variables. Changed default RQLite connection URL from port 4001 to 5001. 2025-10-22 08:34:42 +03:00
anonpenguin
dd90db0215
Merge pull request #47 from DeBrosOfficial/nightly
Nightly
2025-10-22 07:21:38 +03:00
anonpenguin23
6d6c73dc33
Changed versions and changelog 2025-10-22 07:18:21 +03:00
anonpenguin
a9d4c1e0d6
Merge pull request #46 from DeBrosOfficial/discovery-bug-fix
Update node configuration and enhance peer discovery protocol
2025-10-22 07:15:34 +03:00
anonpenguin23
f372f2f5dc
Changed bootstrap peers 2025-10-22 07:15:01 +03:00
anonpenguin23
3f63194c22
Update node configuration and enhance peer discovery protocol
- Changed the configuration file for run-node3 to use node3.yaml.
- Modified select_data_dir function to require a hasConfigFile parameter and added error handling for missing configuration.
- Updated main function to pass the config path to select_data_dir.
- Introduced a peer exchange protocol in the discovery package, allowing nodes to request and exchange peer information.
- Refactored peer discovery logic in the node package to utilize the new discovery manager for active peer exchange.
- Cleaned up unused code related to previous peer discovery methods.
2025-10-22 07:13:47 +03:00
anonpenguin
889735f8d0
Merge pull request #42 from DeBrosOfficial/nightly
Peer ID Fixes and Identity v0.51.0
2025-09-26 09:38:59 +03:00
anonpenguin23
2eb4db3ddb
Update CHANGELOG.md 2025-09-26 07:56:05 +03:00
anonpenguin
587cb3dc11
Merge pull request #41 from DeBrosOfficial/peer-id-identity
Peer id identity fixes
2025-09-26 07:55:16 +03:00
anonpenguin23
b6db781ce2
- Added identity/main.go to generate identity and peer id
- Added encryption module identity.go for reusable identity create, save etc funtions
- Updated make file to support identity/main.go
- Updated node/node.go on loadOrCreateIdentity to use encryption.identity
- Updated cli/main.go to remove fallbacks for identity
- Updated install-debros-network.sh script to use new ./cmd/identity and fixed port order on print
- Updated makefile and changelog
2025-09-26 07:53:20 +03:00
anonpenguin23
5d951daaf8
Updated changelog 2025-09-23 07:50:09 +03:00
anonpenguin
b5fc5cff4b
Merge pull request #38 from DeBrosOfficial/nightly
Fixed wrong URL /v1/db to /v1/rqlite
2025-09-23 07:46:26 +03:00
anonpenguin23
ad1b389a53
Updated make file 2025-09-23 07:43:23 +03:00
anonpenguin23
3b08a91de3
Fixed wrong URL /v1/db to /v1/rqlite 2025-09-23 07:42:34 +03:00
anonpenguin
c1486028da
Merge pull request #37 from DeBrosOfficial/nightly
Storage Refactoring
2025-09-23 07:25:24 +03:00
anonpenguin23
f676659139
Update CHANGELOG.md 2025-09-23 07:22:49 +03:00
anonpenguin
05f2e61822
Merge pull request #36 from DeBrosOfficial/storage-refactor
Storage refactor
2025-09-23 07:20:50 +03:00
anonpenguin23
c0d8fcb895
- Created namespace_helpers on gateway
- Removed old pkg/gatway storage and migrated to new rqlite
- Updated readme
- Created new rqlite implementation
- Updated changelog
- Fixed migration error on migrations.go applySQL
2025-09-23 07:19:35 +03:00
anonpenguin23
16845b758d
- Remoevd old storage folder
- Created new rqlite folder
- Created rqlite adapter, client, gateway, migrations and rqlite init
- Updated node.go to support new rqlite architecture
- Updated readme
- Updated version
2025-09-23 06:00:57 +03:00
f46e9661eb
Merge pull request #35 from DeBrosOfficial/nightly
Nightly
2025-09-22 17:50:08 +03:00
anonpenguin23
c613dbd0ee
Updated changelog 2025-09-22 17:47:25 +03:00
anonpenguin
31920f504e
Merge pull request #34 from DeBrosOfficial/anyone-updates
Anyone updates
2025-09-22 17:43:43 +03:00
anonpenguin23
42598b1123
Removed anyone proxy from libp2p, anyone will be added
Updated readme to include all options for .yaml files
Added gateway.yaml file for gateway default configurations
2025-09-22 17:38:18 +03:00
anonpenguin23
25935fd3b1
Removed unused command setup-production-security.sh 2025-09-20 13:28:44 +03:00
anonpenguin23
ef0a6d5891 Update CHANGELOG.md 2025-09-20 13:06:48 +03:00
anonpenguin23
fc735c57b3 Update Makefile 2025-09-20 13:05:57 +03:00
anonpenguin
fd677e0290
Merge pull request #32 from DeBrosOfficial/bootstrap-peers
Added default bootstrap peers on config.go
2025-09-20 10:08:48 +03:00
anonpenguin23
3236e48725 Added default bootstrap peers on config.go 2025-09-20 10:07:32 +03:00
anonpenguin
5da956ab9d
Merge pull request #30 from DeBrosOfficial/port-change
Updated Gateway port from 8080/8005 to 6001 - Added Gateway port on
2025-09-20 08:18:47 +03:00
anonpenguin23
66f10df2e1 - Updated Gateway port from 8080/8005 to 6001 - Added Gateway port on
install-debros-network.sh
2025-09-20 08:15:31 +03:00
DeBros
fcbf043aca
Update README.md 2025-09-20 06:38:43 +03:00
DeBros
d866afbecf
Update README.md 2025-09-19 06:24:32 +03:00
anonpenguin23
fdd6dd2db3 Initialize changelog sections for unreleased and v0.43.4 versions 2025-09-18 15:32:06 +03:00
anonpenguin23
a9093355d8 Bump version to 0.42.4-beta and update repo URL 2025-09-18 15:31:03 +03:00
anonpenguin
44498ff381
Merge pull request #19 from DeBrosOfficial/convert-gitdebros
replaced git.debros.io with github.com
2025-09-18 15:29:43 +03:00
11 changed files with 408 additions and 99 deletions

View File

@ -1 +1 @@
0.122.45
0.122.47

View File

@ -39,19 +39,6 @@ func parseTURNConfig(logger *logging.ColoredLogger) *turn.Config {
}
}
type yamlCfg struct {
ListenAddr string `yaml:"listen_addr"`
TURNSListenAddr string `yaml:"turns_listen_addr"`
PublicIP string `yaml:"public_ip"`
Realm string `yaml:"realm"`
AuthSecret string `yaml:"auth_secret"`
RelayPortStart int `yaml:"relay_port_start"`
RelayPortEnd int `yaml:"relay_port_end"`
Namespace string `yaml:"namespace"`
TLSCertPath string `yaml:"tls_cert_path"`
TLSKeyPath string `yaml:"tls_key_path"`
}
data, err := os.ReadFile(configPath)
if err != nil {
logger.ComponentError(logging.ComponentTURN, "Config file not found",
@ -60,26 +47,13 @@ func parseTURNConfig(logger *logging.ColoredLogger) *turn.Config {
os.Exit(1)
}
var y yamlCfg
if err := config.DecodeStrict(strings.NewReader(string(data)), &y); err != nil {
cfg, err := decodeTURNConfig(data)
if err != nil {
logger.ComponentError(logging.ComponentTURN, "Failed to parse TURN config", zap.Error(err))
fmt.Fprintf(os.Stderr, "Configuration parse error: %v\n", err)
os.Exit(1)
}
cfg := &turn.Config{
ListenAddr: y.ListenAddr,
TURNSListenAddr: y.TURNSListenAddr,
PublicIP: y.PublicIP,
Realm: y.Realm,
AuthSecret: y.AuthSecret,
RelayPortStart: y.RelayPortStart,
RelayPortEnd: y.RelayPortEnd,
Namespace: y.Namespace,
TLSCertPath: y.TLSCertPath,
TLSKeyPath: y.TLSKeyPath,
}
if errs := cfg.Validate(); len(errs) > 0 {
fmt.Fprintf(os.Stderr, "\nTURN configuration errors (%d):\n", len(errs))
for _, e := range errs {
@ -98,3 +72,50 @@ func parseTURNConfig(logger *logging.ColoredLogger) *turn.Config {
return cfg
}
// decodeTURNConfig strictly decodes the TURN YAML the namespace spawner writes
// (yaml.Marshal of turn.Config) into a turn.Config. The yamlCfg struct MUST
// carry every yaml-tagged field turn.Config marshals — DecodeStrict rejects
// unknown keys, so a missing field crashes the TURN binary at startup.
// Extracted (no os.Exit) so the spawner-output ↔ parser contract is unit-
// testable (see config_test.go).
func decodeTURNConfig(data []byte) (*turn.Config, error) {
type yamlCfg struct {
ListenAddr string `yaml:"listen_addr"`
TURNSListenAddr string `yaml:"turns_listen_addr"`
PublicIP string `yaml:"public_ip"`
Realm string `yaml:"realm"`
AuthSecret string `yaml:"auth_secret"`
RelayPortStart int `yaml:"relay_port_start"`
RelayPortEnd int `yaml:"relay_port_end"`
Namespace string `yaml:"namespace"`
TLSCertPath string `yaml:"tls_cert_path"`
TLSKeyPath string `yaml:"tls_key_path"`
// feat-124 stealth TURNS-over-:443: second cert served by SNI.
StealthDomain string `yaml:"stealth_domain"`
TLSStealthCertPath string `yaml:"tls_stealth_cert_path"`
TLSStealthKeyPath string `yaml:"tls_stealth_key_path"`
}
var y yamlCfg
if err := config.DecodeStrict(strings.NewReader(string(data)), &y); err != nil {
return nil, err
}
return &turn.Config{
ListenAddr: y.ListenAddr,
TURNSListenAddr: y.TURNSListenAddr,
PublicIP: y.PublicIP,
Realm: y.Realm,
AuthSecret: y.AuthSecret,
RelayPortStart: y.RelayPortStart,
RelayPortEnd: y.RelayPortEnd,
Namespace: y.Namespace,
TLSCertPath: y.TLSCertPath,
TLSKeyPath: y.TLSKeyPath,
StealthDomain: y.StealthDomain,
TLSStealthCertPath: y.TLSStealthCertPath,
TLSStealthKeyPath: y.TLSStealthKeyPath,
}, nil
}

View File

@ -0,0 +1,60 @@
package main
import (
"testing"
"github.com/DeBrosOfficial/network/pkg/turn"
"gopkg.in/yaml.v3"
)
// TestDecodeTURNConfig_acceptsSpawnerOutput is the regression guard for the
// feat-124 crash: the namespace spawner writes the TURN config via
// yaml.Marshal(turn.Config), and the TURN binary parses it with a STRICT
// decoder. If turn.Config gains a yaml field the parser doesn't know, strict
// decode rejects it and TURN crash-loops at startup. This pins that the
// spawner's exact output round-trips through the parser, including the stealth
// fields.
func TestDecodeTURNConfig_acceptsSpawnerOutput(t *testing.T) {
src := turn.Config{
ListenAddr: "0.0.0.0:3478",
TURNSListenAddr: "0.0.0.0:5349",
PublicIP: "203.0.113.7",
Realm: "orama-devnet.network",
AuthSecret: "secret",
RelayPortStart: 49152,
RelayPortEnd: 49951,
Namespace: "anchat-test",
TLSCertPath: "/x/turn-cert.pem",
TLSKeyPath: "/x/turn-key.pem",
StealthDomain: "cdn-3259254d4d3e.orama-devnet.network",
TLSStealthCertPath: "/var/lib/caddy/caddy/certificates/.../wildcard_.orama-devnet.network.crt",
TLSStealthKeyPath: "/var/lib/caddy/caddy/certificates/.../wildcard_.orama-devnet.network.key",
}
data, err := yaml.Marshal(src)
if err != nil {
t.Fatalf("marshal: %v", err)
}
got, err := decodeTURNConfig(data)
if err != nil {
t.Fatalf("strict decode of spawner output failed — TURN would crash-loop at startup: %v\n---\n%s", err, data)
}
if got.StealthDomain != src.StealthDomain ||
got.TLSStealthCertPath != src.TLSStealthCertPath ||
got.TLSStealthKeyPath != src.TLSStealthKeyPath {
t.Errorf("stealth fields did not round-trip: got %+v", got)
}
if got.AuthSecret != src.AuthSecret || got.TURNSListenAddr != src.TURNSListenAddr {
t.Errorf("core fields did not round-trip: got %+v", got)
}
}
// TestDecodeTURNConfig_rejectsUnknownField confirms the strict decoder still
// rejects genuinely-unknown keys (so the contract above is meaningful).
func TestDecodeTURNConfig_rejectsUnknownField(t *testing.T) {
if _, err := decodeTURNConfig([]byte("listen_addr: \"0.0.0.0:3478\"\nbogus_field: 1\n")); err == nil {
t.Fatal("expected strict decode to reject an unknown field")
}
}

View File

@ -5,6 +5,7 @@ import (
"fmt"
"os"
"path/filepath"
"strings"
"time"
production "github.com/DeBrosOfficial/network/pkg/environments/production"
@ -582,6 +583,53 @@ func (s *SystemdSpawner) resolveTURNSCert(namespace, domain, publicIP, configDir
return certPath, keyPath, nil
}
// resolveStealthCert resolves the TLS cert/key for the stealth TURNS host by
// reusing Caddy's existing `*.<baseDomain>` wildcard certificate (feat-124).
//
// The stealth host is a single-label subdomain of the base domain
// (cdn-<hash>.<baseDomain>), so the wildcard the gateway already provisions
// for HTTPS covers it. This deliberately avoids the runtime
// append-to-Caddyfile provisioning path: the orama-node service runs
// ProtectSystem=strict as the orama user and cannot write /etc/caddy, so that
// path fails with EROFS (and would silently fall back to a self-signed cert
// that clients reject — indistinguishable from being blocked). Caddy renews
// the wildcard; the TURN cert reloader hot-reloads it from storage.
//
// Hard error (never self-signed) when the wildcard is missing or the host is
// not a single-label subdomain — a stealth endpoint with an unvalidatable
// cert is worse than no stealth endpoint.
func (s *SystemdSpawner) resolveStealthCert(stealthDomain, baseDomain string) (string, string, error) {
if baseDomain == "" {
return "", "", fmt.Errorf("stealth cert: base domain required")
}
if !isSingleLabelSubdomain(stealthDomain, baseDomain) {
return "", "", fmt.Errorf("stealth cert: %q is not a single-label subdomain of %q (the *.%s wildcard cert would not cover it)", stealthDomain, baseDomain, baseDomain)
}
certPath, keyPath := caddyWildcardCertPaths(baseDomain)
if _, err := os.Stat(certPath); err != nil {
return "", "", fmt.Errorf("stealth cert: Caddy wildcard cert for *.%s not found at %s (is the gateway HTTPS wildcard provisioned on this node?): %w", baseDomain, certPath, err)
}
if _, err := os.Stat(keyPath); err != nil {
return "", "", fmt.Errorf("stealth cert: Caddy wildcard key for *.%s not found at %s: %w", baseDomain, keyPath, err)
}
s.logger.Info("Using Caddy wildcard cert for stealth TURNS",
zap.String("stealth_domain", stealthDomain),
zap.String("cert_path", certPath))
return certPath, keyPath, nil
}
// isSingleLabelSubdomain reports whether host is exactly one DNS label below
// base (e.g. "cdn-x.example.com" under "example.com"), which is the set a
// `*.base` wildcard certificate covers.
func isSingleLabelSubdomain(host, base string) bool {
suffix := "." + base
if !strings.HasSuffix(host, suffix) {
return false
}
label := strings.TrimSuffix(host, suffix)
return label != "" && !strings.Contains(label, ".")
}
// SpawnTURN starts a TURN instance using systemd
func (s *SystemdSpawner) SpawnTURN(ctx context.Context, namespace, nodeID string, cfg TURNInstanceConfig) error {
s.logger.Info("Spawning TURN via systemd",
@ -620,25 +668,24 @@ func (s *SystemdSpawner) SpawnTURN(ctx context.Context, namespace, nodeID string
var stealthCertPath, stealthKeyPath string
if cfg.StealthDomain != "" {
// Security: the stealth domain arrives over the spawn protocol (mesh
// peers gated only by the static internal-auth header). Before it
// reaches the Caddyfile/ACME sink, pin it to the deterministic
// derivation so a forged value can't drive cert issuance for an
// attacker-chosen name. cfg.Realm is the base domain on every TURN
// spawn site. (provisionTURNCertViaCaddy adds a DNS-name allowlist as
// defense-in-depth.)
if cfg.Realm != "" {
want := turn.StealthHostForNamespace(cfg.Namespace, cfg.Realm)
if cfg.StealthDomain != want {
return fmt.Errorf("stealth domain %q does not match the derived host %q for namespace %s — refusing to provision", cfg.StealthDomain, want, cfg.Namespace)
}
// peers gated only by the static internal-auth header). Pin it to the
// deterministic derivation so a forged value can't select cert
// material for an attacker-chosen name. cfg.Realm is the base domain
// on every TURN spawn site.
if cfg.Realm == "" {
return fmt.Errorf("stealth TURNS for namespace %s requires a base domain (realm) to locate the wildcard cert", namespace)
}
want := turn.StealthHostForNamespace(cfg.Namespace, cfg.Realm)
if cfg.StealthDomain != want {
return fmt.Errorf("stealth domain %q does not match the derived host %q for namespace %s — refusing to provision", cfg.StealthDomain, want, cfg.Namespace)
}
if cfg.TURNSListenAddr == "" {
return fmt.Errorf("stealth TURNS for namespace %s requires an active TURNS listener (no TLS cert/listener available)", namespace)
}
var stealthErr error
stealthCertPath, stealthKeyPath, stealthErr = s.resolveTURNSCert(namespace, cfg.StealthDomain, cfg.PublicIP, configDir, false)
stealthCertPath, stealthKeyPath, stealthErr = s.resolveStealthCert(cfg.StealthDomain, cfg.Realm)
if stealthErr != nil {
return fmt.Errorf("failed to provision stealth TURNS cert for namespace %s: %w", namespace, stealthErr)
return fmt.Errorf("failed to resolve stealth TURNS cert for namespace %s: %w", namespace, stealthErr)
}
}

View File

@ -25,10 +25,30 @@ const (
// Caddy stores ACME certs under this directory relative to its data dir.
caddyACMECertDir = "certificates/acme-v02.api.letsencrypt.org-directory"
// caddyServiceStorageDir is where the Caddy systemd service (User=orama,
// HOME=/var/lib/caddy) actually persists its ACME certificates on a node.
// The orama-node service runs ProtectSystem=strict and cannot write
// /etc/caddy, so the runtime "append-to-Caddyfile" provisioning path
// (provisionTURNCertViaCaddy) fails with EROFS — TURNS cert material is
// instead reused from this directory (see caddyWildcardCertPaths).
caddyServiceStorageDir = "/var/lib/caddy/caddy"
turnCertBeginMarker = "# BEGIN TURN CERT: "
turnCertEndMarker = "# END TURN CERT: "
)
// caddyWildcardCertPaths returns the cert/key file paths for the
// `*.<baseDomain>` wildcard certificate in the Caddy service's storage. Caddy
// names the wildcard directory `wildcard_.<baseDomain>`. The gateway already
// provisions this wildcard for HTTPS, so a single-label subdomain of the base
// domain (e.g. the stealth TURNS host `cdn-<hash>.<baseDomain>`) is covered by
// it without any per-domain provisioning.
func caddyWildcardCertPaths(baseDomain string) (certPath, keyPath string) {
name := "wildcard_." + baseDomain
dir := filepath.Join(caddyServiceStorageDir, caddyACMECertDir, name)
return filepath.Join(dir, name+".crt"), filepath.Join(dir, name+".key")
}
// provisionTURNCertViaCaddy appends the TURN domain to the local Caddyfile,
// reloads Caddy to trigger DNS-01 ACME certificate provisioning, and waits
// for the cert files to appear. Returns the cert/key paths on success.

View File

@ -106,3 +106,70 @@ func TestProvisionTURNCertViaCaddy_rejectsNonDNSName(t *testing.T) {
}
}
}
// feat-124 stealth cert reuse: the stealth TURNS host reuses Caddy's existing
// *.<base> wildcard cert instead of writing the Caddyfile (the orama-node
// service can't, ProtectSystem=strict). These pin the validation logic.
func TestIsSingleLabelSubdomain(t *testing.T) {
cases := []struct {
host, base string
want bool
}{
{"cdn-a1b2c3d4e5f6.orama-devnet.network", "orama-devnet.network", true},
{"turn.ns-anchat-test.orama-devnet.network", "orama-devnet.network", false}, // multi-label
{"orama-devnet.network", "orama-devnet.network", false}, // empty label
{"cdn-x.other.network", "orama-devnet.network", false}, // wrong base
{"cdn-x.example.com", "example.com", true},
}
for _, c := range cases {
if got := isSingleLabelSubdomain(c.host, c.base); got != c.want {
t.Errorf("isSingleLabelSubdomain(%q, %q) = %v; want %v", c.host, c.base, got, c.want)
}
}
}
func TestCaddyWildcardCertPaths_shape(t *testing.T) {
crt, key := caddyWildcardCertPaths("orama-devnet.network")
wantCrt := "/var/lib/caddy/caddy/certificates/acme-v02.api.letsencrypt.org-directory/wildcard_.orama-devnet.network/wildcard_.orama-devnet.network.crt"
if crt != wantCrt {
t.Errorf("cert path = %q; want %q", crt, wantCrt)
}
if !strings.HasSuffix(key, "wildcard_.orama-devnet.network.key") {
t.Errorf("key path = %q; want a wildcard .key", key)
}
}
func TestResolveStealthCert_rejectsMultiLabelHost(t *testing.T) {
s := testSpawner(t)
// A host that needs *.ns-x.<base> (multi-label) is NOT covered by the
// *.<base> wildcard — must error rather than present a mismatched cert.
_, _, err := s.resolveStealthCert("turn.ns-x.orama-devnet.network", "orama-devnet.network")
if err == nil {
t.Fatal("multi-label host must be rejected (wildcard wouldn't cover it)")
}
if !strings.Contains(err.Error(), "single-label") {
t.Errorf("error should explain the single-label requirement; got: %v", err)
}
}
func TestResolveStealthCert_missingWildcardErrors(t *testing.T) {
s := testSpawner(t)
// Valid single-label host but the wildcard cert almost certainly does not
// exist at the absolute Caddy storage path during tests → hard error
// naming the path, never a self-signed fallback.
_, _, err := s.resolveStealthCert("cdn-deadbeef0000.test-nonexistent-base.invalid", "test-nonexistent-base.invalid")
if err == nil {
t.Fatal("missing wildcard cert must hard-fail")
}
if !strings.Contains(err.Error(), "wildcard") {
t.Errorf("error should reference the missing wildcard cert; got: %v", err)
}
}
func TestResolveStealthCert_emptyBaseErrors(t *testing.T) {
s := testSpawner(t)
if _, _, err := s.resolveStealthCert("cdn-x.example.com", ""); err == nil {
t.Fatal("empty base domain must error")
}
}

View File

@ -149,7 +149,7 @@ func (p *Provider) Send(ctx context.Context, msg push.PushMessage) error {
if p.kind != KindVoIP && !hasVisibleContent(msg) {
return push.ErrEmptyContent
}
payload, err := buildAPSPayload(msg)
payload, err := buildAPSPayload(msg, p.kind)
if err != nil {
return fmt.Errorf("apns: build payload: %w", err)
}
@ -281,12 +281,25 @@ func tokenPrefix(token string) string {
return token[:8] + "..."
}
// buildAPSPayload assembles the APNs JSON payload from a generic
// PushMessage. The `aps` dictionary is the Apple-required wrapper;
// custom fields (`data`) go alongside at the top level.
// buildAPSPayload assembles the APNs JSON payload from a generic PushMessage.
// The `aps` dictionary is the Apple-required wrapper; custom `Data` placement
// depends on the kind:
//
// - KindAlert: custom data is nested under a top-level "body" object.
// expo-notifications' iOS serializer sets content.data ONLY from
// userInfo["body"] for remote notifications (NotificationRecords.swift:
// `if isRemote { return userInfo["body"] }`) — top-level sibling keys of
// `aps` are IGNORED, so spreading them there yields content.data=null on
// iOS. This was bugboard #38 (Data never reached the JS client despite
// correct wire serialization). Note: "body" here is the data envelope
// expo expects; it is distinct from the human-readable alert body, which
// lives at aps.alert.body.
// - KindVoIP: custom data stays at the top level. PushKit/CallKit pushes are
// handled by the app's native pushRegistry (not expo-notifications), which
// reads payload.dictionaryPayload directly.
//
// Reference: https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification
func buildAPSPayload(msg push.PushMessage) ([]byte, error) {
func buildAPSPayload(msg push.PushMessage, kind Kind) ([]byte, error) {
alert := map[string]string{}
if msg.Title != "" {
alert["title"] = msg.Title
@ -338,13 +351,28 @@ func buildAPSPayload(msg push.PushMessage) ([]byte, error) {
}
}
root := map[string]interface{}{"aps": aps}
// Collect tenant custom data, excluding reserved keys: `aps` (must not be
// clobbered) and `content_available` (already mapped into aps above).
data := map[string]interface{}{}
for k, v := range msg.Data {
// Don't allow tenant data to clobber `aps`, and skip the
// content_available marker since we mapped it to aps above.
if k == "aps" || k == "content_available" {
continue
}
root[k] = v
data[k] = v
}
if len(data) > 0 {
if kind == KindVoIP {
// Native PushKit reads the dictionary payload directly — top-level.
for k, v := range data {
root[k] = v
}
} else {
// expo-notifications surfaces content.data from userInfo["body"]
// only (bugboard #38) — nest the data envelope there.
root["body"] = data
}
}
return json.Marshal(root)
}

View File

@ -155,7 +155,7 @@ func TestValidator_RedactNeverEchoesP8Key(t *testing.T) {
func TestBuildAPSPayload_basicAlert(t *testing.T) {
msg := push.PushMessage{Title: "hi", Body: "from orama"}
raw, err := buildAPSPayload(msg)
raw, err := buildAPSPayload(msg, KindAlert)
if err != nil {
t.Fatalf("build: %v", err)
}
@ -174,23 +174,58 @@ func TestBuildAPSPayload_basicAlert(t *testing.T) {
}
}
func TestBuildAPSPayload_dataAlongsideAPS(t *testing.T) {
// Bugboard #38: for an ALERT push, custom data must be nested under a
// top-level "body" object — expo-notifications' iOS serializer reads
// content.data from userInfo["body"] only, ignoring top-level sibling keys.
func TestBuildAPSPayload_alertNestsDataUnderBody(t *testing.T) {
msg := push.PushMessage{
Title: "x",
Body: "y",
Data: map[string]interface{}{"thread": "abc", "deeplink": "anchat://room/42"},
}
raw, _ := buildAPSPayload(msg)
raw, _ := buildAPSPayload(msg, KindAlert)
var out map[string]interface{}
_ = json.Unmarshal(raw, &out)
if err := json.Unmarshal(raw, &out); err != nil {
t.Fatalf("payload not valid JSON: %v", err)
}
if _, hasAPS := out["aps"]; !hasAPS {
t.Error("payload missing aps")
}
if out["thread"] != "abc" {
t.Errorf("data.thread missing; got %v", out)
// Must NOT be at the top level (expo would ignore it there).
if _, leaked := out["thread"]; leaked {
t.Errorf("data leaked to top level; expo-notifications would drop it: %v", out)
}
if out["deeplink"] != "anchat://room/42" {
t.Errorf("data.deeplink missing; got %v", out)
body, ok := out["body"].(map[string]interface{})
if !ok {
t.Fatalf("alert data not nested under top-level \"body\" object; got %v", out)
}
if body["thread"] != "abc" || body["deeplink"] != "anchat://room/42" {
t.Errorf("body envelope missing data; got %v", body)
}
// The human-readable alert body stays under aps.alert.body, distinct from
// the data envelope key.
aps := out["aps"].(map[string]interface{})
if alert, ok := aps["alert"].(map[string]interface{}); !ok || alert["body"] != "y" {
t.Errorf("aps.alert.body should be the human-readable body; got %v", aps["alert"])
}
}
// VoIP pushes are handled by native PushKit (not expo-notifications), so
// custom data stays at the top level of the dictionary payload.
func TestBuildAPSPayload_voipKeepsDataTopLevel(t *testing.T) {
msg := push.PushMessage{
Data: map[string]interface{}{"callId": "c-1", "callerName": "Alice"},
}
raw, _ := buildAPSPayload(msg, KindVoIP)
var out map[string]interface{}
if err := json.Unmarshal(raw, &out); err != nil {
t.Fatalf("payload not valid JSON: %v", err)
}
if out["callId"] != "c-1" || out["callerName"] != "Alice" {
t.Errorf("voip data must stay top-level for PushKit; got %v", out)
}
if _, nested := out["body"]; nested {
t.Errorf("voip data must NOT be nested under body; got %v", out)
}
}
@ -199,7 +234,7 @@ func TestBuildAPSPayload_dataCannotClobberAPS(t *testing.T) {
Title: "x",
Data: map[string]interface{}{"aps": "evil"},
}
raw, _ := buildAPSPayload(msg)
raw, _ := buildAPSPayload(msg, KindAlert)
var out map[string]interface{}
_ = json.Unmarshal(raw, &out)
apsField, ok := out["aps"]
@ -215,7 +250,7 @@ func TestBuildAPSPayload_badgeAndSound(t *testing.T) {
msg := push.PushMessage{
Title: "x", Badge: 3, Sound: "ding.caf",
}
raw, _ := buildAPSPayload(msg)
raw, _ := buildAPSPayload(msg, KindAlert)
if !strings.Contains(string(raw), `"badge":3`) {
t.Errorf("badge not in payload: %s", raw)
}
@ -226,7 +261,7 @@ func TestBuildAPSPayload_badgeAndSound(t *testing.T) {
func TestBuildAPSPayload_channelMapsToThreadID(t *testing.T) {
msg := push.PushMessage{Title: "x", Channel: "messages"}
raw, _ := buildAPSPayload(msg)
raw, _ := buildAPSPayload(msg, KindAlert)
if !strings.Contains(string(raw), `"thread-id":"messages"`) {
t.Errorf("channel not mapped to thread-id: %s", raw)
}

View File

@ -1,18 +1,28 @@
// Package ntfy implements a push.PushProvider backed by an ntfy server.
//
// ntfy delivers notifications via plain HTTP POST to <baseURL>/<topic>.
// We map PushMessage fields to ntfy headers:
// - Title -> "Title"
// - Priority -> "Priority"
// - Channel -> "Tags"
// - Data -> base64-encoded JSON in "X-Data"
// We map PushMessage fields to the ntfy publish surface:
// - Title -> "Title" header
// - Priority -> "Priority" header
// - Channel -> "Tags" header
// - Body -> the POST body (ntfy's "message", relayed verbatim)
// - Data -> the POST body as JSON, ONLY when Body is empty
//
// See https://docs.ntfy.sh/publish/#publish-as-json for details.
// IMPORTANT (bugboard #126): ntfy does NOT relay arbitrary `X-*` request
// headers into the subscriber stream — only its recognized publish headers
// (Title, Priority, Tags, Click, Actions, Attach, …) and the message body
// reach the client. So structured Data and a numeric Badge cannot be carried
// as custom headers; the only field a subscriber reliably receives besides
// title/priority/tags is the message BODY. We therefore deliver Data through
// the body (UnifiedPush convention: the body IS the payload). A caller that
// sets an explicit Body owns it — to ship structured data alongside a
// human-readable body, encode both into the Body envelope.
//
// See https://docs.ntfy.sh/publish/ for the recognized header set.
package ntfy
import (
"context"
"encoding/base64"
"encoding/json"
"fmt"
"io"
@ -79,7 +89,20 @@ func (p *Provider) Send(ctx context.Context, msg push.PushMessage) error {
return err
}
req, err := http.NewRequestWithContext(ctx, http.MethodPost, endpointURL, strings.NewReader(msg.Body))
// Determine the POST body — the only structured payload ntfy relays to
// subscribers (bugboard #126). A caller-supplied Body wins; otherwise, if
// there's structured Data, serialize it as the body so a data-only push
// still reaches the client (UnifiedPush convention: body == payload).
body := msg.Body
if body == "" && len(msg.Data) > 0 {
b, err := json.Marshal(msg.Data)
if err != nil {
return fmt.Errorf("ntfy: marshal data: %w", err)
}
body = string(b)
}
req, err := http.NewRequestWithContext(ctx, http.MethodPost, endpointURL, strings.NewReader(body))
if err != nil {
return fmt.Errorf("ntfy: build request: %w", err)
}
@ -96,16 +119,10 @@ func (p *Provider) Send(ctx context.Context, msg push.PushMessage) error {
// ntfy uses "Tags" for both visual emoji and operator-defined tags.
req.Header.Set("Tags", msg.Channel)
}
if msg.Badge > 0 {
req.Header.Set("X-Badge", fmt.Sprintf("%d", msg.Badge))
}
if len(msg.Data) > 0 {
b, err := json.Marshal(msg.Data)
if err != nil {
return fmt.Errorf("ntfy: marshal data: %w", err)
}
req.Header.Set("X-Data", base64.StdEncoding.EncodeToString(b))
}
// NOTE: Badge and arbitrary Data are intentionally NOT sent as custom
// headers — ntfy does not relay `X-*` headers to subscribers (#126), so
// doing so silently drops them. Data rides the body (above); a badge
// count, if needed, must be encoded into the body by the caller.
if p.authToken != "" {
req.Header.Set("Authorization", "Bearer "+p.authToken)
}

View File

@ -2,7 +2,6 @@ package ntfy
import (
"context"
"encoding/base64"
"encoding/json"
"io"
"net/http"
@ -17,11 +16,11 @@ import (
func TestSend_happy_path(t *testing.T) {
var (
gotPath string
gotBody string
gotTitle string
gotPath string
gotBody string
gotTitle string
gotPriority string
gotAuth string
gotAuth string
)
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
gotPath = r.URL.Path
@ -61,9 +60,14 @@ func TestSend_happy_path(t *testing.T) {
}
}
func TestSend_includes_data_header_when_data_set(t *testing.T) {
var gotData string
// Bugboard #126: ntfy does not relay X-* headers to subscribers, so Data must
// ride the body. With no explicit Body, a data-only push serializes Data as
// the JSON body — and must NOT set the dead X-Data header.
func TestSend_dataOnly_ridesBody_noXDataHeader(t *testing.T) {
var gotBody, gotData string
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
b, _ := io.ReadAll(r.Body)
gotBody = string(b)
gotData = r.Header.Get("X-Data")
w.WriteHeader(http.StatusOK)
}))
@ -72,39 +76,49 @@ func TestSend_includes_data_header_when_data_set(t *testing.T) {
p := New(Config{BaseURL: srv.URL}, nil)
err := p.Send(context.Background(), push.PushMessage{
DeviceToken: "topic",
Body: "x",
Data: map[string]interface{}{"call_id": "abc-123"},
})
if err != nil {
t.Fatalf("Send: %v", err)
}
decoded, err := base64.StdEncoding.DecodeString(gotData)
if err != nil {
t.Fatalf("X-Data not valid base64: %v", err)
if gotData != "" {
t.Errorf("X-Data header must not be set (ntfy drops it); got %q", gotData)
}
var got map[string]interface{}
if err := json.Unmarshal(decoded, &got); err != nil {
t.Fatalf("X-Data not valid JSON: %v", err)
if err := json.Unmarshal([]byte(gotBody), &got); err != nil {
t.Fatalf("data-only body not valid JSON: %v (body=%q)", err, gotBody)
}
if got["call_id"] != "abc-123" {
t.Errorf("data round-trip failed: got %v", got)
t.Errorf("data did not ride the body: got %v", got)
}
}
func TestSend_no_data_no_data_header(t *testing.T) {
var gotData string
// An explicit Body wins — Data does NOT clobber a caller-supplied body (the
// caller owns the envelope; this is anchat's call-push pattern).
func TestSend_explicitBody_winsOverData(t *testing.T) {
var gotBody, gotData string
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
b, _ := io.ReadAll(r.Body)
gotBody = string(b)
gotData = r.Header.Get("X-Data")
w.WriteHeader(http.StatusOK)
}))
defer srv.Close()
p := New(Config{BaseURL: srv.URL}, nil)
if err := p.Send(context.Background(), push.PushMessage{DeviceToken: "t", Body: "x"}); err != nil {
t.Fatal(err)
err := p.Send(context.Background(), push.PushMessage{
DeviceToken: "topic",
Body: `{"type":"call.invite","callId":"c1"}`,
Data: map[string]interface{}{"ignored": "yes"},
})
if err != nil {
t.Fatalf("Send: %v", err)
}
if gotBody != `{"type":"call.invite","callId":"c1"}` {
t.Errorf("explicit body not preserved; got %q", gotBody)
}
if gotData != "" {
t.Errorf("expected no X-Data header, got %q", gotData)
t.Errorf("X-Data header must not be set; got %q", gotData)
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@debros/orama",
"version": "0.122.45",
"version": "0.122.47",
"description": "TypeScript SDK for Orama Network - Database, PubSub, Cache, Storage, Vault, and more",
"type": "module",
"main": "./dist/index.js",