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

[Feature] Skip test when Public IP is in a list (#1714) #1795

Merged
merged 8 commits into from
Nov 20, 2024

Conversation

alexjustesen
Copy link
Owner

@alexjustesen alexjustesen commented Nov 19, 2024

πŸ“ƒ Description

Expands on the work in #1714 that implements #1111. Massive thank you to @svenvg93 for getting this ball rolling 🀘.

closes #1111

πŸͺ΅ Changelog

βž• Added

  • GetExternalIpAddress action
  • Network helper

✏️ Changed

  • when skipping an IP address a message will be added to the result.
    • For IP match: "127.0.0.1" was found in public IP address skip list.
    • For IP range match: "127.0.0.1" was found in public IP address skip list within range "127.0.0.0/24".

πŸ”§ Fixed

  • use https://icanhazip.com/ instead of https://ifconfig.co/ to get the public IP address, it's backed by Cloudflare and less likely to be rate limited.

svenvg93 and others added 5 commits November 19, 2024 18:50
* first commit

* Commit it

* lint

* update-all-charts

* push_local_git

* add-timepicker

* add-some-predefined-ranges

* remove whiteline

* Add_env_for_chart_start

* change-env-and_time-ranges

* change_average_to_orange

* Revert "Add failed and thresholds"

* first commit

* change_api

* update comments

* Simplify

* Seperate the IP check
@alexjustesen alexjustesen self-assigned this Nov 20, 2024
@alexjustesen alexjustesen added the πŸŽ‰ feature New feature or request label Nov 20, 2024
@alexjustesen alexjustesen changed the title [Feature] Skip test when Public IP is in an list (#1714) [Feature] Skip test when Public IP is in a list (#1714) Nov 20, 2024
@alexjustesen alexjustesen marked this pull request as ready for review November 20, 2024 12:02
@alexjustesen alexjustesen merged commit 7826d8b into main Nov 20, 2024
1 check passed
@alexjustesen alexjustesen deleted the 1111-skip-test-when-public-ip-address-in-list branch November 20, 2024 12:12
@luckman212
Copy link

Just want to clarify, to use this feature, we add the following Env var? Comma separated list of subnets/exact IPs?

Example:

SPEEDTEST_SKIP_IPS=25.240.0.0/16,98.76.54.32

@alexjustesen
Copy link
Owner Author

Just want to clarify, to use this feature, we add the following Env var? Comma separated list of subnets/exact IPs?

Example:

SPEEDTEST_SKIP_IPS=25.240.0.0/16,98.76.54.32

Correct, example in the docs: https://docs.speedtest-tracker.dev/getting-started/environment-variables#speedtest

@bdleung
Copy link

bdleung commented Nov 21, 2024

Can this be used in reverse to only run tests if a public IP is on a whitelist?

@svenvg93
Copy link
Contributor

Can this be used in reverse to only run tests if a public IP is on a whitelist?

No, this can only be used to define public IPs not to run the test on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
πŸŽ‰ feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Don't run tests when the public IP exists in a list
4 participants