refactor(server): split socks5 connect logic

- Extract auth logic to helper functions
- Add linter directives for gosec and globals
This commit is contained in:
spkprsnts
2026-05-24 02:18:34 +05:00
parent ff83e76cd2
commit 5e4c2e27ee
2 changed files with 64 additions and 52 deletions

View File

@@ -11,11 +11,11 @@ import (
"golang.org/x/sys/unix"
)
var ( //nolint:gochecknoglobals // process-wide stderr fd filter
stderrFilterOnce sync.Once
stderrPipeWriter *os.File
stderrFilterDone chan struct{}
stderrFilterActive bool
var (
stderrFilterOnce sync.Once //nolint:gochecknoglobals // process-wide stderr fd filter
stderrPipeWriter *os.File //nolint:gochecknoglobals // process-wide stderr fd filter
stderrFilterDone chan struct{} //nolint:gochecknoglobals // process-wide stderr fd filter
stderrFilterActive bool //nolint:gochecknoglobals // process-wide stderr fd filter
)
func installStderrFilter() {