Refactor gluetun URL to proxy URL

This commit is contained in:
Tyler Flowers 2026-03-22 15:46:03 -04:00 committed by GitHub
parent bc90e1830d
commit 9880b1d4fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 20 additions and 23 deletions

View File

@ -55,7 +55,7 @@ class AppConfigDownloadsSerializer(
)
cookie_import = serializers.BooleanField()
pot_provider_url = serializers.CharField(allow_null=True)
gluetun_url = serializers.CharField(allow_null=True)
proxy_url = serializers.CharField(allow_null=True)
gluetun_control_url = serializers.CharField(allow_null=True)
gluetun_control_key = serializers.CharField(allow_null=True)
gluetun_swap = serializers.BooleanField()

View File

@ -42,7 +42,7 @@ class DownloadsConfigType(TypedDict):
comment_sort: Literal["top", "new"] | None
cookie_import: bool
pot_provider_url: str | None
gluetun_url: str | None
proxy_url: str | None
gluetun_swap: bool
throttledratelimit: int | None
extractor_lang: str | None
@ -93,7 +93,7 @@ class AppConfig:
"comment_sort": "top",
"cookie_import": False,
"pot_provider_url": None,
"gluetun_url": None,
"proxy_url": None,
"gluetun_control_url": None,
"gluetun_control_key": None,
"gluetun_swap": False,

View File

@ -82,11 +82,11 @@ class YtWrap:
if EnvironmentSettings.APP_DIR == "/app":
# container internal only
self.obs["plugin_dirs"].append("/opt/yt_plugins/bgutil")
if gluetun_url := self.config["downloads"].get("gluetun_url"):
if proxy_url := self.config["downloads"].get("proxy_url"):
deep_merge(
self.obs,
{
"proxy": [gluetun_url]
"proxy": [proxy_url]
},
)

View File

@ -23,7 +23,7 @@ export type AppSettingsConfigType = {
comment_sort: string;
cookie_import: boolean;
pot_provider_url: string | null;
gluetun_url: string | null;
proxy_url: string | null;
gluetun_control_url: string | null;
gluetun_control_key: string | null;
gluetun_swap: boolean;

View File

@ -72,7 +72,7 @@ const SettingsApplication = () => {
const [potProviderUrl, setPotProviderUrl] = useState<string | null>(null);
// Gluetun
const [gluetunUrl, setGluetunUrl] = useState<string | null>(null);
const [proxyUrl, setProxyUrl] = useState<string | null>(null);
const [gluetunControlUrl, setGluetunControlUrl] = useState<string | null>(null);
const [gluetunControlKey, setGluetunControlKey] = useState<string | null>(null);
const [gluetunSwap, setGluetunSwap] = useState<boolean>(false);
@ -133,8 +133,8 @@ const SettingsApplication = () => {
// Cookie
setPotProviderUrl(appSettingsConfigData?.downloads.pot_provider_url || null);
// Gluetun
setGluetunUrl(appSettingsConfigData?.downloads.gluetun_url || null);
// Proxy/Gluetun
setProxyUrl(appSettingsConfigData?.downloads.proxy_url || null);
setGluetunControlUrl(appSettingsConfigData?.downloads.gluetun_control_url || null);
setGluetunControlKey(appSettingsConfigData?.downloads.gluetun_control_key || null);
setGluetunSwap(appSettingsConfigData?.downloads.gluetun_swap || false);
@ -774,15 +774,16 @@ const SettingsApplication = () => {
{userConfig.show_help_text && (
<div className="help-text">
<p>
Use a VPN for downloads via Gluetun
Use a Proxy/VPN for downloads
</p>
<ul>
<li>
Using a VPN can help get work around blocked requests if you don't
have or want to use an account.
Using a Proxy or VPN can help get work around blocked requests if
you don't have or want to use an account.
</li>
<li>
This expects you to use and setup{' '}
Enabling Swap IPs will change the VPN's IP if it's blocked from
downloading regular videos. This expects you to use and setup{' '}
<a
target="_blank"
href="https://github.com/qdm12/gluetun"
@ -790,10 +791,6 @@ const SettingsApplication = () => {
Gluetun.
</a>
</li>
<li>
Enabling Swap IPs will change the VPN's IP if it's blocked from
downloading regular videos.
</li>
<li>
Using Swap IPs requires you to configure a control server and use
an API key, see{' '}
@ -818,14 +815,14 @@ const SettingsApplication = () => {
)}
<div className="settings-box-wrapper">
<div>
<p>Gluetun Proxy URL</p>
<p>Proxy URL</p>
</div>
<InputConfig
type="text"
name="downloads.gluetun_url"
value={gluetunUrl}
setValue={setGluetunUrl}
oldValue={appSettingsConfig.downloads.gluetun_url}
name="downloads.proxy_url"
value={proxyUrl}
setValue={setProxyUrl}
oldValue={appSettingsConfig.downloads.proxy_url}
updateCallback={handleUpdateConfig}
/>
</div>

View File

@ -30,7 +30,7 @@ export const useAppSettingsStore = create<AppSettingsState>(set => ({
comment_sort: 'asc',
cookie_import: false,
pot_provider_url: null,
gluetun_url: null,
proxy_url: null,
gluetun_control_url: null,
gluetun_control_key: null,
gluetun_swap: false,