mirror of
https://github.com/idanoo/autobrr
synced 2025-07-25 09:49:13 +00:00
feat: add support for proxies to use with IRC and Indexers (#1421)
* feat: add support for proxies * fix(http): release handler * fix(migrations): define proxy early * fix(migrations): pg proxy * fix(proxy): list update delete * fix(proxy): remove log and imports * feat(irc): use proxy * feat(irc): tests * fix(web): update imports for ProxyForms.tsx * fix(database): migration * feat(proxy): test * feat(proxy): validate proxy type * feat(proxy): validate and test * feat(proxy): improve validate and test * feat(proxy): fix db schema * feat(proxy): add db tests * feat(proxy): handle http errors * fix(http): imports * feat(proxy): use proxy for indexer downloads * feat(proxy): indexerforms select proxy * feat(proxy): handle torrent download * feat(proxy): skip if disabled * feat(proxy): imports * feat(proxy): implement in Feeds * feat(proxy): update helper text indexer proxy * feat(proxy): add internal cache
This commit is contained in:
parent
472d327308
commit
bc0f4cc055
59 changed files with 2533 additions and 371 deletions
4
web/src/types/Indexer.d.ts
vendored
4
web/src/types/Indexer.d.ts
vendored
|
@ -11,6 +11,8 @@ interface Indexer {
|
|||
enabled: boolean;
|
||||
implementation: string;
|
||||
base_url: string;
|
||||
use_proxy?: boolean;
|
||||
proxy_id?: number;
|
||||
settings: Array<IndexerSetting>;
|
||||
}
|
||||
|
||||
|
@ -35,6 +37,8 @@ interface IndexerDefinition {
|
|||
protocol: string;
|
||||
urls: string[];
|
||||
supports: string[];
|
||||
use_proxy?: boolean;
|
||||
proxy_id?: number;
|
||||
settings: IndexerSetting[];
|
||||
irc: IndexerIRC;
|
||||
torznab: IndexerTorznab;
|
||||
|
|
19
web/src/types/Irc.d.ts
vendored
19
web/src/types/Irc.d.ts
vendored
|
@ -20,6 +20,8 @@ interface IrcNetwork {
|
|||
channels: IrcChannel[];
|
||||
connected: boolean;
|
||||
connected_since: string;
|
||||
use_proxy: boolean;
|
||||
proxy_id: number;
|
||||
}
|
||||
|
||||
interface IrcNetworkCreate {
|
||||
|
@ -53,23 +55,8 @@ interface IrcChannelWithHealth extends IrcChannel {
|
|||
last_announce: string;
|
||||
}
|
||||
|
||||
interface IrcNetworkWithHealth {
|
||||
id: number;
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
server: string;
|
||||
port: number;
|
||||
tls: boolean;
|
||||
pass: string;
|
||||
nick: string;
|
||||
auth: IrcAuth; // optional
|
||||
invite_command: string;
|
||||
use_bouncer: boolean;
|
||||
bouncer_addr: string;
|
||||
bot_mode: boolean;
|
||||
interface IrcNetworkWithHealth extends IrcNetwork {
|
||||
channels: IrcChannelWithHealth[];
|
||||
connected: boolean;
|
||||
connected_since: string;
|
||||
connection_errors: string[];
|
||||
healthy: boolean;
|
||||
}
|
||||
|
|
27
web/src/types/Proxy.d.ts
vendored
Normal file
27
web/src/types/Proxy.d.ts
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (c) 2021 - 2024, Ludvig Lundgren and the autobrr contributors.
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
interface Proxy {
|
||||
id: number;
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
type: ProxyType;
|
||||
addr: string;
|
||||
user?: string;
|
||||
pass?: string;
|
||||
timeout?: number;
|
||||
}
|
||||
|
||||
interface ProxyCreate {
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
type: ProxyType;
|
||||
addr: string;
|
||||
user?: string;
|
||||
pass?: string;
|
||||
timeout?: number;
|
||||
}
|
||||
|
||||
type ProxyType = "SOCKS5" | "HTTP";
|
Loading…
Add table
Add a link
Reference in a new issue