mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +00:00
web/privacy: add support for always proxying files
This commit is contained in:
parent
a9e65b0da0
commit
d0d0f16c5f
5 changed files with 22 additions and 3 deletions
|
@ -101,6 +101,10 @@
|
|||
"privacy.analytics.description": "we use a self-hosted plausible instance for getting an approximate number of active cobalt users. no identifiable information about you is ever stored. all processed data is anonymized and aggregated.\n\nplausible does not use any cookies and is fully compliant with GDPR, CCPA, and PECR.",
|
||||
"privacy.analytics.learnmore": "learn more about plausible's dedication to privacy.",
|
||||
|
||||
"privacy.tunnel": "tunnelling",
|
||||
"privacy.tunnel.title": "always tunnel all files",
|
||||
"privacy.tunnel.description": "cobalt will always hide your ip address and browser info from the source service. this also helps bypass local network restrictions.",
|
||||
|
||||
"advanced.debug": "debug",
|
||||
"advanced.debug.title": "enable debug features",
|
||||
"advanced.debug.description": "gives you access to a page with various info that can be useful for debugging.",
|
||||
|
|
|
@ -9,7 +9,9 @@ import type { Optional } from "$lib/types/generic";
|
|||
import type { CobaltAPIResponse, CobaltErrorResponse } from "$lib/types/api";
|
||||
|
||||
const request = async (url: string) => {
|
||||
const saveSettings = get(settings).save;
|
||||
const gSettings = get(settings);
|
||||
const saveSettings = gSettings.save;
|
||||
const privacySettings = gSettings.privacy;
|
||||
|
||||
const request = {
|
||||
url,
|
||||
|
@ -29,6 +31,8 @@ const request = async (url: string) => {
|
|||
|
||||
twitterGif: saveSettings.twitterGif,
|
||||
tiktokH265: saveSettings.tiktokH265,
|
||||
|
||||
alwaysProxy: privacySettings.alwaysProxy,
|
||||
}
|
||||
|
||||
await apiOverrideWarning();
|
||||
|
|
|
@ -29,6 +29,7 @@ const defaultSettings: CobaltSettings = {
|
|||
youtubeDubBrowserLang: false,
|
||||
},
|
||||
privacy: {
|
||||
alwaysProxy: false,
|
||||
disableAnalytics: false,
|
||||
},
|
||||
processing: {
|
||||
|
|
|
@ -23,6 +23,7 @@ type CobaltSettingsAdvanced = {
|
|||
};
|
||||
|
||||
type CobaltSettingsPrivacy = {
|
||||
alwaysProxy: boolean,
|
||||
disableAnalytics: boolean,
|
||||
};
|
||||
|
||||
|
|
|
@ -2,11 +2,20 @@
|
|||
import env from "$lib/env";
|
||||
import { t } from "$lib/i18n/translations";
|
||||
|
||||
import SettingsCategory from "$components/settings/SettingsCategory.svelte";
|
||||
import SettingsToggle from "$components/buttons/SettingsToggle.svelte";
|
||||
import OuterLink from "$components/misc/OuterLink.svelte";
|
||||
import SettingsToggle from "$components/buttons/SettingsToggle.svelte";
|
||||
import SettingsCategory from "$components/settings/SettingsCategory.svelte";
|
||||
</script>
|
||||
|
||||
<SettingsCategory sectionId="tunnel" title={$t("settings.privacy.tunnel")}>
|
||||
<SettingsToggle
|
||||
settingContext="privacy"
|
||||
settingId="alwaysProxy"
|
||||
title={$t("settings.privacy.tunnel.title")}
|
||||
description={$t("settings.privacy.tunnel.description")}
|
||||
/>
|
||||
</SettingsCategory>
|
||||
|
||||
{#if env.PLAUSIBLE_ENABLED}
|
||||
<SettingsCategory sectionId="analytics" title={$t("settings.privacy.analytics")}>
|
||||
<SettingsToggle
|
||||
|
|
Loading…
Reference in a new issue