A client that restarts with the same node key takes about 5 s to connect
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 24/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- go
- Área
- networking
Línea de trabajo
Read onMeow in tailcat.go (around line 1821 on v0.8.0 and main) and the early return for an already-known client key, then follow discoPrivateForNode to see how the client's disco key is derived from its node key. On the magicsock side, trace what happens to the cached endpoint when the netmap's DiscoKey changes, since that is the path trust the fix relies on. The author has a working fix and test and intends to open a PR, so confirm with them before starting; done means a restarted client connects in a few hundred ms and repeated Ping() within one client keeps its disco key.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I use tailcat as a library with a saved client key, so the server can allowlist it. Each request starts a new client process. When a new process connects soon after the previous one, the connect takes over 5 s instead of a few hundred ms.
Measured with v0.8.0 against one long-running server through a DERP relay, 5 connects back to back and then one after 20 s idle: 416 ms, 10.7 s, then 5.4 to 5.7 s, and 5.6 s after the idle gap. In-process with a local DERP and STUN server: 3.1 s for the first, then 5.07 to 5.36 s for each restart.
What I see in the logs:
- The client's disco key is derived from its node key (
discoPrivateForNode), so every process with the same key file has the same disco key. - On the server,
onMeowreturns early for a client key it already knows (tailcat.go:1821 in v0.8.0, the same on main), before the AllowClient hook. The netmap and the magicsock endpoint stay as they were. - magicsock still trusts the old process's direct UDP address. The server sends its WireGuard handshake response there and it is lost.
- The client retries after WireGuard's 5 s handshake timeout, and by then the server has found the new path.
The fix that works for me:
- A client gets a fresh disco key for each
Client. The server keeps deriving its disco key from its node key, since that key is part of its address. - When a known client sends a meow with a different disco key,
onMeowupdatesDiscoKeyon a clone of the node and pushes the new netmap. magicsock then drops its trust in the old path, and replies go through DERP until the new direct path is found. A known client was already admitted, so this path doesn't call AllowClient again, the same as today.
With that change the same relay sequence gives 489 ms, 1.3 s, then 335 to 383 ms, and 371 ms after 20 s idle. In-process: 3.1 s for the first, then 109 to 125 ms. Repeated Ping() calls inside one client keep the same disco key, so they don't reset a good path.
A fix with a test is ready; I'll open a PR that references this issue.
- Lenguaje dominante
- Go
- Estrellas
- 10.1k
- Forks
- 470
- Merge medio
- 1 d 14 h
- PR fusionados (30 d)
- 19
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de tailscale/tailcat
-
Update Tailscale dependency for Android cgo fallback fixPosiblemente ocupada @lozbrown la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Shring the homebrew binariesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 40/100
tailscale/tailcat#200 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
tailscale/tailcat#190 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de tailscale/tailcat
Issues similares
-
[bug] Explorer trims leading spaces on file namesPosiblemente ocupada @unshade la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
mickael-kerjean/filestash#1033 · 1 comentario ·
-
[BUG] HTTP remote call timeouts can be returned as 500Posiblemente ocupada @XnLemon la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
apache/dubbo-go-pixiu#1096 ·
Los mantenedores suelen responder en 1 día
-
conversation: ConverseAlpha1 and ConverseAlpha2 panic on empty choices or nil function call and return misleading error on scrubber failurePosiblemente ocupada @patelshivani2283-lab la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Validate CHANGELOG PR citationsAbiertometa
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
last9/last9-mcp-server#640 ·
Los mantenedores suelen responder en 1 día