mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-05 20:58:28 +02:00
Added #653
- Added dev mode plugin auto-reload - Optimized struct in plugin manager options
This commit is contained in:
23
src/start.go
23
src/start.go
@@ -307,21 +307,26 @@ func startupSequence() {
|
||||
pluginFolder := *path_plugin
|
||||
pluginFolder = strings.TrimSuffix(pluginFolder, "/")
|
||||
pluginManager = plugins.NewPluginManager(&plugins.ManagerOptions{
|
||||
PluginDir: pluginFolder,
|
||||
SystemConst: &zoraxy_plugin.RuntimeConstantValue{
|
||||
ZoraxyVersion: SYSTEM_VERSION,
|
||||
ZoraxyUUID: nodeUUID,
|
||||
DevelopmentBuild: *development_build,
|
||||
},
|
||||
PluginStoreURLs: []string{
|
||||
"https://raw.githubusercontent.com/aroz-online/zoraxy-official-plugins/refs/heads/main/directories/index.json",
|
||||
},
|
||||
PluginDir: pluginFolder,
|
||||
Database: sysdb,
|
||||
Logger: SystemWideLogger,
|
||||
PluginGroupsConfig: CONF_PLUGIN_GROUPS,
|
||||
CSRFTokenGen: func(r *http.Request) string {
|
||||
return csrf.Token(r)
|
||||
},
|
||||
SystemConst: &zoraxy_plugin.RuntimeConstantValue{
|
||||
ZoraxyVersion: SYSTEM_VERSION,
|
||||
ZoraxyUUID: nodeUUID,
|
||||
DevelopmentBuild: *development_build,
|
||||
},
|
||||
/* Plugin Store URLs */
|
||||
PluginStoreURLs: []string{
|
||||
"https://raw.githubusercontent.com/aroz-online/zoraxy-official-plugins/refs/heads/main/directories/index.json",
|
||||
//TO BE ADDED
|
||||
},
|
||||
/* Developer Options */
|
||||
EnableHotReload: *development_build, //Default to true if development build
|
||||
HotReloadInterval: 5, //seconds
|
||||
})
|
||||
|
||||
//Sync latest plugin list from the plugin store
|
||||
|
Reference in New Issue
Block a user