Files
NebulaShell/store/@{FutureOSS}/plugin-storage
qwen.ai[bot] f8853ca45e Title: Upgrade to FutureOSS v1.1.0 with enterprise-grade security and deployment features
Key features implemented:
- New RELEASE_v1.1.0.md with comprehensive release notes for security upgrades and new features
- New firewall.py plugin implementing dynamic IP filtering, port management, and attack detection
- New frp_proxy.py plugin for FRP-based internal network tunneling and proxy services
- New ftp_server.py plugin providing secure file transfer with user management and access control
- New multi_lang_deploy.py orchestrator supporting automated detection and deployment of Python/Node.js/Go/Java/PHP projects
- New ops_toolbox.py with backup/recovery, health checks, and resource quota management
- New security_gateway.py with API rate limiting, JWT authentication, audit logging, and circuit breaker protection
- New HTML5/CSS3/JS-based webui replacing PHP templates with modern responsive design and real-time metrics
- New manifest.json files for all plugins adding configuration schemas and dependency declarations
- Updated .gitignore with refined ignore patterns for development environments
- Modified core plugin manifests to include internationalization dependencies and enhanced configurations
- Removed legacy PHP template files from webui frontend views
- Enhanced plugin bridge, storage, signature verification with multilingual support and security improvements
2026-04-25 00:01:05 +00:00
..
2026-04-17 23:15:15 +08:00
2026-04-17 23:15:15 +08:00

plugin-storage 插件存储

为所有插件提供隔离的键值存储服务。

功能

  • 隔离存储:每个插件有独立的命名空间
  • 持久化:数据自动保存到 JSON 文件
  • 线程安全:支持并发访问
  • 共享访问:通过 plugin-bridge 可跨插件访问

基本使用

storage_plugin = plugin_mgr.get("plugin-storage")

# 获取插件的隔离存储
storage = storage_plugin.get_storage("my-plugin")

# 设置值
storage.set("key", "value")
storage.set("config", {"theme": "dark", "lang": "zh"})

# 获取值
value = storage.get("key")
config = storage.get("config", default={})

# 检查键
if storage.has("key"):
    print("存在")

# 删除
storage.delete("key")

# 批量设置
storage.set_many({"a": 1, "b": 2, "c": 3})

# 获取所有数据
all_data = storage.get_all()

# 清空
storage.clear()

通过 plugin-bridge 访问

bridge = plugin_mgr.get("plugin-bridge")
shared_storage = bridge.storage  # 假设 bridge 集成了 storage

# 获取其他插件的存储(需要权限)
other_storage = shared_storage.get_plugin_storage("other-plugin")
data = other_storage.get("some_key")

存储位置

./data/storage/
├── plugin-a/
│   └── data.json
├── plugin-b/
│   └── data.json
└── ...

元信息

meta = storage.get_meta()
# {"plugin": "my-plugin", "keys": 5, "path": "./data/storage/my-plugin"}