server: send granted traffic from the address the session actually used
fmr binds two IPv4 addresses. connFor picked whichever socket of the right family came first in the bind list, so a downtrain for a session established on .150 went out from .151 — and every packet was dropped by the client's NAT, which has no mapping for that pair. tcpdump on the server showed all 50 leaving; the client saw none. Read as "100% downstream loss", which is the worst kind of wrong: a confident measurement of something that never happened. Sessions now record which of our own bound addresses received their traffic, and granted sends (and delayed echo) go back out through that socket. The fallback to a family match is kept for the case where nothing has been received yet, and the test pins both paths — a single-homed lab can never reproduce this. Also: the client-side halves of the same work — anonymizer (core-privacy), local run archive with retention (core-archive), upload client, and the app's settings and history screens. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
7a94c9a3d7
commit
ce1aaa332a
@@ -18,7 +18,7 @@ func buildClientHello(ciphers []uint16) []byte {
|
||||
var body []byte
|
||||
body = append(body, u16(0x0303)...) // client_version TLS1.2
|
||||
body = append(body, make([]byte, 32)...) // random
|
||||
body = append(body, 0) // session_id len 0
|
||||
body = append(body, 0) // session_id len 0
|
||||
// cipher suites
|
||||
cs := []byte{}
|
||||
for _, c := range ciphers {
|
||||
@@ -36,8 +36,8 @@ func buildClientHello(ciphers []uint16) []byte {
|
||||
exts = append(exts, data...)
|
||||
}
|
||||
// SNI: server_name_list -> host_name "x"
|
||||
sni := append(u16(3), 0) // list len 3, name_type host_name(0)
|
||||
sni = append(sni, u16(1)...) // name len 1
|
||||
sni := append(u16(3), 0) // list len 3, name_type host_name(0)
|
||||
sni = append(sni, u16(1)...) // name len 1
|
||||
sni = append(sni, 'x')
|
||||
addExt(0x0000, sni)
|
||||
// ALPN: protocol_name_list -> "h2"
|
||||
|
||||
@@ -33,7 +33,7 @@ func TestPlainEchoServerSpeaksFirst(t *testing.T) {
|
||||
t.Fatalf("no greeting: %v", err)
|
||||
}
|
||||
var g struct {
|
||||
TLS bool `json:"tls"`
|
||||
TLS bool `json:"tls"`
|
||||
Src string `json:"observed_src"`
|
||||
}
|
||||
if err := json.Unmarshal(line, &g); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user