Refactor authentication system: centralize credential handling in Builder
Major architectural improvement to eliminate duplicate credential embedding and simplify authentication logic across the codebase. Changes: - Builder now generates all URL variants with proper authentication upfront * RTSP: generates URLs with embedded credentials and without (for open cameras) * HTTP/JPEG/MJPEG: generates variants with query params and for Basic Auth - Tester simplified to only test ready-to-use URLs without modification * Removed auth chain logic and multiple authentication method attempts * Removed AuthMethod enum and related complexity * Credentials automatically extracted from URLs when needed - Scanner cleaned up by removing embedCredentialsInURL function * All TestStream calls now use single URL parameter * Removed AuthMethod from DiscoveredStream model Benefits: - Eliminates bug where credentials were added up to 3 times - Centralizes all URL generation logic in one place (Builder) - Cleaner, more maintainable code with clear separation of concerns - Reduces complexity by ~200 lines of code - All authentication scenarios still fully supported
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
# GoReleaser configuration for Strix
|
||||
version: 2
|
||||
|
||||
before:
|
||||
hooks:
|
||||
- go mod tidy
|
||||
- go mod download
|
||||
|
||||
builds:
|
||||
- id: strix
|
||||
main: ./cmd/strix/main.go
|
||||
binary: strix
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- linux
|
||||
- windows
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
- arm
|
||||
goarm:
|
||||
- "7"
|
||||
ignore:
|
||||
- goos: windows
|
||||
goarch: arm
|
||||
- goos: darwin
|
||||
goarch: arm
|
||||
ldflags:
|
||||
- -s -w
|
||||
- -X main.Version={{.Version}}
|
||||
- -X main.BuildDate={{.Date}}
|
||||
- -X main.GitCommit={{.ShortCommit}}
|
||||
|
||||
archives:
|
||||
- id: strix-archive
|
||||
format: tar.gz
|
||||
name_template: >-
|
||||
{{ .ProjectName }}_
|
||||
{{- .Version }}_
|
||||
{{- .Os }}_
|
||||
{{- if eq .Arch "amd64" }}x86_64
|
||||
{{- else if eq .Arch "386" }}i386
|
||||
{{- else }}{{ .Arch }}{{ end }}
|
||||
{{- if .Arm }}v{{ .Arm }}{{ end }}
|
||||
format_overrides:
|
||||
- goos: windows
|
||||
format: zip
|
||||
files:
|
||||
- README.md
|
||||
- LICENSE
|
||||
- webui/**/*
|
||||
- cameras/**/*
|
||||
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
algorithm: sha256
|
||||
|
||||
changelog:
|
||||
sort: asc
|
||||
use: github
|
||||
filters:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
||||
- '^chore:'
|
||||
- typo
|
||||
groups:
|
||||
- title: '🚀 Features'
|
||||
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
|
||||
order: 0
|
||||
- title: '🐛 Bug Fixes'
|
||||
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
|
||||
order: 1
|
||||
- title: '📝 Documentation'
|
||||
regexp: '^.*?docs(\([[:word:]]+\))??!?:.+$'
|
||||
order: 2
|
||||
- title: '🔧 Other'
|
||||
order: 999
|
||||
|
||||
release:
|
||||
github:
|
||||
owner: eduard256
|
||||
name: Strix
|
||||
draft: false
|
||||
prerelease: auto
|
||||
name_template: "v{{.Version}}"
|
||||
header: |
|
||||
## 🦉 Strix v{{.Version}}
|
||||
|
||||
Smart IP Camera Stream Discovery System
|
||||
|
||||
### Installation
|
||||
|
||||
Download the appropriate binary for your platform below and extract it.
|
||||
|
||||
### Usage
|
||||
|
||||
```bash
|
||||
./strix
|
||||
```
|
||||
|
||||
Then open http://localhost:4567 in your browser.
|
||||
|
||||
footer: |
|
||||
**Full Changelog**: https://github.com/eduard256/Strix/compare/{{ .PreviousTag }}...{{ .Tag }}
|
||||
|
||||
snapshot:
|
||||
name_template: "{{ incpatch .Version }}-next"
|
||||
|
||||
dist: dist
|
||||
Reference in New Issue
Block a user