1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Add known proxies config option

This commit is contained in:
cvium 2020-09-10 11:10:24 +02:00
parent c1a7c7ab62
commit 17fb508d04
3 changed files with 13 additions and 0 deletions

View file

@ -43,6 +43,11 @@
<input is="emby-input" type="text" id="txtLanNetworks" label="${LabelLanNetworks}" />
<div class="fieldDescription">${LanNetworksHelp}</div>
</div>
<div class="inputContainer">
<input is="emby-input" type="text" id="txtKnownProxies" label="${LabelKnownProxies}" />
<div class="fieldDescription">${KnownProxiesHelp}</div>
</div>
</fieldset>
<fieldset class='verticalSection verticalSection-extrabottompadding'>

View file

@ -30,6 +30,11 @@ import 'emby-select';
}).filter(function (s) {
return s.length > 0;
});
config.KnownProxies = form.querySelector('#txtKnownProxies').value.split(',').map(function (s) {
return s.trim();
}).filter(function (s) {
return s.length > 0;
});
config.IsRemoteIPFilterBlacklist = form.querySelector('#selectExternalAddressFilterMode').value === 'blacklist';
config.PublicPort = form.querySelector('#txtPublicPort').value;
config.PublicHttpsPort = form.querySelector('#txtPublicHttpsPort').value;
@ -108,6 +113,7 @@ import 'emby-select';
page.querySelector('#txtPublicHttpsPort').value = config.PublicHttpsPort;
page.querySelector('#txtLocalAddress').value = config.LocalNetworkAddresses[0] || '';
page.querySelector('#txtLanNetworks').value = (config.LocalNetworkSubnets || []).join(', ');
page.querySelector('#txtKnownProxies').value = (config.KnownProxies || []).join(', ');
page.querySelector('#txtExternalAddressFilter').value = (config.RemoteIPFilter || []).join(', ');
page.querySelector('#selectExternalAddressFilterMode').value = config.IsRemoteIPFilterBlacklist ? 'blacklist' : 'whitelist';
page.querySelector('#chkRemoteAccess').checked = config.EnableRemoteAccess == null || config.EnableRemoteAccess;

View file

@ -451,6 +451,7 @@
"ItemCount": "{0} items",
"Items": "Items",
"Kids": "Kids",
"KnownProxiesHelp": "Comma separated list of IP addresses of known proxies used when connecting to your Jellyfin instance. This is required to make proper use of X-Forwarded-For headers. Requires a reboot after saving.",
"Label3DFormat": "3D format:",
"LabelAbortedByServerShutdown": "(Aborted by server shutdown)",
"LabelAccessDay": "Day of week:",
@ -598,6 +599,7 @@
"LabelInNetworkSignInWithEasyPasswordHelp": "Use the easy pin code to sign in to clients within your local network. Your regular password will only be needed away from home. If the pin code is left blank, you won't need a password within your home network.",
"LabelInternetQuality": "Internet quality:",
"LabelKeepUpTo": "Keep up to:",
"LabelKnownProxies": "Known proxies:",
"LabelKidsCategories": "Children's categories:",
"LabelKodiMetadataDateFormat": "Release date format:",
"LabelKodiMetadataDateFormatHelp": "All dates within NFO files will be parsed using this format.",