Skip to content

Commit

Permalink
ref: Use patched reqwest to implement resolution restriction
Browse files Browse the repository at this point in the history
This allows us to specify a set of network CIDR's to disallow uptime
checks to.
  • Loading branch information
evanpurkhiser committed Sep 27, 2024
1 parent 6c4ecb2 commit f847742
Show file tree
Hide file tree
Showing 6 changed files with 184 additions and 118 deletions.
109 changes: 9 additions & 100 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "uptime-checker"
version = "0.1.0"
edition = "2021"
rust-version = "1.79"
rust-version = "1.80"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -11,7 +11,7 @@ anyhow = "1.0.66"
clap = { version = "4.4.6", features = ["derive"] }
chrono = { version = "0.4.31", default-features = false, features = ["std", "serde"] }
httpmock = "0.7.0-rc.1"
reqwest = { version = "0.12.4", features = ["hickory-dns"] }
reqwest = { version = "0.12.2", features = ["hickory-dns"] }
rust_arroyo = { version = "*", git = "https://github.com/getsentry/arroyo", rev = "0b84afc07131d8b8d48abcb7c8de8cfa2a98e526" }
tokio = { version = "1.28.0", features = ["macros", "sync", "tracing", "signal", "rt-multi-thread", "test-util"] }
uuid = { version = "1.8.0", features = ["serde", "v4"] }
Expand All @@ -35,9 +35,12 @@ metrics = "0.23.0"
futures = "0.3.30"
tokio-stream = "0.1.15"
redis = { version = "0.26.0", features = ["tokio-comp"] }
ipnet = "2.10.0"
hickory-resolver = "0.24.1"

[patch.crates-io]
rdkafka = { git = "https://github.com/fede1024/rust-rdkafka" }
reqwest = { git = "https://github.com/getsentry/reqwest", branch = "restricted-connector" }

[profile.release]
lto = true
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.79-alpine3.20 as builder
FROM rust:1.80-alpine3.20 as builder

ARG UPTIME_CHECKER_GIT_REVISION
ENV UPTIME_CHECKER_GIT_REVISION=$UPTIME_CHECKER_GIT_REVISION
Expand Down
1 change: 1 addition & 0 deletions src/checker.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pub mod dummy_checker;
pub mod http_checker;
pub mod ip_filter;

use std::future::Future;

Expand Down
Loading

0 comments on commit f847742

Please sign in to comment.