Проход lint (52 → 0): - vkauth/token: переименовать затенённый err (govet shadow x3) - udprelay/loop: явный _ = conn.Close() (errcheck x2) - captcha/manual: ReadHeaderTimeout + html.EscapeString (G112, G705) - proxy/tcpfwd: хелпер nonNegUint64 для байтовых счётчиков io.Copy (G115) - proxy/bondclient, wire/bondframe: bounds-проверки на len->uint16/uint32 - wire/srtpmimicry: задокументирована усечка RTP seq mod 2^16 - dnsdial/doh: bounds-проверка + binary.BigEndian.PutUint16 - captcha/slider: clamp luma до 255 перед конверсией uint8 - vkauth/types: обоснованный nolint для публичных учёток VK SDK Новый пакет internal/randx — Intn/IntN/Float64 на crypto/rand, drop-in замена math/rand. Мигрированы все места antifingerprint-jitter (~22) в captcha, slider, namegen, vkauth, udprelay. GoReleaser: - bump GORELEASER_VERSION v2.5.0 → v2.15.4 в Taskfile и обоих CI-workflow; текущий синтаксис .goreleaser.yaml (archives.ids, format_overrides.formats) требует v2.8+ - миграция dockers + docker_manifests → dockers_v2 (единый блок, multi-platform buildx); Dockerfile.goreleaser использует конвенцию ARG TARGETPLATFORM
172 lines
3.8 KiB
YAML
172 lines
3.8 KiB
YAML
# GoReleaser config: https://goreleaser.com
|
|
version: 2
|
|
|
|
project_name: btp
|
|
|
|
before:
|
|
hooks:
|
|
- go mod download
|
|
|
|
builds:
|
|
# Standard client/server builds — pure Go, no CGO.
|
|
- id: client
|
|
main: ./cmd/client
|
|
binary: client
|
|
flags:
|
|
- -trimpath
|
|
ldflags:
|
|
- -s -w -checklinkname=0 -X main.version={{.Version}}
|
|
env:
|
|
- CGO_ENABLED=0
|
|
targets:
|
|
- linux_amd64
|
|
- linux_arm64
|
|
- linux_386
|
|
- linux_arm_7
|
|
- linux_mipsle_softfloat
|
|
- linux_mips_softfloat
|
|
- linux_mips64le_softfloat
|
|
- linux_riscv64
|
|
- darwin_amd64
|
|
- darwin_arm64
|
|
- windows_amd64
|
|
- windows_arm64
|
|
- windows_386
|
|
- freebsd_amd64
|
|
|
|
- id: server
|
|
main: ./cmd/server
|
|
binary: server
|
|
flags:
|
|
- -trimpath
|
|
ldflags:
|
|
- -s -w -checklinkname=0 -X main.version={{.Version}}
|
|
env:
|
|
- CGO_ENABLED=0
|
|
targets:
|
|
- linux_amd64
|
|
- linux_arm64
|
|
- linux_386
|
|
- linux_arm_7
|
|
- linux_mipsle_softfloat
|
|
- linux_mips_softfloat
|
|
- linux_mips64le_softfloat
|
|
- linux_riscv64
|
|
- darwin_amd64
|
|
- darwin_arm64
|
|
- windows_amd64
|
|
- windows_arm64
|
|
- windows_386
|
|
- freebsd_amd64
|
|
|
|
# Android client only. Pure Go (CGO=0), packaged as native .so name
|
|
# for use as Android native library (JNI / standalone shipment).
|
|
- id: client-android
|
|
main: ./cmd/client
|
|
binary: libvkturn2.so
|
|
no_unique_dist_dir: false
|
|
flags:
|
|
- -trimpath
|
|
ldflags:
|
|
- -s -w -checklinkname=0 -X main.version={{.Version}}
|
|
env:
|
|
- CGO_ENABLED=0
|
|
targets:
|
|
- android_arm64
|
|
- android_arm
|
|
|
|
archives:
|
|
# Default archives for non-Android platforms: tar.gz / zip with bundled binary.
|
|
- id: default
|
|
ids:
|
|
- client
|
|
- server
|
|
name_template: >-
|
|
{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}
|
|
{{- with .Arm }}v{{ . }}{{ end }}
|
|
{{- with .Mips }}-{{ . }}{{ end }}
|
|
format_overrides:
|
|
- goos: windows
|
|
formats: [zip]
|
|
files:
|
|
- LICENSE*
|
|
- README*
|
|
|
|
# Android: ship the .so binary directly (no archive wrapper), with
|
|
# arch suffix so arm64 and arm coexist on the release page.
|
|
- id: android
|
|
ids:
|
|
- client-android
|
|
formats: [binary]
|
|
name_template: "libvkturn2-{{ .Version }}-android-{{ .Arch }}"
|
|
|
|
checksum:
|
|
name_template: checksums.txt
|
|
|
|
sboms:
|
|
- artifacts: archive
|
|
|
|
snapshot:
|
|
version_template: "{{ incpatch .Version }}-snapshot-{{ .ShortCommit }}"
|
|
|
|
changelog:
|
|
use: github
|
|
sort: asc
|
|
groups:
|
|
- title: "Breaking Changes"
|
|
regexp: '^.*?break(\(.+?\))??!?:.+$'
|
|
order: 0
|
|
- title: "Features"
|
|
regexp: '^.*?feat(\(.+?\))??!?:.+$'
|
|
order: 10
|
|
- title: "Bug Fixes"
|
|
regexp: '^.*?fix(\(.+?\))??!?:.+$'
|
|
order: 20
|
|
- title: "Performance"
|
|
regexp: '^.*?perf(\(.+?\))??!?:.+$'
|
|
order: 30
|
|
- title: "Refactoring"
|
|
regexp: '^.*?refactor(\(.+?\))??!?:.+$'
|
|
order: 40
|
|
- title: "Other"
|
|
order: 999
|
|
filters:
|
|
exclude:
|
|
- '^docs:'
|
|
- '^test:'
|
|
- '^chore:'
|
|
- '^ci:'
|
|
- '^style:'
|
|
- 'Merge pull request'
|
|
- 'Merge branch'
|
|
|
|
release:
|
|
github:
|
|
owner: samosvalishe
|
|
name: btp
|
|
prerelease: auto
|
|
mode: replace
|
|
draft: false
|
|
name_template: "{{ .ProjectName }} {{ .Version }}"
|
|
|
|
dockers_v2:
|
|
- id: server
|
|
ids:
|
|
- server
|
|
dockerfile: Dockerfile.goreleaser
|
|
images:
|
|
- ghcr.io/samosvalishe/btp
|
|
tags:
|
|
- "{{ .Version }}"
|
|
- '{{ if not .Prerelease }}latest{{ end }}'
|
|
platforms:
|
|
- linux/amd64
|
|
- linux/arm64
|
|
labels:
|
|
org.opencontainers.image.source: https://github.com/samosvalishe/btp
|
|
org.opencontainers.image.version: "{{ .Version }}"
|
|
org.opencontainers.image.revision: "{{ .FullCommit }}"
|
|
org.opencontainers.image.created: "{{ .Date }}"
|
|
extra_files:
|
|
- docker/entrypoint.sh
|