Skip to content

feat: [#279] add domain support for UDP trackers#280

Merged
josecelano merged 1 commit into
mainfrom
279-add-domain-support-for-udp-trackers
Jan 20, 2026
Merged

feat: [#279] add domain support for UDP trackers#280
josecelano merged 1 commit into
mainfrom
279-add-domain-support-for-udp-trackers

Conversation

@josecelano
Copy link
Copy Markdown
Member

Summary

Closes #279

Add optional domain field to UDP tracker configuration to allow domain names in announce URLs instead of IP addresses. This feature mirrors the existing domain support in HTTP trackers.

Changes

Domain Layer (src/domain/tracker/config/udp.rs)

  • Add domain: Option<DomainName> field to UdpTrackerConfig
  • Include proper serde attributes for optional field serialization

Application Layer

  • udp_tracker_section.rs: Add domain: Option<String> field with validation using DomainName::new()
  • show/info/tracker.rs: Update to use domain for UDP URLs when available

Infrastructure Layer

  • Update all test fixtures with domain: None for existing UDP tracker constructions

Schema & Config

  • Regenerate JSON schema with new domain field description
  • Update envs/manual-https-test.json with example UDP domain

Testing

  • ✅ All unit tests pass (including 16 new tests for domain serialization)
  • ✅ E2E infrastructure lifecycle tests pass
  • ✅ E2E deployment workflow tests pass
  • ✅ All linting checks pass (clippy, rustfmt, markdownlint, yamllint, shellcheck)
  • ✅ Pre-commit verification complete

Example Usage

{
  "trackers": [
    {
      "name": "udp1",
      "udp": {
        "bind_port": 6969,
        "public_port": 6969,
        "domain": "udp1.tracker.example.com"
      }
    }
  ]
}

Before/After

Before: UDP URLs used IP addresses only

UDP announce URLs:
  Public IPv4: udp://10.123.219.117:6969
  Public IPv6: Not available

After: UDP URLs use domain when configured

UDP announce URLs:
  Public IPv4: udp://udp1.tracker.local:6969
  Public IPv6: Not available

Add optional domain field to UDP tracker configuration to allow domain
names in announce URLs instead of IP addresses.

Changes:
- Add domain field to UdpTrackerConfig (domain layer)
- Add domain field to UdpTrackerSection (application DTO)
- Update show command to use domain for UDP URLs when available
- Regenerate JSON schema with new field
- Update manual test env with UDP domain example
- Update all test fixtures with domain: None
@josecelano josecelano self-assigned this Jan 20, 2026
@josecelano
Copy link
Copy Markdown
Member Author

ACK a8bd087

@josecelano josecelano merged commit aa93c6a into main Jan 20, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Domain Support for UDP Trackers

1 participant