[Ingest] Per-source proxy toggle instead of one global switch
Each ingestion source now decides independently whether to route through the proxy: added TelegramUseProxy/BaleUseProxy/DivarUseProxy/MedjobsUseProxy/WebsitesUseProxy flags (migration). ScrapeHttpClients.For(s, useProxy) takes the source's own flag; a source is proxied only when its flag is on AND a proxy URL is set. Settings 'sources' tab: removed the global enable checkbox, kept the proxy address field, and added an «از پروکسی استفاده شود» checkbox under each source. Old IngestProxyEnabled column kept for compatibility but no longer gates routing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -55,8 +55,12 @@ public class SettingsModel : PageModel
|
||||
[BindProperty] public bool DemoMode { get; set; }
|
||||
[BindProperty] public bool WebsitesEnabled { get; set; }
|
||||
[BindProperty] public string? WebsiteUrls { get; set; }
|
||||
[BindProperty] public bool IngestProxyEnabled { get; set; }
|
||||
[BindProperty] public string? IngestProxyUrl { get; set; }
|
||||
[BindProperty] public bool TelegramUseProxy { get; set; }
|
||||
[BindProperty] public bool BaleUseProxy { get; set; }
|
||||
[BindProperty] public bool DivarUseProxy { get; set; }
|
||||
[BindProperty] public bool MedjobsUseProxy { get; set; }
|
||||
[BindProperty] public bool WebsitesUseProxy { get; set; }
|
||||
[TempData] public string? Saved { get; set; }
|
||||
[TempData] public string? SmsTest { get; set; }
|
||||
[TempData] public string? DemoMsg { get; set; }
|
||||
@@ -91,8 +95,12 @@ public class SettingsModel : PageModel
|
||||
DemoMode = s.DemoMode;
|
||||
WebsitesEnabled = s.WebsitesEnabled;
|
||||
WebsiteUrls = s.WebsiteUrls;
|
||||
IngestProxyEnabled = s.IngestProxyEnabled;
|
||||
IngestProxyUrl = s.IngestProxyUrl;
|
||||
TelegramUseProxy = s.TelegramUseProxy;
|
||||
BaleUseProxy = s.BaleUseProxy;
|
||||
DivarUseProxy = s.DivarUseProxy;
|
||||
MedjobsUseProxy = s.MedjobsUseProxy;
|
||||
WebsitesUseProxy = s.WebsitesUseProxy;
|
||||
WebNotificationsEnabled = s.WebNotificationsEnabled;
|
||||
PushEnabled = s.PushEnabled;
|
||||
VapidPublicKey = s.VapidPublicKey;
|
||||
@@ -131,8 +139,12 @@ public class SettingsModel : PageModel
|
||||
DemoMode = DemoMode,
|
||||
WebsitesEnabled = WebsitesEnabled,
|
||||
WebsiteUrls = WebsiteUrls,
|
||||
IngestProxyEnabled = IngestProxyEnabled,
|
||||
IngestProxyUrl = IngestProxyUrl,
|
||||
TelegramUseProxy = TelegramUseProxy,
|
||||
BaleUseProxy = BaleUseProxy,
|
||||
DivarUseProxy = DivarUseProxy,
|
||||
MedjobsUseProxy = MedjobsUseProxy,
|
||||
WebsitesUseProxy = WebsitesUseProxy,
|
||||
WebNotificationsEnabled = WebNotificationsEnabled,
|
||||
PushEnabled = PushEnabled,
|
||||
VapidPublicKey = VapidPublicKey,
|
||||
|
||||
Reference in New Issue
Block a user