Skip to content

Add per-HTTP-tracker config option to use peer IP from ip GET parameter (sub-issue of #1978) #1987

Description

@josecelano

Goal

Add an optional per-HTTP-tracker configuration setting that allows the tracker to use the IP address provided in the ip GET parameter of the announce request instead of always deriving the peer IP from the TCP connection. Analogous to opentracker's WANT_IP_FROM_QUERY_STRING.

Background

The ip GET parameter (BEP 3) is currently parsed but silently ignored. A user requested the ability to honor it (see #163).

Scope

  • Add use_ip_from_query_string boolean config field (disabled by default)
  • When enabled and a valid IP is provided, use it as the peer address
  • Document security implications (IP spoofing risk)
  • Add contract tests for enabled/disabled behavior

Depends on: #1985 (rename peer_addrip)

Full spec: docs/issues/drafts/1978-add-config-option-to-use-ip-from-announce-query-string/ISSUE.md

Metadata

Metadata

Assignees

Labels

No labels
No labels

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions