Commit Graph
3 Commits
  • fix(nodetoken): make the corrupt-ciphertext test corrupt deterministically (#6520)
    * fix(nodetoken): make the corrupt-ciphertext test corrupt deterministically
    
    The test replaced the last two characters of the base64 body with "AA", which
    can decode to the very same bytes: the body is RawURLEncoding of a 31-byte
    blob, so the final character carries only 2 significant bits and the decoded
    value is unchanged whenever the tag's last byte is 0x00. Measured over 50000
    encryptions, 170 of those edits corrupted nothing — about one run in three
    hundred fails for a reason that has nothing to do with the codec.
    
    Flipping a bit of the decoded blob always changes the ciphertext, so the test
    now pins the fallback behavior instead of the encoder's tail padding.
    
    * style(nodetoken): trim the helper comment to the two-line limit
    
    CLAUDE.md caps a committed Go comment block at two lines; the why fits.
  • feat(pia): add PIA login-and-add WireGuard outbounds (#6272)
    * feat(pia): add login-and-add WireGuard outbounds (#2)
    
    * fix(pia): keep PIA outbounds identifiable after the editor strips hostname
    
    The outbound editor drops piaHostname, so last-segment matching failed for hyphenated servers. Identify rows by the computed tag, re-encrypt stored tokens onto the active key, skip unusable catalog rows, and always release the catalog refresh latch.
  • feat(nodes): opt-in encryption at rest for the outbound node API token (#6186)
    * node: encrypt outbound bearer token at rest
    
    * fix(nodes): keep bearer tokens encrypted throughout
    
    ---------
    
    Co-authored-by: n0ctal <293235942+n0ctal@users.noreply.github.com>