refactor: вынести namegen в internal-пакет, расширить пулы имён

- Перенос client/namegen.go в client/internal/namegen с экспортируемым
  Generate()
- Вынос данных имён в data/*.txt, загрузка через //go:embed
- Расширение пулов: мужские 729→760, женские 31→99, фамилии 60→286
  (вкл. мем-имена)
- Переписан feminizeSurname через []rune (убрана хрупкая байтовая
  арифметика на len-4)
- Переход с math/rand на math/rand/v2
- Юнит-тесты: parseLines, feminizeSurname, целостность пулов, форма и
  покрытие по полу у Generate
This commit is contained in:
samosvalishe committed 2026-05-18 17:51:27 +03:00
1 parent ead97d0089
commit b3f81add0e
7 files changed
+1389 -884

No files matched your search

+2 -1
View File
@@ -31,6 +31,7 @@ import (
"github.com/cacggghp/vk-turn-proxy/client/internal/browserprofile"
"github.com/cacggghp/vk-turn-proxy/client/internal/captcha"
"github.com/cacggghp/vk-turn-proxy/client/internal/dnsdial"
"github.com/cacggghp/vk-turn-proxy/client/internal/namegen"
"github.com/cacggghp/vk-turn-proxy/tcputil"
"github.com/cbeuw/connutil"
"github.com/google/uuid"
@@ -584,7 +585,7 @@ func getTokenChain(ctx context.Context, link string, streamID int, creds VKCrede
return "", "", nil, fmt.Errorf("failed to initialize tls_client: %w", err)
}
name := generateName()
name := namegen.Generate()
escapedName := neturl.QueryEscape(name)
log.Printf("[STREAM %d] [VK Auth] Connecting Identity - Name: %s | User-Agent: %s", streamID, name, profile.UserAgent)