Add: https://github.com/Leadaxe/singbox-launcher/blob/main/docs/ParserConfig.md
В этом релизе произошел переход на версию 3 формата конфигурации парсера подписок. Это важное изменение, которое улучшает структуру конфигурации и упрощает её использование.
📦 Плоская структура outbounds (версия 3)
🔄 Автоматическая миграция
📝 Обновление шаблона конфигурации
Версия 2 (устарела):
Версия 3 (текущая):
Подробная документация по формату конфигурации версии 3 и логике миграции доступна в файле Реализован механизм автоматического обновления конфигурации на основе подписок. Приложение теперь может автоматически проверять и обновлять конфигурацию через заданные интервалы времени.
⏱️ Динамический интервал проверки
🚀 Автоматическая проверка при запуске
🛡️ Умная обработка ошибок
♻️ Возобновление после успешного обновления
🔒 Защита от конфликтов
Автоматическое обновление настраивается через поле ⚠️ Важно:
Все действия автоматического обновления логируются в Все параметры автоматического обновления вынесены в глобальные константы пакета 📅 Дата релиза: 16 декабря 2025
📋 Русское описание релиза
🚀 Singbox Launcher - Заметки о релизе
⚠️ Важное: Переход на версию 3 конфигурации
📋 Обновление формата конфигурации
✨ Что изменилось:
filters, addOutbounds и preferredDefault теперь находятся на верхнем уровне объекта outbound
outbounds.proxies из версии 2
bin/config_template.json обновлен до версии 3
📊 Пример изменений:
{
"outbounds": {
"proxies": { "tag": "!/(🇷🇺)/i" },
"addOutbounds": ["direct-out"],
"preferredDefault": { "tag": "/🇳🇱/i" }
}
}{
"filters": { "tag": "!/(🇷🇺)/i" },
"addOutbounds": ["direct-out"],
"preferredDefault": { "tag": "/🇳🇱/i" }
}✅ Что нужно сделать:
config_template.json вручную
📚 Документация:
docs/ParserConfig.md.
🤖 Автоматическое обновление конфигурации
✨ Новая функциональность
🎯 Основные возможности:
max(10 минут, parser.reload) из конфигурации
parser.reload не указан, используется значение по умолчанию 4 часа
last_updated) прошло достаточно времени, обновление запускается немедленно
⚙️ Настройка
parser.reload в секции @ParserConfig:
{
"ParserConfig": {
"parser": {
"reload": "1h", // Интервал обновления (будет использован max(10m, 1h) = 1h)
"last_updated": "2025-12-16T02:33:21Z" // Обновляется автоматически
}
}
}
last_updated обновляется автоматически при каждом успешном обновлении
📝 Логирование
logs/singbox-launcher.log:
Auto-update: Starting auto-update loop - запуск горутины
Auto-update: Calculated interval: ... - рассчитанный интервал проверки
Auto-update: Checking if update needed - проверка необходимости обновления
Auto-update: Update needed, attempting update... - запуск обновления
Auto-update: Attempting update (attempt X/10) - попытка обновления
Auto-update: Completed successfully - успешное завершение
Auto-update: Stopped after 10 consecutive failed attempts - остановка после ошибок
🔧 Технические детали
fyne.Do() для безопасности
📌 Константы
core:
autoUpdateMinInterval = 10 * time.Minute - минимальный интервал проверки
autoUpdateRetryInterval = 10 * time.Second - интервал между попытками при ошибке
autoUpdateMaxRetries = 10 - максимальное количество попыток
autoUpdateDefaultReload = "4h" - значение по умолчанию для parser.reload
🎨 Улучшения и исправления
🔨 Рефакторинг системы конфигурации
config_migrator.go
last_updated и запись конфигурации в одной операции
bin/config_template.json до версии 3 с подробными комментариями
🪄 Исправления Config Wizard
outbounds из шаблона, proxies из текущего конфига
filters (теперь filters: {} означает "без фильтров")
urltest и selector типов
📚 Документация
docs/ParserConfig.md с описанием всех полей и логики работы
💡 Рекомендации по использованию
📖 Советы и рекомендации
1. ⏰ Настройка интервала обновления
2. 👀 Мониторинг
3. 🔧 Устранение проблем
📊 Техническая информация
🔍 Спецификации
🚀 Singbox Launcher - Release Notes
⚠️ Important: Migration to Configuration Version 3
📋 Configuration Format Update
This release introduces version 3 of the subscription parser configuration format. This is an important change that improves the configuration structure and simplifies its usage.
✨ What Changed:
-
📦 Flat outbounds Structure (Version 3)
- Fields
filters,addOutbounds, andpreferredDefaultare now at the top level of the outbound object - Removed nested
outbounds.proxiesstructure from version 2 - Configuration is now more readable and simpler
- Fields
-
🔄 Automatic Migration
- Old configurations from versions 1 and 2 automatically migrate to version 3 on load
- Migration happens transparently, without user intervention
- All data is preserved during migration
-
📝 Configuration Template Update
- File
bin/config_template.jsonupdated to version 3 - All configuration examples use the new format
- Added comments and descriptions for all fields
- File
📊 Example Changes:
Version 2 (deprecated):
{
"outbounds": {
"proxies": { "tag": "!/(🇷🇺)/i" },
"addOutbounds": ["direct-out"],
"preferredDefault": { "tag": "/🇳🇱/i" }
}
}Version 3 (current):
{
"filters": { "tag": "!/(🇷🇺)/i" },
"addOutbounds": ["direct-out"],
"preferredDefault": { "tag": "/🇳🇱/i" }
}✅ What You Need to Do:
- 🆕 For New Installations: nothing required, version 3 is used by default
- 🔄 For Existing Installations:
- Configuration automatically migrates to version 3 on first launch
- Verify that all settings were preserved correctly
- Update
config_template.jsonmanually if needed
📚 Documentation:
Detailed documentation on version 3 configuration format and migration logic is available in docs/ParserConfig.md.
🤖 Automatic Configuration Update
✨ New Feature
Implemented automatic configuration update mechanism based on subscriptions. The application can now automatically check and update configuration at specified time intervals.
🎯 Key Features:
-
⏱️ Dynamic Check Interval
- Minimum interval: 10 minutes (constant)
- Uses
max(10 minutes, parser.reload)value from configuration - If
parser.reloadis not specified, defaults to 4 hours - Interval is recalculated on each check, allowing "on-the-fly" changes
-
🚀 Automatic Check on Startup
- Application immediately checks if update is needed on startup
- If enough time has passed since last update (
last_updated), update starts immediately - No need to wait for full interval before first check
-
🛡️ Smart Error Handling
- On update error, performs up to 10 attempts with 10 seconds between attempts
- Consecutive failure counter is tracked globally
- After 10 consecutive failed attempts, automatic updates are stopped
- User receives notification about automatic updates being stopped
-
♻️ Resume After Successful Update
- After successful manual update (button or wizard), automatic updates automatically resume
- Error counter resets on any successful update (even after previous failures)
- This allows restoring automatic updates after fixing issues
-
🔒 Conflict Protection
- Automatic update does not start if manual update is already in progress
- Check is performed before each update attempt
⚙️ Configuration
Automatic update is configured via parser.reload field in @ParserConfig section:
{
"ParserConfig": {
"parser": {
"reload": "1h", // Update interval (will use max(10m, 1h) = 1h)
"last_updated": "2025-12-16T02:33:21Z" // Updated automatically
}
}
}⚠️ Important:
- Minimum interval is always 10 minutes, even if smaller value is specified
last_updatedfield is automatically updated on each successful update- Time format: RFC3339 in UTC
📝 Logging
All automatic update actions are logged in logs/singbox-launcher.log:
Auto-update: Starting auto-update loop- goroutine startupAuto-update: Calculated interval: ...- calculated check intervalAuto-update: Checking if update needed- checking if update is neededAuto-update: Update needed, attempting update...- starting updateAuto-update: Attempting update (attempt X/10)- update attemptAuto-update: Completed successfully- successful completionAuto-update: Stopped after 10 consecutive failed attempts- stopped after errors
🔧 Technical Details
- Automatic update runs in separate goroutine, not blocking UI
- Context is used for graceful shutdown on application exit
- All state operations are protected by mutexes
- UI updates are performed via
fyne.Do()for safety
📌 Constants
All automatic update parameters are extracted to global constants in core package:
autoUpdateMinInterval = 10 * time.Minute- minimum check intervalautoUpdateRetryInterval = 10 * time.Second- interval between retry attempts on errorautoUpdateMaxRetries = 10- maximum number of attemptsautoUpdateDefaultReload = "4h"- default value forparser.reload
🎨 Improvements and Fixes
🔨 Configuration System Refactoring
- 🔄 Migration to version 3 configuration with flat outbounds structure
- Separation of configuration migration logic into separate module
config_migrator.go - Implementation of "string → string" approach for migrations between versions (v1 → v2 → v3)
- Automatic migration of old configurations on load
- Cleanup of main code from legacy structures (v1ParserConfig, v2ParserConfig used only in migrator)
- Optimization of file operations:
last_updatedupdate and configuration write in single operation - Update of
bin/config_template.jsonto version 3 with detailed comments
🪄 Config Wizard Fixes
- Fixed configuration loading logic: priority of
outboundsfrom template,proxiesfrom current config - Fixed handling of outbounds without explicit
filtersfield (nowfilters: {}means "no filters") - Improved selector generation for
urltestandselectortypes
📚 Documentation
- Created detailed documentation
docs/ParserConfig.mdwith description of all fields and logic - Updated README files with links to new documentation
- Added configuration examples and migration descriptions
💡 Usage Recommendations
📖 Tips and Recommendations
1. ⏰ Update Interval Configuration
- For active use, recommended interval is 1-4 hours
- For occasional use, can set 24 hours or more
- Remember: minimum interval is always 10 minutes
2. 👀 Monitoring
- Regularly check logs for automatic update errors
- If automatic updates stopped, use manual update to restore
3. 🔧 Troubleshooting
- If automatic updates stopped, check:
- ✅ Subscription URL availability
- ✅ Internet connection
- ✅ Configuration format correctness
- After fixing issues, perform manual update - automatic updates will resume
📊 Technical Information
🔍 Specifications
- Configuration Version: 3
- Minimum Interval: 10 minutes
- Maximum Attempts: 10
- Interval Between Attempts: 10 seconds
- Time Format: RFC3339 (UTC)
📅 Release Date: December 16, 2025