Sunshine icon indicating copy to clipboard operation
Sunshine copied to clipboard

feat(webui): Implement support for reverse proxies

Open psyke83 opened this issue 1 year ago • 1 comments

Description

  • Add "web_ui_address" option to UI Network tab.
  • Add tray icon link handling, with proxy connectivity check to decide which link to open.
  • Add reverse proxy suggestion to Setup document as a hint to circumvent self-signed SSL warnings.

Screenshot

Screenshot_20240403_151525

Issues Fixed or Closed

Resolves #1034

N.B.: this PR doesn't implement the stated proposal in title of #1034 (insecure http support in Sunshine), but instead enhances the url handler to use a proxied address if set by the user, and add some basic documentation on reverse proxying. A reverse proxy should typically proxy the secure https://<host>:47990 address, and self-signed certs shouldn't cause issues (if using Nginx Proxy Manager, at the very least).

Type of Change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Dependency update (updates to dependencies)
  • [x] Documentation update (changes to documentation)
  • [ ] Repository update (changes to repository files, e.g. .github/...)

Checklist

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch must be updated before it can be merged. You must also Allow edits from maintainers.

  • [x] I want maintainers to keep my branch updated

psyke83 avatar Apr 01 '24 03:04 psyke83

Codecov Report

Attention: Patch coverage is 3.84615% with 25 lines in your changes missing coverage. Please review.

Project coverage is 6.50%. Comparing base (2da6fb0) to head (4c6f5b8). Report is 343 commits behind head on master.

Files with missing lines Patch % Lines
src/httpcommon.cpp 0.00% 18 Missing :warning:
src/entry_handler.cpp 0.00% 3 Missing and 3 partials :warning:
src/config.cpp 50.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #2343      +/-   ##
=========================================
- Coverage    6.50%   6.50%   -0.01%     
=========================================
  Files          85      85              
  Lines       18382   18406      +24     
  Branches     8348    8355       +7     
=========================================
+ Hits         1196    1197       +1     
+ Misses      16136   16081      -55     
- Partials     1050    1128      +78     
Flag Coverage Δ
Linux 4.41% <0.00%> (-0.01%) :arrow_down:
Windows 2.00% <0.00%> (-0.01%) :arrow_down:
macOS-12 8.72% <4.16%> (-0.02%) :arrow_down:
macOS-13 8.06% <4.00%> (-0.01%) :arrow_down:
macOS-14 8.38% <4.00%> (-0.01%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/config.h 0.00% <ø> (ø)
src/config.cpp 5.33% <50.00%> (-0.02%) :arrow_down:
src/entry_handler.cpp 5.36% <0.00%> (+0.54%) :arrow_up:
src/httpcommon.cpp 4.06% <0.00%> (-0.48%) :arrow_down:

... and 15 files with indirect coverage changes

codecov[bot] avatar Apr 01 '24 03:04 codecov[bot]