1
0
Fork 0
mirror of https://github.com/mautrix/signal.git synced 2026-05-15 05:36:53 -04:00
Commit graph

43 commits

Author SHA1 Message Date
Tulir Asokan
00f58da3d5 Move keepalive log to debug level. Fixes #473 2024-03-26 18:11:59 +02:00
Tulir Asokan
ea0dfaa61a Set user agents in signal requests 2024-01-14 13:31:17 +02:00
Tulir Asokan
b9f29abfcf Add CDSI client 2024-01-13 16:26:29 +02:00
Sumner Evans
6b98c3f955
signalmeow/web: use context logger, make SendHTTPRequest use context
Signed-off-by: Sumner Evans <me@sumnerevans.com>
2024-01-07 13:23:59 -07:00
Tulir Asokan
429125dbf5 Clean up some attachment-related things 2024-01-03 22:35:24 +02:00
Sumner Evans
59e4efd598
signalmeow: use structured logging
Signed-off-by: Sumner Evans <me@sumnerevans.com>
2024-01-02 21:45:06 -07:00
Sumner Evans
5558469743
http: use http.Method* instead of hard-coded methods
Signed-off-by: Sumner Evans <me@sumnerevans.com>
2024-01-02 21:35:42 -07:00
Tulir Asokan
5842da7c4a Add Signal root CA cert 2023-12-31 17:14:22 +01:00
Tulir Asokan
bb94d392a7 Improve ping command 2023-12-30 20:53:47 +01:00
Tulir Asokan
49ce1f530c Add copyright headers 2023-12-17 15:54:35 +02:00
Scott Weber
8f3f50eb87 Handle ws == nil, and ws reconnect loops 2023-11-22 23:06:41 -05:00
Scott Weber
e20d746376 Increase WS read limit to 1MB from default of 32KB 2023-11-22 21:59:55 -05:00
Scott Weber
b2da336627 Perform "ClearKeysAndDisconnect" on prekey decryption errors
Might be a bit aggressive, but necessary because right now there are a
bunch of bridges with broken prekeys.

Required extensive work on disconnect/reconnect logic.
2023-11-20 22:28:49 -05:00
Scott Weber
da5eb0c8e7 Add TransientDisconnect debouncing, and fix BridgeState sending bug 2023-11-03 16:55:02 -04:00
Scott Weber
b308af43c4 Fix TRANSIENT_DISCONNECT on shutdown again
errors.Wrap would return nil if err was nil, while fmt.Errorf does not
2023-10-02 00:30:09 -04:00
Tulir Asokan
db656d4890 Fix incorrect usage of legacy pkg/errors 2023-09-30 14:39:26 +03:00
Scott Weber
2142a9b3c2 Don't emit bridge state during clean shutdown 2023-09-27 14:25:02 -04:00
Scott Weber
125c686eaa Improve logging for HTTP requests 2023-09-22 10:29:14 -04:00
Scott Weber
12f7bb9df1 Make message sending more robust, particularly in the face of bad networking 2023-09-06 00:47:08 -04:00
Scott Weber
c2460ead6b Fix out-of-bounds in web.go path check 2023-09-05 11:41:35 -04:00
Scott Weber
a12c5bb5d1 Download, decrypt, upload user profile avatar. But need to figure out caching 2023-08-31 20:17:23 -04:00
Scott Weber
f52f236780 Sending images! 2023-08-31 12:58:18 -04:00
Scott Weber
eb3ebdd8ff Can receive a message! (But lots to tidy up here) 2023-08-25 12:56:39 -04:00
Scott Weber
f3fad459f7 More robust bridge states, partial logout support, hopefully more robust mautrix interface code 2023-08-24 15:06:39 -04:00
Scott Weber
2cb24d197b Overhaul SignalWebsocket error handling and hook up to BridgeState 2023-08-22 11:54:35 -04:00
Scott Weber
30aa6b41c0 Fix deadlock in websocket code
- Readloop goroutine gets a new request (incoming message), sends to
  incoming loop
- Incoming request loop goroutine calls incoming message handler
- Incoming message handler needs group info, sends a WS request
- Sendloop goroutine gets request, sends on WS, stores response channel
  in map
- Incoming message handler is blocked waiting on response on it's
  response channel
- Readloop gets some other request, tries to send to incoming loop, but
  gets blocked on sending to incoming request channel because it's
  unbuffered and that goroutine is still blocked waiting on group info
- Server responds with response to group info request, but readloop is
  blocked now forever

The fix: give the incomingRequestChan a large (10000) buffer. Now:

- Readloop goroutine gets a new request (incoming message), sends to
  incoming loop
- Incoming request loop goroutine calls incoming message handler
- Incoming message handler needs group info, sends a WS request
- Sendloop goroutine gets request, sends on WS, stores response channel
  in map
- Incoming message handler is blocked waiting on response on it's
  response channel
- Readloop gets some other request and successfully buffers it in the
  incoming request channel
- Server responds with response to group info request, readloop is *not*
  blocked, and can pass the response down the response channel that the
  incoming message handler is blocked on, and it can finish up
- Incoming request loop is free to continue processing incoming requests
2023-08-18 12:41:21 -04:00
Scott Weber
3410938890 Fix warning 2023-08-17 12:34:10 -04:00
Scott Weber
00195615da Major logging cleanup and full move to zerolog 2023-07-27 18:13:33 -04:00
Scott Weber
099a58a31b Fixes: FFI problems, logging, profile fetch error caching 2023-07-26 10:03:28 -04:00
Scott Weber
8294eedbe3 Disable routing through mitm-proxy 2023-07-24 10:49:32 -04:00
Scott Weber
df8b0db093 Double puppet is working! 2023-07-19 14:54:16 -04:00
Scott Weber
58e64d885d Fetching group metadata from server!
Had to use storage.signal.org, and had to ignore a very misleading
AuthCredentialPresentation lengths in the FFI header, it was leading me
to improperly truncate the presentation before sending >:(
2023-07-16 17:33:28 -04:00
Scott Weber
0b9df4ffde Successfully fetching and unmunging group auth credentials 2023-07-14 15:00:25 -04:00
Scott Weber
82634e2a15 Fetching encrypted profile data and ProfileKeyCredential!
Had to use the right UUID, and convert it to bytes :S
2023-06-29 21:36:09 -04:00
Scott Weber
68c4f2085d Successfully create and send credential request, but it doesn't help get a profile 2023-06-29 17:12:47 -04:00
Scott Weber
f7b62677ba Add a new unauthed websocket, and use it to fetch parts of a profile
but the server won't even send me the encrypted bits yet
2023-06-26 10:43:33 -04:00
Scott Weber
bd401ca051 Fetch a profile without any encrypted fields 2023-06-25 17:21:19 -04:00
Scott Weber
709c5e8dae Rewrite websocket handling again 2023-06-09 12:28:19 -04:00
Scott Weber
4c8a4dc87c Receiving (sealed sender) and sending (not sealed sender) in signalmeow! 2023-05-31 16:43:08 -04:00
Scott Weber
60d2f1cfdb Improve response sending 2023-05-09 17:39:47 -04:00
Scott Weber
67c558853f Receiving unencrypted messages, but not in real time 2023-05-09 16:34:16 -04:00
Scott Weber
f91b2e4d0a Successfully open message receiving WS, but nothing comes down it 2023-05-08 14:47:00 -04:00
Scott Weber
e44fb2d95a Tidy up URLs 2023-05-08 13:47:01 -04:00