mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat(download-clients): rtorrent support Digest Auth (#1596)
* feat(download-clients): rtorrent support basic auth * feat(download-client): implement new auth logic * fix(download-client): tests store * chore(deps): update go-rtorrent to v1.11.0
This commit is contained in:
parent
861f30c144
commit
0d53f7e5fc
11 changed files with 231 additions and 71 deletions
|
@ -14,7 +14,7 @@ import { classNames, sleep } from "@utils";
|
|||
import { DEBUG } from "@components/debug";
|
||||
import { APIClient } from "@api/APIClient";
|
||||
import { DownloadClientKeys } from "@api/query_keys";
|
||||
import { DownloadClientTypeOptions, DownloadRuleConditionOptions } from "@domain/constants";
|
||||
import { DownloadClientAuthType, DownloadClientTypeOptions, DownloadRuleConditionOptions } from "@domain/constants";
|
||||
import Toast from "@components/notifications/Toast";
|
||||
import { useToggle } from "@hooks/hooks";
|
||||
import { DeleteModal } from "@components/modals";
|
||||
|
@ -34,6 +34,12 @@ interface InitialValuesSettings {
|
|||
username: string;
|
||||
password: string;
|
||||
};
|
||||
auth?: {
|
||||
enabled: boolean;
|
||||
type: string;
|
||||
username: string;
|
||||
password: string;
|
||||
};
|
||||
rules?: {
|
||||
enabled?: boolean;
|
||||
ignore_slow_torrents?: boolean;
|
||||
|
@ -267,12 +273,19 @@ function FormFieldsRTorrent() {
|
|||
/>
|
||||
)}
|
||||
|
||||
<SwitchGroupWide name="settings.basic.auth" label="Basic auth" />
|
||||
<SwitchGroupWide name="settings.auth.enabled" label="Auth" />
|
||||
|
||||
{settings.basic?.auth === true && (
|
||||
{settings.auth?.enabled && (
|
||||
<>
|
||||
<TextFieldWide name="settings.basic.username" label="Username" />
|
||||
<PasswordFieldWide name="settings.basic.password" label="Password" />
|
||||
<SelectFieldBasic
|
||||
name="settings.auth.type"
|
||||
label="Auth type"
|
||||
placeholder="Select auth type"
|
||||
options={DownloadClientAuthType}
|
||||
tooltip={<p>This should in most cases be Basic Auth, but some providers use Digest Auth.</p>}
|
||||
/>
|
||||
<TextFieldWide name="settings.auth.username" label="Username" />
|
||||
<PasswordFieldWide name="settings.auth.password" label="Password" />
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue