Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatically switch to LocalAddress when accessible #3655

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

kookxiang
Copy link
Contributor

Changes

a server has two addresses: ManualAddress (via internet) + LocalAddress (local only).
when a server LocalAddress is accessible, it should not use ManualAddress.
it seems like this feature was disabled somehow, this PR just enable it

I'd test it on my server and it works well.

image
image

Issues

@sonarcloud
Copy link

sonarcloud bot commented May 18, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@dmitrylyzo
Copy link
Contributor

That's old: https://github.com/jellyfin/jellyfin-web/blame/f5c2a331b0f69c92202aa6c622e2885ed3e6e7ba/src/scripts/site.js#L199

I guess it currently works as you described, only in the standalone mode (or bundled apps): jellyfin/jellyfin-tizen#113 (comment)

After the change, UI will still be loaded from the remote (manual) address, right?

@kookxiang
Copy link
Contributor Author

yes. all resources are loaded from ManualAddress.

so is it safe to turn on this feature by default? or should add option to it?

@thornbill
Copy link
Member

I haven't looked at how this is implemented in the apiclient yet, but this may cause issues with docker installs where the local address can be the IP address of the container on the docker network.

@dmitrylyzo
Copy link
Contributor

In theory, it will try 3 addresses: https://github.com/jellyfin/jellyfin-apiclient-javascript/blob/e8bd1b0e137068b3874ef35720453787e41aba60/src/connectionManager.js#L618-L652
The bundled app does this all the time, iirc

@thornbill thornbill added enhancement Improve existing functionality or small fixes needs testing This PR requires additional testing labels Jun 11, 2022
@sonarcloud
Copy link

sonarcloud bot commented Sep 30, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.3% 0.3% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing functionality or small fixes needs testing This PR requires additional testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants