Commit Graph

35 Commits

Author SHA1 Message Date
80ab3caa5f Implement policy-based event filtering and add integration tests
Some checks failed
Go / build (push) Has been cancelled
Go / release (push) Has been cancelled
- Enhanced the HandleReq function to incorporate policy checks for privileged events, ensuring only authorized users can access sensitive data.
- Introduced a new integration test suite for policy filtering, validating the behavior of event access based on user authentication and policy rules.
- Added a script to automate the policy filter integration tests, improving testing efficiency and reliability.
- Updated version to v0.20.2 to reflect the new features and improvements.
2025-10-30 17:51:15 +00:00
62f244d114 Refactor event handling and testing utilities
Some checks failed
Go / build (push) Has been cancelled
Go / release (push) Has been cancelled
- Updated the HandleReq function to improve event filtering logic, ensuring that privileged events are consistently checked against user access levels.
- Refactored event deduplication to utilize filtered events instead of all events, enhancing performance and clarity.
- Enhanced test utilities by generating keypairs for event creation, ensuring proper signing and validation in tests.
- Updated various test cases to use the new event creation methods, improving reliability and maintainability of tests.
- Bumped version to reflect changes made.
2025-10-30 15:53:02 +00:00
c5ff2c648c Refactor Nostr Client and Update Dependencies
- Replaced NDKPrivateKeySigner with PrivateKeySigner from applesauce-signers for improved signing functionality.
- Updated the Nostr client implementation to utilize nostr-tools for event management and connection pooling.
- Enhanced event fetching logic to support multiple versions of replaceable events based on limit parameters.
- Updated package dependencies in package.json and bun.lock, including the addition of applesauce-core and applesauce-signers.
- Refined event kind definitions and improved documentation for clarity and consistency with NIP specifications.
- Adjusted CSS styles in bundle.css for better visual consistency across components.
2025-10-25 17:27:25 +01:00
75f2f379ec Enhance authentication handling in request processing
- Updated HandleCount, HandleEvent, and HandleReq functions to improve authentication checks based on new configuration options.
- Introduced `AuthToWrite` configuration to allow unauthenticated access for COUNT and REQ operations while still enforcing ACL checks.
- Enhanced comments for clarity on authentication requirements and access control logic.
- Bumped version to v0.17.18.
2025-10-24 20:16:03 +01:00
28ab665285 Implement privileged event filtering and add comprehensive tests
Some checks failed
Go / build (push) Has been cancelled
Go / release (push) Has been cancelled
- Refactored the HandleReq function to improve the handling of privileged events, ensuring that only authorized users can access them based on their authentication status and associated tags.
- Introduced a new test suite for privileged event filtering, covering various scenarios including authorized access, unauthorized access, and edge cases with malformed tags.
- Enhanced the publisher logic to deny delivery of privileged events to unauthenticated subscribers.
- Bumped version to v0.17.18.
2025-10-24 19:53:34 +01:00
bc8a557f07 Refactor context handling in HandleCount and HandleReq functions
Some checks failed
Go / build (push) Has been cancelled
Go / release (push) Has been cancelled
- Updated context creation in HandleCount and HandleReq to use context.Background() instead of the connection context, isolating timeouts to prevent affecting long-lived websocket connections.
- Improved comments for clarity on the purpose of the context changes.
- bump version to v0.17.17
2025-10-24 16:55:15 +01:00
a4fc3d8d9b Implement spider functionality for event synchronization
Some checks failed
Go / build (push) Has been cancelled
Go / release (push) Has been cancelled
- Introduced a new `spider` package to manage connections to admin relays and synchronize events for followed pubkeys.
- Added configuration options for spider mode in the application settings, allowing for different operational modes (e.g., follows).
- Implemented callback mechanisms to dynamically retrieve admin relays and follow lists.
- Enhanced the main application to initialize and manage the spider, including starting and stopping its operation.
- Added tests to validate spider creation, callbacks, and operational behavior.
- Bumped version to v0.17.14.
2025-10-22 22:24:21 +01:00
da66e26614 Implement private tag filtering for event visibility
- Added functionality to filter events based on "private" tags, allowing only authorized users to see private events.
- Introduced a new method `canSeePrivateEvent` to check user permissions against private tags.
- Updated event delivery logic to deny access to unauthorized users for private events, enhancing security and user experience.
- Bumped version to v0.17.7.
2025-10-21 19:17:16 +01:00
95c6082564 Implement blacklisting for IPs and enhance follow list fetching
- Added functionality to handle blacklisted IPs, allowing connections to remain open until a timeout is reached.
- Introduced periodic fetching of admin follow lists to improve synchronization with relay data.
- Updated WebSocket message size limits to accommodate larger payloads.
- Enhanced logging for better traceability during follow list fetching and event processing.
- Refactored event subscription logic to improve clarity and maintainability.
2025-10-21 16:31:17 +01:00
384b6113bc fixes memory problem with many pubkeys in query
Some checks failed
Go / build (push) Has been cancelled
Go / release (push) Has been cancelled
2025-10-20 22:20:21 +01:00
bcd79aa967 implemented nip-86 relay management API and added to relay client
Some checks failed
Go / build (push) Has been cancelled
Go / release (push) Has been cancelled
2025-10-16 17:20:04 +01:00
a84782bd52 Implement policy system with comprehensive testing and configuration
Some checks failed
Go / build (push) Has been cancelled
- Introduced a new policy system for event processing, allowing fine-grained control over event storage and retrieval based on various criteria.
- Added support for policy configuration via JSON files, including whitelists, blacklists, and custom scripts.
- Implemented a test suite for the policy system, ensuring 100% test coverage of core functionality and edge cases.
- Created benchmark tests to evaluate policy performance under various conditions.
- Updated event handling to integrate policy checks for both read and write access.
- Enhanced documentation with examples and usage instructions for the policy system.
- Bumped version to v0.16.0.
2025-10-16 11:37:30 +01:00
29e5444545 Refactor logging in event handling and message processing to use trace-level logs, enhancing clarity and consistency across the application. Update web application structure to utilize Svelte and remove unused React components, streamlining the project. Additionally, clean up .gitignore and update package dependencies for improved performance. 2025-10-08 16:10:51 +01:00
Silberengel
9fdef77e02 update docker and apache stuff to new next-orly and make it all more proxy-friendly 2025-10-03 11:44:02 +02:00
48c7fab795 Improve logging and handling for WebSocket message processing, delivery, and diagnostics.
Some checks failed
Go / build (push) Has been cancelled
- Enhanced logging for WebSocket writes, message handling, and delivery timing.
- Added diagnostics for slow deliveries, failures, and context timeouts.
- Incorporated extensive error handling for malformed messages and client notifications.
- Enabled command results and refined subscription management.
- Introduced detailed connection state tracking and metrics for messages, requests, and events.
- Added new `run-market-probe.sh` script for relay testing and Market seeding.
2025-10-01 08:27:22 +01:00
f6054f3c37 Add run-relay-and-seed.sh script, remove redundant JS library mappings, and improve logging consistency.
- Introduced `scripts/run-relay-and-seed.sh` to simplify relay testing and Market seeding.
- Removed `.idea/jsLibraryMappings.xml` as it is no longer required.
- Enhanced consistency by reintroducing relevant debug logs and removing redundant comments.
2025-09-30 18:39:53 +01:00
a50ef55d8e Remove commented-out debug logs and update rules for Go version and Nostr protocol documentation. 2025-09-30 13:10:45 +01:00
2ba361c915 Add relay identity management and subscription enhancements.
Some checks failed
Go / build (push) Has been cancelled
- Introduced relay identity management for subscriptions and follow-list sync.
- Added `IdentityRequested` function to handle the `identity` subcommand.
- Implemented periodic follow-list synchronization for active subscribers.
- Enhanced payment handling to include payer pubkey and subscription updates.
- Added trial expiry and subscription expiry notifications.
2025-09-23 14:22:24 +01:00
20fbce9263 Add spider functionality for relay crawling, marker management, and new SpiderMode config.
- Introduced the `spider` package for relay crawling, including periodic tasks and one-time sync capabilities.
- Added `SetMarker`, `GetMarker`, `HasMarker`, and `DeleteMarker` methods in the database for marker management.
- Updated configuration with `SpiderMode` and `SpiderFrequency` options to enable and customize spider behavior.
- Integrated `spider` initialization into the main application flow.
- Improved tag handling, NIP-70 compliance, and protected tag validation in event processing.
- Removed unnecessary logging and replaced `errorf` with `fmt.Errorf` for better error handling.
- Incremented version to `v0.5.0`.
2025-09-20 13:46:22 +01:00
110223fc4e Migrate internal module imports to unified package path.
Replaced legacy `*.orly` module imports with `next.orly.dev/pkg` paths across the codebase for consistency. Removed legacy `go.mod` files from sub-packages, consolidating dependency management. Added Dockerfiles and configurations for benchmarking environments.
2025-09-12 16:12:31 +01:00
2dd119401b Improve memory safety with defer for event cleanup across handlers, optimize conditional logging, and bump version to v0.4.3.
Some checks failed
Go / build (push) Has been cancelled
2025-09-11 17:14:50 +01:00
e2b7152221 Introduce Ctx() for proper context management in Listener and replace direct context usage in HandleDelete with Ctx().
also introduce a 3 second timeout for websocket read failure
2025-09-11 12:34:01 +01:00
bf7ca1da43 Improve logging consistency across the application, handle context cancellation during WebSocket writes, and introduce async ACL reconfiguration for admin events. 2025-09-11 11:37:25 +01:00
4e96c9e2f7 Remove debug logging across the codebase and update version to v0.3.0.
Some checks failed
Go / build (push) Has been cancelled
2025-09-10 22:12:54 +01:00
9e59d5f72b Set default value for LogToStdout, enhance logging for request handling, query events, and filters, and fix ID handling in relaytester-test.sh. 2025-09-10 16:29:55 +01:00
fe3893addf Add LogToStdout config option, improve tag decoding, and fix ID tracking in event handling 2025-09-10 15:16:33 +01:00
c9314bdbd0 Refactor GetAccessLevel to include address parameter, update all ACL implementations and handlers for enhanced contextual access control. 2025-09-08 07:42:47 +01:00
6207f9d426 Enforce authenticated pubkey checks for privileged events, refactor delivery logic for improved efficiency, and extend Subscription with AuthedPubkey. 2025-09-07 23:41:45 +01:00
f102c205f8 Filter out privileged events for non-admin users, refactor IsPrivileged logic, and improve event handling with additional checks and utilities. 2025-09-07 20:51:32 +01:00
2491fd2738 wire up trigger to restart sync for ACL spider 2025-09-07 20:24:04 +01:00
5a068378fa clean up some remnant commented out code 2025-09-07 19:18:48 +01:00
5edb7a3b09 implement auth and a simple admin-follows whitelist
Some checks failed
Go / build (push) Has been cancelled
2025-09-07 19:08:29 +01:00
b6ea3d5181 Add HandleDelete and GetSerialsFromFilter methods, integrate admin keys handling, and enhance constraints API. Include a new CLI convert tool for key translation. 2025-09-07 13:33:25 +01:00
898aa0cb63 Add context to NewPublisher, improve logging levels, dispatch events on publish, and refine envelope handling
fixes a panic from the nil context
2025-09-03 00:10:36 +01:00
51f04f5f60 implemented event and req 2025-09-02 20:32:53 +01:00