Skip to content

Releases

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 26 Nov 17:24

This release is breaking: store::StoreError implements From<rusqlite::Error>, and that
rusqlite is now 0.43.

Security

  • The bundled SQLite is 3.54.1, which fixes RUSTSEC-2026-0459 / CVE-2026-119375 (a database
    opened with a crafted -wal file of another page size could return uninitialized memory).
    rusqlite goes from 0.39 to 0.43 with the bundled feature still on, and so
    libsqlite3-sys goes from 0.37.0 to 0.40.0. libsqlite3-sys declares links = "sqlite3",
    so a build can hold only one version of it: a dependent that uses rusqlite or
    libsqlite3-sys itself must move to rusqlite 0.43 / libsqlite3-sys 0.40 too. The
    cargo deny ignore for the advisory is gone.

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 26 Nov 15:36

These additions are breaking: new variants in public enums and a new field on a public struct.

Added

  • Relay tests, as simplex-chat 7.1.4's /relay test (Commands.hs APITestChatRelay):
    Client::test_chat_relay(address) -> RelayTestResult / Request::TestChatRelay (JS
    testChatRelay). The address's link is read, joined with a random 32-byte challenge in
    x.grp.relay.test, PQ off, and the relay must answer with the challenge signed by the
    address's root key within 40 seconds; the test connection is deleted either way. The
    answer is types::Event::RelayTest with RelayTestResult { address, name, failure },
    where RelayTestFailure { step: RelayTestStep, error } carries 7.1.4's relayTestError
    messages.
  • Adding relays to a channel the user owns (Commands.hs APIAddGroupRelays):
    Client::add_channel_relays(group, relays) / Request::AddChannelRelays (JS
    addChannelRelays). The new relays go through creation's own invitation, acceptance and
    roster steps, and the link data is published again with every relay that may serve. Once
    the channel has subscribers (publicMemberCount over 1, counted as updatePublicMemberCount
    does), the relays already serving get a signed x.grp.relay.new for each newly active one.
    A subscriber joins a relay an owner's verified x.grp.relay.new names (Subscriber.hs
    xGrpRelayNew).
  • ChannelRelay::web_domain: the relay's RelayCapabilities.webDomain.
  • The owner publishes publicMemberCount as updatePublicMemberCount counts it (current
    members, the owner among them, less the relays) instead of always 1.
  • Docs: why every channel leg is PQ off, traced through 7.1.4 and fdbcb24d
    (ChannelRelay::pq, README security notes). Relays never replay a post with no text and no
    file, so a channel send_data with an empty fallback_text reaches only current
    subscribers (send_data, send_signed_data, README). A record of the live interop run is in
    docs/channels-live.md.

Changed

  • Breaking: new variants types::Request::{TestChatRelay, AddChannelRelays},
    types::Event::RelayTest, RequestKind::RelayTest and
    engine::records::{ConnKind::RelayTest, Lookup::RelayTest}, and a new field on
    ChannelRelay.

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 26 Nov 13:14

