fix(proxy): persist proxy config so it survives saves and reconnects - #72
Open
sunxiaobin89 wants to merge 1 commit into
Open
fix(proxy): persist proxy config so it survives saves and reconnects#72sunxiaobin89 wants to merge 1 commit into
sunxiaobin89 wants to merge 1 commit into
Conversation
Proxy settings (type, host, port, username, password) were never persisted: ConnectionData had no proxy fields and every save/update path omitted them. Saving a connection (new or edited) silently dropped the proxy config, so reopening the edit dialog showed empty proxy fields. - Add proxy fields to ConnectionData so the storage model can hold them - Include proxy fields in every save/update path in ConnectionDialog (new connect, edit save, SSH/SFTP/FTP/Desktop) and in duplication - Add toConnectionConfig helper to carry proxy settings when opening the edit dialog, replacing 9 duplicated ConnectionConfig constructions - Fix proxy username input missing value binding so saved data displays - Normalize proxyType to 'none' for connections without proxy settings Test: 522 tests pass, 12 new tests cover proxy persistence
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Proxy settings (type, host, port, username, password) configured on a connection were never persisted. Any save — creating a new connection, editing an existing one, or a failed connect that still saved the connection — silently dropped the proxy config. Reopening the Edit dialog showed empty proxy fields.
Root cause
ConnectionData) had no proxy fields, so no save operation could store them.ConnectionDialog(new connect, edit save) and the connection duplication flow omitted proxy fields.ConnectionData → ConnectionConfigconversions inApp.tsx(9 sites) dropped proxy fields, so the edit dialog never received them.Changes
src/lib/connection-storage.ts— addproxyType,proxyHost,proxyPort,proxyUsername,proxyPasswordtoConnectionData.src/lib/connection-config.ts(new) —toConnectionConfig()maps stored connections to the dialog config, carrying proxy settings; replaces 9 duplicated constructions inApp.tsx.src/components/connection-dialog.tsx— include proxy fields in all 5 save/update calls (SSH, SFTP/FTP/Desktop, edit save); bindvalueon the proxy username input so saved data displays; normalizeproxyTypeto'none'when loading a connection without proxy settings.src/components/connection-manager.tsx— duplication preserves proxy settings.Testing
toConnectionConfigproxy mapping, storage round-trip, and dialog persistence (edit save, failed connect keeps proxy, edit dialog shows saved values).tsc --noEmitclean,pnpm i18n:checkclean, no new lint issues.