mirror of
https://github.com/MengMengCode/VoCat.git
synced 2026-08-13 03:13:43 +08:00
feat: expand device networking and management
This commit is contained in:
@@ -24,6 +24,8 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"vocat/internal/exportproxy"
|
||||
)
|
||||
|
||||
const maxPackageBytes int64 = 64 << 20
|
||||
@@ -94,6 +96,10 @@ func (manager *Manager) scan() error {
|
||||
manager.logger.Warn("skip invalid plugin", "directory", dir, "error", err)
|
||||
continue
|
||||
}
|
||||
if plugin.ID == exportproxy.ReservedID {
|
||||
manager.logger.Info("skip legacy Export Proxy plugin; functionality is built in", "directory", dir)
|
||||
continue
|
||||
}
|
||||
manager.plugins[plugin.ID] = plugin
|
||||
if plugin.Enabled {
|
||||
manager.startLocked(plugin)
|
||||
@@ -201,6 +207,9 @@ func (manager *Manager) Install(reader io.Reader, expectedSHA string) (Plugin, e
|
||||
if err != nil {
|
||||
return Plugin{}, err
|
||||
}
|
||||
if manifest.ID == exportproxy.ReservedID {
|
||||
return Plugin{}, errors.New("plugin ID export-proxy is reserved by the built-in Export Proxy feature")
|
||||
}
|
||||
staging, err := os.MkdirTemp(manager.root, ".install-"+manifest.ID+"-")
|
||||
if err != nil {
|
||||
return Plugin{}, err
|
||||
|
||||
Reference in New Issue
Block a user