Release 1.6.1: fix subscription button stuck disabled and improve import parsing.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Navis
2026-07-28 09:00:59 +03:00
co-authored by Cursor
parent 68a48b05ef
commit 740517dbfb
16 changed files with 258 additions and 68 deletions
+3 -7
View File
@@ -404,19 +404,15 @@ func (m *Manager) SubscriptionURL() string {
}
func (m *Manager) ImportSubscription(rawURL string) (int, error) {
m.mu.Lock()
if m.engine != nil && m.engine.Running() {
m.mu.Unlock()
return 0, fmt.Errorf("сначала отключитесь")
}
m.mu.Unlock()
ctx, cancel := context.WithTimeout(context.Background(), 45*time.Second)
defer cancel()
items, err := subscription.Fetch(ctx, rawURL)
if err != nil {
return 0, err
}
if len(items) == 0 {
return 0, fmt.Errorf("в подписке нет поддерживаемых ссылок (naive / hysteria2)")
}
m.mu.Lock()
defer m.mu.Unlock()