Skip to content

Conversation

Copy link

Copilot AI commented Nov 19, 2025

Video wallpapers from geo-restricted websites fail to load without proxy support, resulting in black screens. This adds configurable proxy settings (HTTP/HTTPS/SOCKS5) with optional authentication.

Implementation

Core Settings (Sucrose.Memory, Sucrose.Manager)

  • Added 6 proxy constants: ProxyEnabled, ProxyType, ProxyServer, ProxyPort, ProxyUsername, ProxyPassword
  • Created ProxyType enum: None, HTTP, HTTPS, SOCKS5
  • Added validated getters to Engine manager

Engine Integration

  • MPV Player: Injects http-proxy=scheme://[user:pass@]host:port into mpv.conf on startup
  • CefSharp: Adds --proxy-server=scheme://host:port to CefSettings command-line args
  • WebView2: Adds --proxy-server="scheme://host:port" to AdditionalBrowserArguments

UI (Sucrose.Portal)

  • Added Network section to Other Settings with expandable proxy configuration card
  • Fields: enable toggle, type dropdown, server/port inputs, optional username/password
  • All changes persist to Engine settings JSON

Localization

  • Added English strings for Network area, proxy settings, and ProxyType enum values

Example

// MPV Player generates config on startup
if (SMME.ProxyEnabled && !string.IsNullOrEmpty(SMME.ProxyServer) && SMME.ProxyPort > 0)
{
    string protocol = SMME.ProxyType switch {
        SSDEPT.SOCKS5 => "socks5",
        SSDEPT.HTTPS => "https",
        _ => "http"
    };
    Content += $"http-proxy={protocol}://{auth}{SMME.ProxyServer}:{SMME.ProxyPort}";
}

Notes

  • Proxy authentication in CefSharp/WebView2 requires IRequestHandler implementation for full support (username/password fields prepared for future enhancement)
  • Local media engines (Nebula, Xavier, Vexana, Aurora) unaffected - no network access needed
  • Settings require wallpaper restart to take effect

Files changed: 10 files, 375 additions, 1 deletion

Original prompt

This section details on the original issue you should resolve

<issue_title>Could you add a proxy usage function in the settings options?</issue_title>
<issue_description>Is your feature request related to a problem? Please describe.
Hello, could you please add an option to use proxy functions (such as SOCKS5) in the software's settings? When using video links from certain websites, a proxy setup is required; otherwise, the video fails to load and the wallpaper remains completely black.
</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add proxy usage function to settings options Add proxy configuration support for video wallpapers Nov 19, 2025
Copilot AI requested a review from Taiizor November 19, 2025 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Could you add a proxy usage function in the settings options?

2 participants