Add complete backend implementation for Gitea integration and local backups with admin permissions: RPCD Methods (luci.secubox-p2p): - get_gitea_config / set_gitea_config - Gitea server configuration - create_gitea_repo - Create new Gitea repository via API - list_gitea_repos - List user's Gitea repositories - get_gitea_commits - Fetch commit history - push_gitea_backup - Push config/packages/scripts to Gitea - pull_gitea_backup - Restore from Gitea commit - create_local_backup - Create local backup snapshot - list_local_backups - List available local backups - restore_local_backup - Restore from local backup UCI Config (secubox-p2p): - gitea section: server_url, repo_name, access_token, auto_backup options - backup section: backup_dir, max_backups, auto_cleanup Frontend (hub.js): - Updated createGiteaRepo() to use backend API - Updated backup functions to use backend storage - Added refreshGiteaCommits() for real API calls - Load function now fetches Gitea config and backup list Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
56 lines
1.2 KiB
Plaintext
56 lines
1.2 KiB
Plaintext
config p2p 'main'
|
|
option enabled '1'
|
|
option node_name ''
|
|
option discovery_enabled '1'
|
|
option discovery_method 'mdns'
|
|
option sharing_enabled '1'
|
|
option auto_sync '1'
|
|
option sync_interval '60'
|
|
|
|
config dns_federation 'dns'
|
|
option enabled '0'
|
|
option primary_dns '127.0.0.1:53'
|
|
option sync_enabled '1'
|
|
option base_domain 'sb.local'
|
|
|
|
config wireguard_mesh 'wireguard'
|
|
option enabled '0'
|
|
option listen_port '51820'
|
|
option network_cidr '10.100.0.0/24'
|
|
option auto_configure '1'
|
|
|
|
config haproxy 'haproxy'
|
|
option enabled '0'
|
|
option strategy 'round-robin'
|
|
option health_check '1'
|
|
option failover '1'
|
|
|
|
config hub_registry 'registry'
|
|
option base_url 'sb.local'
|
|
option cache_enabled '1'
|
|
option cache_ttl '300'
|
|
|
|
config maas 'maas'
|
|
option enabled '0'
|
|
option auto_register '1'
|
|
option sync_interval '60'
|
|
|
|
config gitea 'gitea'
|
|
option enabled '0'
|
|
option server_url ''
|
|
option repo_name 'secubox-backup'
|
|
option repo_owner ''
|
|
option access_token ''
|
|
option auto_backup '0'
|
|
option backup_interval '3600'
|
|
option backup_on_change '1'
|
|
option include_configs '1'
|
|
option include_packages '1'
|
|
option include_scripts '1'
|
|
|
|
config backup 'backup'
|
|
option enabled '1'
|
|
option backup_dir '/etc/secubox/backups'
|
|
option max_backups '10'
|
|
option auto_cleanup '1'
|