internal/checker+gui: remove voice-srv test (Discord doesn't expose regional voice servers via public DNS)
Build / test (push) Failing after 30s
Build / build-windows (push) Has been skipped
Release / release (push) Failing after 3m20s

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-01 19:02:11 +03:00
parent 9ea777d7b7
commit 11c4eb7f4a
9 changed files with 27 additions and 484 deletions
+1 -104
View File
@@ -8,7 +8,6 @@ import (
"net/http"
"regexp"
"strconv"
"strings"
"time"
)
@@ -63,13 +62,6 @@ type Config struct {
// packets, 20ms between sends.
VoiceBurstCount int
VoiceBurstInterval time.Duration
// VoiceServerHostnames is the list of Discord voice-domain hostnames
// probed in the voice-srv test. Empty means "use the built-in 16-region
// default" (russia, russia2, frankfurt, europe, singapore, japan,
// us-east, us-west, brazil, india, hongkong, southkorea, sydney,
// southafrica, dubai, atlanta — all under .discord.media).
VoiceServerHostnames []string
}
// applyDefaults returns a copy of cfg with zero-valued knobs filled in.
@@ -107,9 +99,6 @@ func applyDefaults(cfg Config) Config {
if cfg.VoiceBurstInterval <= 0 {
cfg.VoiceBurstInterval = 20 * time.Millisecond
}
if len(cfg.VoiceServerHostnames) == 0 {
cfg.VoiceServerHostnames = defaultVoiceHostnames
}
return cfg
}
@@ -135,7 +124,6 @@ func Run(ctx context.Context, cfg Config) <-chan Result {
e.runConnect()
e.runUDP()
e.runVoiceQuality()
e.runVoiceSrv()
e.runAPI()
}()
@@ -165,7 +153,7 @@ type executor struct {
udpClient net.PacketConn
// Step gating: each xOK is set true on success (or "soft pass"
// warn for voice-quality / voice-srv).
// warn for voice-quality).
tcpOK, greetOK, authOK, connectOK, udpOK, voiceQualityOK bool
// Cancellation latch. Once any test emits a "cancelled" failure,
@@ -761,97 +749,6 @@ func (e *executor) runVoiceQuality() {
}
}
// runVoiceSrv — Test 7: probe Discord voice-domain reachability through
// the SOCKS5 proxy. Single attempt (DNS+connect bursts are slow and
// idempotent — retry budget better spent on transient handshake steps).
func (e *executor) runVoiceSrv() {
if e.shouldSkip("voice-srv", e.connectOK) {
return
}
attempt := 1
e.emit(Result{ID: "voice-srv", Status: StatusRunning, Attempt: attempt})
attemptCtx, cancel := context.WithTimeout(e.ctx, e.cfg.PerTestTimeout)
defer cancel()
start := time.Now()
// Per-host dial timeout — fits inside PerTestTimeout but isn't the
// whole budget (we run 8 in parallel, so total wall-clock is roughly
// ceil(N/8) * dialTimeout + DNS).
dialTimeout := e.cfg.PerTestTimeout / 4
if dialTimeout < 500*time.Millisecond {
dialTimeout = 500 * time.Millisecond
}
res, err := runVoiceServerProbe(
attemptCtx, e.cfg.VoiceServerHostnames, e.proxyAddr(),
e.cfg.UseAuth, e.cfg.ProxyLogin, e.cfg.ProxyPassword, dialTimeout,
)
dur := time.Since(start)
if err != nil {
if e.ctx.Err() != nil {
e.emitCancelled("voice-srv", attempt, dur)
return
}
e.emit(Result{
ID: "voice-srv",
Status: StatusFailed,
Error: err.Error(),
Hint: hintFor("voice-srv", err),
Attempt: attempt,
Duration: dur,
})
return
}
if len(res.Resolved) == 0 {
e.emit(Result{
ID: "voice-srv",
Status: StatusFailed,
Error: "no Discord voice domain resolved",
Hint: "DNS не возвращает A-записи для *.discord.media — проверь системный DNS.",
Attempt: attempt,
Duration: dur,
})
return
}
if len(res.Reachable) == 0 {
e.emit(Result{
ID: "voice-srv",
Status: StatusWarn,
Metric: fmt.Sprintf("0/%d regions reachable", len(res.Resolved)),
Hint: "Discord voice-домены резолвятся, но прокси не пропускает к ним TCP — голос с большой вероятностью не заработает.",
Attempt: attempt,
Duration: dur,
})
return
}
// Top-3 region prefixes for the metric line.
top := res.Reachable
if len(top) > 3 {
top = top[:3]
}
prefixes := make([]string, 0, len(top))
for _, h := range top {
prefix := h
if i := strings.Index(h, ".discord.media"); i > 0 {
prefix = h[:i]
}
prefixes = append(prefixes, prefix)
}
metric := fmt.Sprintf("%d/%d regions: %s", len(res.Reachable), len(res.Resolved), strings.Join(prefixes, ", "))
e.emit(Result{
ID: "voice-srv",
Status: StatusPassed,
Metric: metric,
Attempt: attempt,
Duration: dur,
})
}
// runAPI — Test 7: HTTP GET Discord API gateway URL through the proxy.
func (e *executor) runAPI() {
if e.shouldSkip("api", e.connectOK) {