add preresolved ips for public ip resolution

This commit is contained in:
Maple Nebel 2026-05-29 13:56:31 +02:00
commit 2024c80575
2 changed files with 11 additions and 3 deletions

View file

@ -19,7 +19,15 @@ use cfg_if::cfg_if;
use log::error;
use std::error::Error;
const IP_REQ_SERVICE_URLS: &[(&str, &str)] = &[("ipinfo.io:80", "/ip"), ("api.ipify.org:80", "/")];
const IP_REQ_SERVICE_URLS: &[(&str, &str, &str)] = &[
("ipinfo.io:80", "ipinfo.io", "/ip"),
("api.ipify.org:80", "api.ipify.org", "/"),
// preresolved
("34.117.59.81:80", "ipinfo.io", "/ip"),
("104.26.13.205:80", "api.ipify.org", "/"),
("172.67.74.152:80", "api.ipify.org", "/"),
("104.26.12.205:80", "api.ipify.org", "/"),
];
cfg_if! {
if #[cfg(feature = "datastore")] {
@ -68,7 +76,7 @@ User-Agent: RNEX
Accept: */*
"#,
url.1, url.0
url.2, url.1
)
.as_str()
.as_bytes(),

View file

@ -14,7 +14,7 @@ echo ENV SETTINGS:
env
if [[ ! -v RNEX_STATIC ]]; then
cargo test --features "$EDITION_FEATURES" --no-run --verbose
cargo test --features "$EDITION_FEATURES"
else
OPENSSL_LIB_DIR=/usr/lib OPENSSL_INCLUDE_DIR=/usr/include/openssl OPENSSL_STATIC=1 RUSTFLAGS="-C relocation-model=static -C linker=ld.lld" cargo test --features "$EDITION_FEATURES" --target x86_64-unknown-linux-musl
fi