Conversation
Co-authored-by: tim2zg <59140326+tim2zg@users.noreply.github.com>
…-e9fc06269a7b Fix TypeScript error TS2345 in settings.ts: Add type assertion for desktopProxyConfig
Langugaes
- Added proxy authentication handling in the Electron main process. - Introduced `getLastAppliedConfig` function to retrieve the last applied proxy configuration. - Enhanced the proxy preload script to include a resize window feature. - Updated the proxy window HTML to improve UI with a modern design and better accessibility. - Implemented secure password storage for proxy credentials. - Refactored proxy configuration handling to ensure proper validation and error handling. - Improved the settings management for proxy configurations, including reading and writing to secure storage.
…elds and documentation
|
|
|
Related Documentation No published documentation to review for changes on this repository. |
There was a problem hiding this comment.
Can this be cts instead and be transpiled by typescript into the lib dir instead of avoiding typescript? I.e follow the path of the main preload script
t3chguy
left a comment
There was a problem hiding this comment.
This is exciting, but a few points
Additionally, looks like the autoUpdater won't respect these proxy settings which is problematic without a warning to the user
src/proxy-window.html
Outdated
| @@ -0,0 +1,378 @@ | |||
| <!-- | |||
| Copyright 2026 New Vector Ltd. | |||
There was a problem hiding this comment.
We are not New Vector anymore, this should be your copyright anyway
src/proxy-window.ts
Outdated
| @@ -0,0 +1,96 @@ | |||
| /* | |||
| Copyright 2026 New Vector Ltd. | |||
src/proxy.ts
Outdated
| @@ -0,0 +1,154 @@ | |||
| /* | |||
| Copyright 2026 New Vector Ltd. | |||
There was a problem hiding this comment.
I think this will want to use Compound components for UI, so may need more complexity and likely to be within the main UI rather than entirely standalone. Needs design
src/proxy-window.html
Outdated
| <h1>Network Proxy</h1> | ||
|
|
||
| <div class="section"> | ||
| <span class="section-title">Connection Mode</span> | ||
| <label class="radio-option" | ||
| ><input type="radio" name="mode" id="proxy-mode-system" value="system" checked /> Use system proxy | ||
| settings</label | ||
| > | ||
| <label class="radio-option" | ||
| ><input type="radio" name="mode" id="proxy-mode-direct" value="direct" /> No proxy (direct | ||
| connection)</label | ||
| > | ||
| <label class="radio-option" | ||
| ><input type="radio" name="mode" id="proxy-mode-custom" value="custom" /> Manual configuration</label | ||
| > | ||
| </div> |
There was a problem hiding this comment.
tried it but not sure if it's right
src/proxy-window.html
Outdated
| <input id="proxy-password" type="password" autocomplete="off" /> | ||
| </div> | ||
| </div> | ||
| <div class="helper-text">Passwords are stored securely in the system keychain.</div> |
There was a problem hiding this comment.
I don't think this is true with safeStorage, a single random string is stored in system keychain and other secrets are encrypted symmetrically using it. Additionally the user may have no keychain where this message becauses confusing.
You checked this box but the CLA does not appear to be signed. Could you also include screenshots of what the UI you added looks like? |
…elds and documentation
…g/element-desktop into feat/native-proxy-settings
…g/element-desktop into feat/native-proxy-settings
…g/element-desktop into feat/native-proxy-settings
…g/element-desktop into feat/native-proxy-settings
…g/element-desktop into feat/native-proxy-settings
Added a notice |
Also, the CLA is not okay because I tried using GitHub Copilot at the beginning and didn’t reset the history. GitHub now lists Copilot as a contributor. |
|
Hello, thanks for your contribution @tim2zg! In order to integrate this feature into the product, the form you've proposed will need to be presented in a modal (rather than in a separate browser tab). Then there will be 2 places from which the user can access this modal: From the Welcome screen, and from Settings. Here are visuals to help illustrate:
Ideally, please provide 1.) the modal and form contents and 2.) the settings section block. As for UI components, use those provide by our Compound Design System at https://compound.element.io Here's a quick cheat sheet: |
|
Hey, thanks for the feedback. Would this then be added to the main element app repo or injected into it from the wrapper? And would I then need to open up a second pull request there? Best regards |
|
Yes the UI code would live in element-web & communicate over IPC, there's already a wrapper for settings to handle the IPC communication for you. In the future it may be possible to have the UI code live on the element-desktop side and be injected as a module but we aren't there yet. In the near future element-desktop will be re-merged into the element-web (mono)repo to make contributions like this easier. |





Description
This PR implements a native "Network Proxy" settings window, allowing users to configure their proxy connection directly within the application UI instead of relying on command-line arguments or environment variables.
Changes
defaultSession.Store.Solution for Issue: #772
Checklist
public/exportedsymbols have accurate TSDoc documentation.