Repository navigation
Add prefer-tcp setting and a public config command - #65
Open
requilence wants to merge 1 commit into
Open
requilence wants to merge 1 commit into
requilence wants to merge 1 commit into
Conversation
Heart dials QUIC first and only falls back to TCP within each dial, so on networks that block or throttle UDP every connection waits for QUIC to fail. AccountCreate/AccountSelect accept preferYamuxTransport, but the CLI never set it. - Send PreferYamuxTransport on every account start (auth login, auth create, service auto-login, automation). The value comes from ANYTYPE_PREFER_TCP, then preferTcp in config.json, then false. - Group user settings in an embedded Config.Settings so logout keeps all of them; the file format is unchanged. - Make `anytype config` public with list/get/set/unset over a key registry (listen-address read-only, prefer-tcp). Drop the hidden accountId/techSpaceId keys and `config reset`, which deleted fallback credentials. - Load the config into a fresh value so keys removed by another process don't linger in long-running processes. - Show the setting in `auth status` and the automation `transport` block. Spec: docs/plans/prefer-tcp-setting.md
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.
Lets users make Anytype connect to sync nodes and peers over TCP before QUIC (UDP), which helps on networks that block or throttle UDP. Heart already supports this through
preferYamuxTransportonAccountCreate/AccountSelect, but the CLI never set it. Spec:docs/plans/prefer-tcp-setting.md.Breaking changes
anytype config get|set accountId|techSpaceIdandanytype config reset. They were undocumented, andresetdeleted the fallback credentials and the saved listen address.auth statusandinspect --jsonstill show the account Id.Changes
PreferYamuxTransport:auth login,auth create, the service's auto-login and the automation logins. The value comes fromANYTYPE_PREFER_TCP, thenpreferTcpin~/.anytype/config.json, thenfalse. An invalid env value prints a warning and is ignored for normal logins and auto-login. Automation fails withinvalid_environmentbefore changing anything. The change applies at the next account start, soservice restartpicks it up without touching the service definition.anytype config: now public, withlist,get,setandunset, and shell completion for keys. Keys live in a small registry incore/config/settings.go.listen-addressis read-only there:setpoints to--listen-address, because the installed service can carry its own address.config listdoesn't take the instance lock.Settingsstruct embedded inConfig. The file format is unchanged, and logout keeps every setting instead of copyingApiListenAddrby hand.Loadnow reads into a fresh value, so keys another process removed don't stay in memory in long-running processes likeshell.auth statusprintsPrefer TCP: <value> (<source>). The automation inspection result gets atransportblock (prefer_tcp,source,observation: configured).Testing
make build,make testandmake lint(0 issues) pass.UpdateSettings,Loaddropping removed keys, theconfigcommands against a tempHOME, the instance lock forconfigsubcommands, and automation create/login sending the flag. Removing the flag from the automation requests makes the tests fail.configcommands against a throwawayHOME.config set prefer-tcp true, restart, and check heart's debug log (dialaddrs orderedyamuxbeforequic).Known gaps (deferred)
--json) interface foranytype config.