[package] name = "geo302" version = "0.2.2" edition = "2021" rust-version = "1.64" description = "A simple geoIP-based redirect proxy" readme = "README.md" license = "MIT" repository = "https://github.com/hombit/geo302" keywords = ["geoIP", "http-proxy"] categories = ["web-programming::http-server"] [lib] name = "geo302" path = "src/lib.rs" bench = false [[bin]] name = "geo302" path = "src/bin/main.rs" [profile.release] codegen-units = 1 lto = true strip = true [features] maxminddb = ["dep:maxminddb"] multi-thread = ["tokio/rt-multi-thread"] ripe-geo = [] ripe-geo-autoupdate = ["dep:flate2", "dep:lazy_static", "dep:tar", "multi-thread", "ripe-geo"] ripe-geo-embedded = ["dep:include_dir", "ripe-geo"] full = ["maxminddb", "ripe-geo-autoupdate", "ripe-geo-embedded"] default = ["maxminddb", "ripe-geo-autoupdate"] [dependencies] anyhow = "1" enum_dispatch = "0.3" flate2 = { version = "1", default_features = false, features = ["rust_backend"], optional = true } http-serde = "1.1" # http2 client wouldn't work until this is fixed: # https://github.com/hyperium/hyper-tls/pull/85 # And we don't really need http2 server hyper = { version = "0.14", default_features = false, features = ["client", "http1", "server"] } hyper-tls = "0.5" include_dir = { version = "0.7", optional = true } lazy_static = { version = "1", optional = true } log = { version = "0.4", default_features = false, features = ["std", "serde"] } maxminddb = { version = "0.23", default_features = false, features = ["unsafe-str-decode"], optional = true } serde = { version = "1.0", default_features = false, features = ["derive"] } simple_logger = { version = "4.0", default-features = false } smallvec = { version = "1.9", default_features = false, features = ["union"]} tar = { version = "0.4", default_features = false, optional = true } thiserror = "1" tokio = { version = "1", default_features = false, features = ["rt", "macros", "time"] } toml = "0.7" [dev-dependencies] criterion = "0.5" include_dir = { version = "0.7", features = ["glob"] } [[bench]] name = "benchmark" path = "benches/lib.rs" harness = false