[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:
@@ -94,13 +94,16 @@
|
||||
<div class="filter-group">
|
||||
<label>یوزرنیم کانالها (هر خط یک کانال)</label>
|
||||
<textarea name="TelegramChannels" rows="3" dir="ltr" placeholder="shift_channel another_channel">@Model.TelegramChannels</textarea>
|
||||
<label class="proxy-toggle"><input type="checkbox" name="TelegramUseProxy" value="true" checked="@Model.TelegramUseProxy" /> از پروکسی استفاده شود</label>
|
||||
</div>
|
||||
|
||||
<label class="toggle-row">
|
||||
<input type="checkbox" name="BaleEnabled" value="true" checked="@Model.BaleEnabled" />
|
||||
<span class="t-body"><span>بله (بات باید عضو کانال باشد)</span></span>
|
||||
</label>
|
||||
<div class="filter-group"><label>توکن بات بله</label><input type="password" name="BaleBotToken" value="@Model.BaleBotToken" dir="ltr" /></div>
|
||||
<div class="filter-group"><label>توکن بات بله</label><input type="password" name="BaleBotToken" value="@Model.BaleBotToken" dir="ltr" />
|
||||
<label class="proxy-toggle"><input type="checkbox" name="BaleUseProxy" value="true" checked="@Model.BaleUseProxy" /> از پروکسی استفاده شود</label>
|
||||
</div>
|
||||
|
||||
<label class="toggle-row">
|
||||
<input type="checkbox" name="DivarEnabled" value="true" checked="@Model.DivarEnabled" />
|
||||
@@ -110,12 +113,15 @@
|
||||
<div style="flex:0 0 120px;"><label>شهر (slug)</label><input type="text" name="DivarCity" value="@Model.DivarCity" dir="ltr" placeholder="tehran" /></div>
|
||||
<div style="flex:1;"><label>عبارتهای جستجو (هر خط یکی)</label><textarea name="DivarQueries" rows="3">@Model.DivarQueries</textarea></div>
|
||||
</div>
|
||||
<label class="proxy-toggle"><input type="checkbox" name="DivarUseProxy" value="true" checked="@Model.DivarUseProxy" /> از پروکسی استفاده شود</label>
|
||||
|
||||
<label class="toggle-row">
|
||||
<input type="checkbox" name="MedjobsEnabled" value="true" checked="@Model.MedjobsEnabled" />
|
||||
<span class="t-body"><span>مدجابز (medjobs.ir)</span><span class="t-hint">خواندن کامل آگهیها از سایتمپ.</span></span>
|
||||
</label>
|
||||
<div class="filter-group"><label>حداکثر آگهی در هر اجرا</label><input type="number" name="MedjobsMaxAds" min="1" max="500" value="@Model.MedjobsMaxAds" dir="ltr" /></div>
|
||||
<div class="filter-group"><label>حداکثر آگهی در هر اجرا</label><input type="number" name="MedjobsMaxAds" min="1" max="500" value="@Model.MedjobsMaxAds" dir="ltr" />
|
||||
<label class="proxy-toggle"><input type="checkbox" name="MedjobsUseProxy" value="true" checked="@Model.MedjobsUseProxy" /> از پروکسی استفاده شود</label>
|
||||
</div>
|
||||
|
||||
<label class="toggle-row">
|
||||
<input type="checkbox" name="WebsitesEnabled" value="true" checked="@Model.WebsitesEnabled" />
|
||||
@@ -124,18 +130,15 @@
|
||||
<div class="filter-group">
|
||||
<label>آدرس صفحهها (هر خط یک URL)</label>
|
||||
<textarea name="WebsiteUrls" rows="3" dir="ltr" placeholder="https://example.ir/jobs/123">@Model.WebsiteUrls</textarea>
|
||||
<label class="proxy-toggle"><input type="checkbox" name="WebsitesUseProxy" value="true" checked="@Model.WebsitesUseProxy" /> از پروکسی استفاده شود</label>
|
||||
</div>
|
||||
|
||||
<hr style="border:none; border-top:1px solid var(--line); margin:18px 0;" />
|
||||
<label class="toggle-row">
|
||||
<input type="checkbox" name="IngestProxyEnabled" value="true" checked="@Model.IngestProxyEnabled" />
|
||||
<span class="t-body"><span>ارسال جمعآوری از طریق پروکسی</span>
|
||||
<span class="t-hint">برای دسترسی به تلگرام و … در ایران (Xray/V2Ray).</span></span>
|
||||
</label>
|
||||
<h3 style="margin-top:0;">پروکسی (Xray/V2Ray)</h3>
|
||||
<div class="filter-group">
|
||||
<label>آدرس پروکسی محلی</label>
|
||||
<input type="text" name="IngestProxyUrl" value="@Model.IngestProxyUrl" dir="ltr" placeholder="socks5://xray:10808" />
|
||||
<p class="muted" style="font-size:12px; margin:4px 0 0;">یک کلاینت Xray/V2Ray کانفیگ vmess/vless/trojan تو را به یک پروکسی محلی تبدیل میکند (socks5:// یا socks4:// یا http://).</p>
|
||||
<p class="muted" style="font-size:12px; margin:4px 0 0;">یک کلاینت Xray/V2Ray کانفیگ vmess/vless/trojan تو را به یک پروکسی محلی تبدیل میکند (socks5:// یا socks4:// یا http://). <strong>هر منبع جداگانه</strong> با تیکِ «از پروکسی استفاده شود» تعیین میکند که از این پروکسی عبور کند یا نه.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user