Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracker checker supports more service address formats #1041

Conversation

josecelano
Copy link
Member

@josecelano josecelano commented Sep 12, 2024

UDP Trackers

All the following URLs for UDP trackers are now allowed:

TORRUST_CHECKER_CONFIG='{
    "udp_trackers": [
	"127.0.0.1:6969",
	"127.0.0.1:6969/",
	"127.0.0.1:6969/announce",
	"localhost:6969",
	"localhost:6969/",
	"localhost:6969/announce",
	"udp://127.0.0.1:6969",
	"udp://127.0.0.1:6969/",
	"udp://127.0.0.1:6969/announce",
	"udp://localhost:6969",
	"udp://localhost:6969/",
	"udp://localhost:6969/announce"
    ],
    "http_trackers": [],
    "health_checks": []
}' cargo run --bin tracker_checker

NOTICE: the client will resolve the domain to an IP address if it's needed.

HTTP Trackers

Now, it supports a path suffix (/ or /announce). It will be removed by the client to build
the "scrape" URLs.

This type of URL is widespread in tracker lists like https://newtrackon.com/.

TORRUST_CHECKER_CONFIG='{
    "udp_trackers": [],
    "http_trackers": [
        "http://127.0.0.1:7070",
        "http://127.0.0.1:7070/",
        "http://127.0.0.1:7070/announce"
    ],
    "health_checks": []
}' cargo run --bin tracker_checker

…mats

All the following URL for UDP trackers are allow now:

```console
TORRUST_CHECKER_CONFIG='{
    "udp_trackers": [
	"127.0.0.1:6969",
	"127.0.0.1:6969/",
	"127.0.0.1:6969/announce",
	"localhost:6969",
	"localhost:6969/",
	"localhost:6969/announce",
	"udp://127.0.0.1:6969",
	"udp://127.0.0.1:6969/",
	"udp://127.0.0.1:6969/announce",
	"udp://localhost:6969",
	"udp://localhost:6969/",
	"udp://localhost:6969/announce"
    ],
    "http_trackers": [],
    "health_checks": []
}' cargo run --bin tracker_checker
```

NOTICE: the client will resolve the domain to a socket address if
needed.
@josecelano josecelano force-pushed the 675-tracker-checker-support-different-types-of-tracker-addresses branch from a66d9ec to 520026d Compare September 12, 2024 15:41
Copy link

codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 96.87500% with 3 lines in your changes missing coverage. Please review.

Project coverage is 77.32%. Comparing base (befbe1b) to head (faee02f).
Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
src/console/clients/checker/checks/udp.rs 82.35% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1041      +/-   ##
===========================================
+ Coverage    77.19%   77.32%   +0.13%     
===========================================
  Files          178      178              
  Lines        10180    10269      +89     
===========================================
+ Hits          7858     7941      +83     
- Misses        2322     2328       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…ice address formats

Now it supports a path prefix. It will be remove by the client to build
the "scrape" URLs.

This type of URL is very common in tracker lists like in
https://newtrackon.com/.

```console
TORRUST_CHECKER_CONFIG='{
    "udp_trackers": [],
    "http_trackers": [
	"http://127.0.0.1:7070",
	"http://127.0.0.1:7070/",
	"http://127.0.0.1:7070/announce"
    ],
    "health_checks": []
}' cargo run --bin tracker_checker
```
@josecelano josecelano force-pushed the 675-tracker-checker-support-different-types-of-tracker-addresses branch from 85b1726 to faee02f Compare September 12, 2024 16:38
@josecelano
Copy link
Member Author

ACK faee02f

@josecelano josecelano marked this pull request as ready for review September 12, 2024 16:49
@josecelano josecelano merged commit 633514e into torrust:develop Sep 12, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracker Checker: Support different types of tracker addresses
1 participant