Added

  • Channels (simplex-chat 7.1.4 useRelays groups), owner and subscriber, through official
    chat relays (simplex-chat --relay):
    • Client::set_chat_relays / Request::SetChatRelays(Vec<ChatRelay>) (JS
      setChatRelays) names the relays new channels use; only these are ever used.
      ChatRelay::presets() lists 7.1.4's preset chat relays, never used by default.
    • Client::create_channel(name) / Request::NewChannel (JS createChannel) makes a
      channel: a root key whose sha256 is the channel's id, the owner's member key authorised
      by it (OwnerAuth), the /c# link under it, then each relay invited with a signed
      x.grp.relay.inv, its x.grp.relay.acpt link checked to name it, the empty roster sent
      and acknowledged, and its link published with LSET. Each relay's status (RelayStatus)
      is on ChatGroup.channel (ChannelInfo, ChannelRelay) and every change is told as
      types::Event::ChannelRelay.
    • Posts as the channel: text, edits, deletes and send_data in a channel go to its relays
      with asGroup; Client::send_signed_data / Request::SendSignedData (JS
      sendSignedData) signs them with the owner's member key. A signed body over 15 602 bytes
      is refused before it is sent.
    • connect takes a channel's link: the link is read (LGET), its id checked, its owners kept
      with their keys, and each relay joined with a signed x.member as observer. Posts as
      the channel arrive as Messages by Author::Channel / MessageAuthor::Channel, or as
      Event::Data { member: None }, each once however many relays bring it; the relays'
      history replay comes the same way. An observer's post is refused locally
      (groupUserRole: required role author). Leaving sends a signed x.grp.leave.
    • Signatures follow 7.1.4's channel rules (groupBindingData: (publicGroupId, memberId); requiresSignature).
    • Codec: typed x.grp.relay.{inv,acpt,test,new,reject,cap} and x.grp.roster{,.ack,.request},
      GroupProfile::public_group_profile(), and the channel types in chat::channel.
    • Agent: lookup_link (read an address's link data without joining it), create_channel_link
      and set_link_data (LSET); the in-memory server handles LSET.
  • Every channel connection is PQ off (PQSupportOff), as 7.1.4 makes them; channels are not
    end-to-end encrypted and relays keep every post. ChannelRelay::pq shows each relay
    connection's negotiated state.

Changed

  • Breaking: new variants in chat::ChatEvent (the relay and roster events, which decoded
    to Unknown before), types::Event, types::Request, MessageAuthor, client::Author,
    ChatNotice, agent::client::AgentEvent and the engine's AgentEvent; new methods on the
    AgentPort trait (lookup_link, create_channel_link, set_link_data); new fields on
    ChatGroup, MemberRecord, GroupRecord and SettingsRecord. Stored records still open:
    the agent's connection record has a new format (6) and reads formats 1 to 5.
  • A channel link (/c#) is joined instead of refused; a relay's own address (/r#) is
    still refused.

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 13:47

Added

  • Application data. Request::SendData { chat, tag, json, fallback_text }
    (client.send_data; JS friend.sendData(tag, data, fallbackText), group.sendData)
    sends json as x.msg.new with the content type tag. The official apps do not know the
    type and show fallback_text, as simplex-chat 7.1.4 does for any MCUnknown; a live test
    checks that the official CLI 7.1.4 keeps it as an item with that text. Content types
    registered at start (ClientBuilder::data_tag, Config::data_tags; JS
    Client.start({ dataTags })) arrive as Event::Data { chat, member, tag, json } (JS
    data) instead of a message. Neither side keeps an item. A tag the apps know or with
    spaces, and data with a type or text key, are refused. Data under a tag not
    registered still arrives as a message with its fallback text. Breaking: Request,
    types::Event and client::Event have new variants and Config a new field.
  • Friend.pq (JS friend.pq): whether the connection's ratchet uses the post-quantum KEM
    both ways, as negotiated, not as asked for. It is what the ratchet used for the last
    message sent and the last received (rcSndKEM, rcRcvKEM), checked after each one as
    simplex-chat 7.1.4 keeps pqSndEnabled and pqRcvEnabled (connPQEnabled), so it is
    false until a message has gone each way and stays false with a peer without PQ. It is read
    from the ratchets at each start too, so friends from before this release are listed right.
    The chat list goes out again when it changes. A live test checks it against the official CLI
    7.1.4. Breaking: Friend has a new field and the AgentPort trait a new method,
    pq_on.
  • ClientBuilder::start takes an exclusive OS file lock (std::fs::File::try_lock on
    chat.db.lock in the client's folder), held by the engine thread until close() returns.
    A second client on the same folder, in this process or another, fails with the new
    Error::Locked(folder) instead of writing the same store. Breaking: client::Error
    has a new variant.
  • ClientBuilder::key_zeroizing(Zeroizing<String>) takes the store passphrase in a buffer
    that wipes itself, and Config::key is now a Zeroizing<String>. The client keeps no
    other copy: the engine thread takes the key out of its config and wipes it as soon as the
    store is open (or the open failed), and the wasm client's options wipe theirs once the
    store is open. ClientBuilder::key(impl Into<String>) still works; an owned String is
    taken and wiped the same way. Config's Debug shows the key as <redacted>. Not wiped:
    a &str the caller passed, the JS string in wasm, and the hashing state Argon2id
    (and HKDF, for a store from before Argon2id) keeps while it runs. Breaking:
    Config::key is a Zeroizing<String>.
  • Sends are tied to their outcome. Client::send, reply, send_file, send_link,
    send_live, send_data and forward (and the same methods on Friend, Group, Chat
    and Message) return a SendHandle, and what becomes of the send arrives as
    client::Event::SendStatus { handle, member, status }: Queued { item } with the
    message it made, or Refused { code, detail } at once instead of an unlinked
    Raw(Failed); then Sent or Failed { detail } for the friend, or for each member of
    a group, as the agent reports SENT or MERR. Underneath, Request::Tagged { tag, request } wraps any request, and types::Event::SendStatus { tag, member, status } (JS
    sendStatus) tells its outcome. A file is told once per recipient: Sent when the last
    part of their description has gone after the upload (its offer alone is not the file),
    Failed when the offer or a part fails, and Failed with no member when the upload
    fails or the file is cancelled or deleted first. Tags are kept in memory, so a send still
    going when the client stops is told nothing after the restart. In JS, send, reply,
    sendLink, sendLive, sendData and forward resolve with their tag, sendFile goes
    tagged too (its queued status names the message it resolves with), and a sendStatus
    handler gets { tag, member, status, item?, code?, detail? } (TypeScript
    SendStatusEvent), the code named as rejections name it. Breaking:
    those methods return Result<SendHandle> instead of Result<()> (a send(…)? used as a
    match arm's value needs a ;), and Request and both Events have new variants. In JS
    those sends resolve with a number instead of undefined, and a refusal of one other than a
    limit arrives as its sendStatus instead of a raw Failed event.
  • ClientBuilder::roster_deltas(true) (JS rosterDeltas: true): the client tells what
    changed instead of whole chat lists. The new Event::FriendUpdate and Event::GroupUpdate
    (JS friendUpdate, groupUpdate) join the adds and removes, and Raw(Chats) comes only
    after the new Client::refresh() (JS client.refresh()) asks for it. friends() and
    groups() stay current, and create_group still resolves. The engine sends only what
    changed too: with the new Config::roster_deltas it marks each friend, group and request
    where it is saved or dropped and sends types::Event::ChatsChanged with those alone, so a
    change costs the same whatever the roster's size; the first list, a refresh and a change
    to the user's preferences (which every friend shows) are whole. A test checks every list
    the engine suite produces against the marks. Off by default, so nothing changes for a
    client that does not ask. Breaking: client::Event and types::Event have new
    variants and Config a new field.
  • Documented how a program learns the friends it had before a restart: client.friends()
    (and groups()) is complete as soon as ClientBuilder::start returns, and FriendAdd
    is only for friends new since. A test holds the client to it. A FriendAdd replay at
    start was not added: it would announce as new what is not, and every program would have to
    tell the two apart.
  • A testing cargo feature makes the in-memory SMP server and agent test doubles public
    (agent::testing: FakeSmp, FakeConnector, Node, …, and the certificate builder
    they use, smp::testing) and adds ClientBuilder::start_in_memory(&server), which
    starts a real Client (agent, engine and store) on an in-memory server the clients of a
    test share. Downstream crates can run end-to-end tests with no network: such a client
    does not check its relays (NativeAgent::without_relay_tests) and uses no XFTP relay, so
    files do not go. CI builds and lints the feature and runs tests/in_memory.rs, where two
    clients connect, talk and send application data, and a friend removed right after a
    message gets both, and a client hearing roster deltas gets a friend's change as one.

Fixed

  • Removing a friend (and a group member, and leaving a group) deleted the connection with
    everything still waiting to be sent on it, so the peer never got x.direct.del and a
    message sent just before was sometimes lost. AgentPort::delete and the agent's delete
    take a wait flag, which does what deleteConnectionsAsync with waitDelivery does in
    simplexmq: the receive queue goes at once, so nothing more arrives, and the connection
    stays until what waits on it is delivered or given up, across a restart too, or 2 days
    at most (connDeleteDeliveryTimeout). As in simplex-chat 7.1.4, the engine waits only
    after telling the peer: removing a friend once x.direct.del went, leaving a group,
    removing a member, and deleting a group as its owner; every other deletion is at once. A
    live test removes a friend right after writing to them and sees the official CLI 7.1.4
    get both the message and the deletion. Breaking: AgentPort::delete and
    AgentClient::delete take the wait flag.

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 11:46

Added

  • client.saveChanges() (JS) and Store::export_changes save only the rows written since the
    last save, and Client.start({snapshot, changes}) and Store::open_snapshot_with_changes
    open a snapshot with the changes kept after it. A change costs what it wrote: with 30,000
    messages in wasm, save() takes 95 ms for 22.5 MB, and saveChanges() after one message
    under 1 ms for 1 KB. Each delta is MAC'd and chained to its snapshot and the delta before
    it; a missing, repeated or reordered one is StoreError::ChangesDoNotFollow (JS
    changes_do_not_follow), and deltas of an older snapshot are skipped. Breaking:
    StoreError has this new variant, so an exhaustive match on it needs an arm. The README and the
    Node bot example keep a log of changes instead of saving the whole store on every change.

  • Disappearing messages, as SimpleX Chat 7.1.4 has them. Request::SetTimer { chat, ttl }
    (friend.set_timer, group.set_timer; JS friend.setTimer(seconds),
    group.setTimer(seconds), null for off) offers a friend a timer in the profile they are
    sent, or sets a group's as an owner. Each message then carries its ttl and is deleted with
    its file: the user's own counts from sending, a received one from when MarkRead reads it.
    A friend's timer is taken over from their profile without an answer, as the official apps
    do, and the conversation gets a ChatNotice::Timer whenever the timer that applies changes.
    The timers last across restarts: what came due while the client was off goes at the next
    start. Friend.timer and ChatGroup.timer give the timer that applies, and
    ChatMessage.timed (JS message.ttl, message.expiresAt) a message's own. Breaking:
    Request, RequestKind and ChatNotice have new variants and ChatMessage, Friend and
    ChatGroup new fields.

  • Chat preferences, the user's own and per friend, as SimpleX Chat 7.1.4 has them.
    Request::SetPrefs { friend, prefs } (client.set_prefs, friend.set_prefs; JS
    client.setPrefs({ voice: "no" }), friend.setPrefs(...)) sets full delete, reactions,
    voice, files, calls and the "allow" of disappearing messages to always, yes or no,
    for every friend or over the user's own for one. Each friend whose profile it changes is
    sent the new one (APIUpdateProfile, APISetContactPrefs). What is on between the user and
    a friend follows both sides (prefEnabled; only disappearing messages are symmetric), and
    shows in Friend.features (JS friend.features); Friend.prefs and ChatProfile.prefs hold
    what the user set. A voice message from a friend the user does not allow is no longer kept.
    Breaking: Request and RequestKind have new variants, Friend and ChatProfile new
    fields, and UserRecord is no longer Eq.

  • Group admin, as SimpleX Chat 7.1.4 has it: Request::SetMemberRole, BlockMemberForAll,
    RemoveMember (with or without the member's messages), DeleteGroup, SetGroupProfile
    (name and description), SetGroupPrefs and Moderate, with the senders' role checks from
    Commands.hs (APIMembersRole, APIBlockMembersForAll, APIRemoveMembers, APIDeleteChat,
    APIUpdateGroupProfile, APIDeleteMemberChatItem). Rust: member.set_role,
    block_for_all, remove, group.delete, set_profile, set_prefs, message.moderate;
    JS the same in camelCase. A role change goes to every current member and the member too; a
    block to the others; a removal to all before the member's connection goes once delivered; an
    invited member's new role goes in their invitation again. Deleting a group removes
    everything kept about it. GroupMember.role, blocked_for_all, ChatGroup.role and
    description show the result, and a role change made by anyone now leaves a
    ChatNotice::MemberRole. A live test runs all of it against two official CLIs.
    Breaking: Request, RequestKind and ChatNotice have new variants, GroupMember and
    ChatGroup new fields.

  • What the user keeps for themselves, as SimpleX Chat 7.1.4 has it: Request::DeleteForMe
    (APIDeleteChatItem internal), ClearChat (APIClearChat), MarkReadUpTo
    (APIChatItemsRead), SetUnreadMark (APIChatUnread), SetAlias (APISetContactAlias,
    APISetGroupAlias) and SetMessageTtl (APISetChatItemTTL, APISetChatTTL), which
    deletes messages older than a TTL every half hour, for every chat or one, keeping a group's
    last 12 hours. Rust: message.delete_for_me, mark_read_up_to, friend.clear,
    set_unread_mark, set_alias, set_message_ttl (and on Group), client.set_message_ttl;
    JS the same in camelCase. Friend.alias, item_ttl, ChatGroup.alias, item_ttl,
    ChatPreview.marked_unread and ChatProfile.item_ttl show them, and Event::Cleared says a
    chat was cleared. Breaking: Request, RequestKind and Event have new variants, and
    Friend, ChatGroup, ChatPreview and ChatProfile new fields.

  • Voice messages: FileKind::Voice (JS "voice") sends MCVoice with its length, refused
    where the friend or the group does not allow the user's voice messages (Commands.hs
    featureAllowed SCFVoice forUser, Internal.hs prohibitedGroupContent). Received ones show
    as MessageBody::Voice(Media) with their duration instead of a plain file. JS sendFile
    takes { caption, duration, preview } as a fourth argument, which it could not send before.
    Breaking: MessageBody::Voice holds a Media instead of secs and wave, and
    FileKind has a new variant.

  • Link previews: Request::SendLink { chat, text, preview, reply_to } (client.send_link;
    JS friend.sendLink(text, { uri, title, description, image })) sends MCLink, and a
    received link's preview is kept in ChatMessage.link (JS message.link) instead of being
    dropped; group history keeps it too. Breaking: Request has a new variant and
    ChatMessage a new field.

  • Forwarding: Request::Forward { from, item, to } (friend.forward(&message),
    group.forward; JS the same) sends a message to another chat as the user's own with
    forward: true (APIForwardChatItems, mcForward): text and link previews as they are, a
    file again when it is here, else its caption. A received forward shows in
    ChatMessage.forwarded (JS message.forwarded). Breaking: Request has a new variant,
    ChatMessage a new field, and the engine's send_file takes a FileMeta.

  • Live messages, written as the other side watches: Request::SendLive and UpdateLive { done }
    (friend.send_live, message.update_live; JS sendLive, updateLive) send live: true
    until done (APISendMessages live, APIUpdateChatItem). Received ones show in
    ChatMessage.live, and their updates are not marked edited (edited = itemLive /= Just True). A disappearing live message counts from when it is done. An edit now carries the
    message's timer, as upstream's does. Breaking: Request has new variants and
    ChatMessage a new field.

  • Direct chats with group members: Request::ContactMember { group, member, text }
    (member.contact; JS the same) makes a one-time invitation and sends it with text over the
    member's group connection in x.grp.direct.inv (APICreateMemberContact,
    APISendMemberContactInvitation), where the group allows the user direct messages. The member
    shows as a friend, connecting, until they accept. Breaking: Request has a new variant.

  • "Fix connection": Request::SyncRatchet { chat, member, force } (friend.fix_connection,
    member.fix_connection; JS fixConnection) starts a ratchet re-sync with a friend or a group
    member, with force even while the connection works (APISyncContactRatchet,
    APISyncGroupMemberRatchet). The engine already started one by itself when a connection
    needed it. The agent port's synchronize_ratchet takes force. Breaking: Request has a
    new variant and AgentPort::synchronize_ratchet a new argument.

  • Address settings: Request::SetAddressSettings { auto_accept, auto_reply }
    (client.set_address_settings; JS setAddressSettings({ autoAccept, autoReply })) accepts
    requests to the address as they come and sends the auto-reply to each friend made through it
    once connected, however the request was accepted (APISetAddressSettings, Subscriber.hs
    autoAccept, sendAutoReply).
    Request::ShareAddress(on) (JS shareAddress) shows the address in the profile every
    friend gets (APISetProfileAddress), and deleting the address takes it out. A friend's shown
    address is in Friend.address; the settings in ChatProfile. Breaking: Request has
    new variants, Friend and ChatProfile new fields, and UserRecord and AddressRecord new
    fields.

  • Incognito: Request::CreateIncognitoInvite, ConnectIncognito(link) and
    AcceptIncognito(request) (client.create_incognito_invite, connect_incognito,
    request.accept_incognito; JS createInvite({ incognito: true }),
    connect(link, { incognito: true }), request.acceptIncognito()) make a friend who knows
    the user only by a random name from upstream's word lists (generateRandomProfile), with
    the default preferences and no picture, in the invitation's link data, the handshake and
    every later profile. Friend.incognito holds the name. A retried invitation stays incognito.
    Joining a group through an incognito friend, inviting one into a group, and connecting to a
    group link incognito are refused, as none of them could keep the user's profile out
    (CEContactIncognitoCantInvite); an incognito friend is judged against the default
    preferences, as they were sent (mergeUserChatPrefs'). Breaking: Request has new variants and
    Friend a new field; JS createInvite and connect take an optional options argument.

Fixed

  • The profile sent to friends said disappearing messages were allowed, so an official app
    offered its user a timer, but this client kept thei...
Read more

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 24 Nov 17:08

Security

  • The HPACK integer decoder refuses a sixth continuation byte before shifting, so a 32-bit
    (wasm) build no longer shifts past its word size on a hostile header block.
  • The HTTP/2 frame reader drops taken bytes once per read instead of once per frame, so a
    server that sends many tiny frames costs linear time, not quadratic.
  • Tunnel Worker: a lease renewal that reaches the per-IP counter after the tunnel's release no
    longer takes the slot back for up to 30 minutes.
  • A snapshot whose item or id counter is at its maximum is refused as damaged when the counter
    would move, instead of panicking (debug) or wrapping to a negative id (release).
  • Breaking: the store key is required: ClientBuilder::start fails without .key(…)
    (it used to default to an empty key that anyone could open), and JS Client.start refuses
    an empty key. A new store derives its key with Argon2id (19 MiB, 2 passes, 1 lane) over
    the passphrase and a random per-store salt kept in its kdf meta row, instead of one
    unsalted HKDF. Stores made before still open with their old key and are not upgraded.
  • Snapshots are authenticated as a whole: format 2 ends with an HMAC over every byte, so a
    changed, deleted or rolled-back row or a rewound counter is refused on open. The id counters
    are checked against a sealed copy in both backends, which a store from before gets on its
    first open, and SQLite overwrites deleted rows (secure_delete). In SQLite, putting back an
    older sealed row is still not detected.
  • Breaking (tunnel Worker): it is no longer an open TCP proxy by default. Without
    ALLOWED_HOSTS it reaches only the preset SimpleX SMP and XFTP relays; ALLOWED_HOSTS adds
    hosts and ALLOWED_HOSTS=* allows any public host. Every record the client sends before the
    relay's first encrypted record is checked (a second ClientHello after a HelloRetryRequest
    too), the relay must answer in TLS records, and the per-IP limits fail closed when the
    counter or the rate limiter errors.
  • A blocking TLS read that fails for any reason but a timeout now fails every later read and
    write too, as the sans-I/O client already did; a retry could otherwise skip a forged record.
  • TLS refuses handshake messages that span a key change (RFC 8446 section 5.1): the encrypted
    server flight sent unencrypted in the ServerHello record, anything after the server Finished
    in its record, and anything after a KeyUpdate in its record.
  • Stricter TLS 1.3 checks: the ServerHello must carry supported_versions = TLS 1.3, an
    extension type may appear once, EncryptedExtensions may only answer what the ClientHello
    offered, a CertificateRequest must carry signature_algorithms, records over the plaintext
    limit are refused with record_overflow, and a record sequence number never wraps.
  • The blocking SMP connect (TCP, TLS and the SMP handshake) ends with SmpError::Timeout at
    ConnConfig::connect_timeout, then the next host is tried; the timeout used to bound each
    socket read, so a server dripping a byte now and then held a connect forever. Blocking XFTP
    connects bound TCP and TLS by the connect timeout and the handshake by one per request.
  • Server certificates must be valid now: verify_server_chain checks every certificate's
    notBefore and notAfter (no skew allowance, as upstream), in SMP connects, PKEY and XFTP. The
    time comes from the new ConnConfig::wall_clock and xftp::ClientConfig::wall_clock
    (default smp::system_wall_clock); verify_server_chain and HandshakeConfig take it too.
  • SMP and XFTP connects check the server's pinned identity inside the TLS handshake, before the
    client Finished, as upstream does; new TlsStream::connect_pinned, TlsClient::start_pinned,
    tls::Pin and TlsError::Identity.
  • The tunnel pool redials at once after a 1000 lifetime close only when the session was up
    and the tunnel lived an hour; earlier ones wait out the back-off, so a hostile tunnel cannot
    force a reconnect loop.
  • A forwarded command's answer (PRES) under the command's own nonce is refused as the proxy's
    error before it is opened; it could only be the proxy reflecting the client's own PFWD body.
  • A relay can no longer replace a connection's per-queue key through a message header to force
    a ratchet re-sync: once set, the stored key is always used, as simplexmq does.
  • A message that fails to decrypt no longer advances or saves the ratchet, so a tampered copy
    can't destroy the key the genuine message needs.
  • Ed25519 signatures are checked with verify_strict.
  • Ratchet and agent secrets are wiped from memory after encoding and loading.
  • Envelopes above the supported client versions are refused, and invitation short links get
    the same server check as addresses.

Added

  • simplex_client::limits: every limit and rule of the official SimpleX Chat 7.1.4 client in
    one module, each with its upstream source (reactions, file sizes, message size, mentions,
    names, bio, pictures, edit and delete windows, group roles), and limits::check for a
    request.

  • The engine refuses what breaks them before sending, with new codes: ReactionNotAllowed,
    FileTooLarge, TextTooLong, TooManyMentions, InvalidName, NotAllowed and
    PictureTooLarge (SX-CHT-018 to 024); JS rejects with reaction_not_allowed,
    file_too_large, text_too_long, too_many_mentions, invalid_name, not_allowed and
    picture_too_large. Client::request fails at once for the rules that need no lookup.

  • Display and group names are checked as upstream's mkValidName does, at most 50
    characters; a changed bio is at most 160 bytes; a new store's name is checked at start.

  • A friend's fourth reaction on a message, or one on a message without content, is ignored.

  • File transfers in the wasm build (browser, Node.js and Bun): friend.sendFile,
    group.sendFile, message.download() and the fileProgress event, over a sans-I/O XFTP
    session on a sans-I/O HTTP/2 client.

  • Private message routing (SMP proxying, PRXY/PFWD) with the chat's defaults; set it with
    ClientBuilder::private_routing / allow_direct, or privateRouting / allowDirect in JS.

  • Initial extraction from the author's app, ported from simplex-chat v7.1.4 and simplexmq
    commit fdbcb24d.

  • Protocol stack: SMP queues, the agent's double ratchet with the post-quantum KEM, chat
    messages, contacts, groups, XFTP files and calls.

  • Low-level public modules: smp, agent, ratchet, chat, crypto, xftp, tls, h2,
    encoding, store, engine, types.

  • High-level Client with a builder, an event stream and request methods (native feature,
    on by default).

  • wasm feature: the pure protocol core and small wasm-bindgen bindings for
    wasm32-unknown-unknown.

  • The full client on wasm32-unknown-unknown: a JS Client (Client.start, named events,
    Promise-returning calls) on a single-threaded runtime, reaching relays through a WebSocket
    byte tunnel with TLS inside wasm; examples/browser is a minimal chat page.

  • The same build on Node.js 22+ and Bun, over direct TCP with no tunnel; a simplex-client npm
    package (built by scripts/build-js.sh, not published) and examples/node/bot.mjs.

  • store: an in-memory backend beside SQLite, and export_snapshot/open_snapshot for a
    sealed, versioned snapshot of either.

  • CI for formatting, clippy, tests, wasm, MSRV 1.95, cargo-deny and docs.

  • Files in the wasm build, in browsers, Node.js and Bun: friend.sendFile(bytes, name),
    group.sendFile(bytes, name), message.download() resolving with {name, bytes}, and a
    fileProgress event. Transfers run in memory, up to setFileLimit bytes (64 MiB unless
    set), over the tunnel or TCP.

  • h2::H2Client and xftp::XftpSession: sans-I/O HTTP/2 and XFTP, driven by bytes in and out.

  • Event::Offline(true) at a start without a network, from the first relay check, and
    Offline(false) once a relay answers again.

  • Private message routing: messages, confirmations, SKEY, LKEY and LGET for someone else's
    relay go through one of our own relays (PRXY/PFWD), so that relay never sees our IP
    address. Config::proxy_mode and Config::proxy_fallback choose when; they default to the
    chat's unknown (proxy unless the relay is one of ours) and protected (never fall back to
    a direct connection, as this client has no SOCKS or onion transport). AgentConfig has the
    same settings, defaulting to the agent's never.

  • The preset relays in use are checked like own relays when the config names none.

  • Chat notices for a peer's address switch and for ratchet re-syncs
    (ChatNotice::AddressSwitch, ChatNotice::RatchetSync).

  • The JS package runs on Bun too; CI runs the JS tests on Node.js and Bun.

  • Objects to act on: Message (reply, react, edit, delete, author, chat),
    FriendRequest (accept, reject), Friend (send, remove, history, show_code),
    Group (send, add_member, leave, members), GroupInvite and Member, in Rust and
    in JS. The client keeps the chat list: friend(id), friends(), groups(), and
    create_group returns the new Group (JS: client.friends, client.groups,
    createGroup).

Changed

  • Ratchet::decrypt no longer advances on failure; MsgEncryptKey::encrypt_msg takes self.
  • JS rejections carry a snake-case code everywhere (no_connection instead of
    SX-CHT-004); a file over the memory limit rejects with file_too_large, not too_large.
  • JS calls that queue a request (send, react, edit, delete, …) now reject when the
    request breaks a limit, instead of resolving.
  • setFileLimit never goes above 1 GiB, the official client's file limit.
  • A message whose JSON is over 15 602 bytes is refused even when it would compress to fit,
    as upstream refuses it.
  • types::REACTION_EMOJI is limits::REACTIONS, a slice; chat::reaction::REACTION_EMOJI is
    gone.
  • Breaking: `simplex_client::...
Read more