[workspace] members = [ "fuzz", "." ] [package] name = "xmpp-proxy" version = "1.0.0" authors = ["moparisthebest "] description = "XMPP reverse proxy and outgoing proxy" repository = "https://code.moparisthebest.com/moparisthebest/xmpp-proxy" keywords = ["xmpp", "proxy"] license = "AGPL-3.0-or-later" readme = "README.md" edition = "2018" include = [ "**/*.rs", "Cargo.toml", "*.md", "xmpp-proxy.toml", ] [dependencies] toml = "0.8" serde_derive = "1.0" serde = { version = "1.0", features = ["derive"] } futures = "0.3" die = "0.2" anyhow = "1.0" tokio = { version = "1.35", features = ["net", "rt", "rt-multi-thread", "macros", "io-util", "signal", "time"] } ring = "0.17" data-encoding = "2.5" async-trait = "0.1" # logging deps log = "0.4" rand = { version = "0.8", optional = true, features = [] } env_logger = { version = "0.10", optional = true, features = [] } # incoming deps tokio-rustls = { version = "0.24", optional = true } webpki = { package = "rustls-webpki", version = "0.101", optional = true } # outgoing deps lazy_static = "1.4" trust-dns-resolver = { version = "0.23", optional = true } # todo: feature+code for dns-over-rustls #trust-dns-resolver = { version = "0.21", features = ["dns-over-rustls"], optional = true } webpki-roots = { version = "0.25", optional = true } rustls-native-certs = { version = "0.6", optional = true } # todo: feed reqwest the roots we already have reqwest = { version = "0.11", optional = true, default-features = false, features = ["rustls-tls-native-roots", "json", "gzip", "trust-dns"] } # quic deps quinn = { version = "0.10", optional = true } # shared deps needed by quic and incoming rustls = { version = "0.21", optional = true, features = ["dangerous_configuration"] } rustls-pemfile = { version = "1.0", optional = true } # websocket deps tokio-tungstenite = { version = "0.21", optional = true, default-features = false, features = ["handshake"] } futures-util = { version = "0.3", default-features = false, features = ["async-await", "sink", "std"], optional = true } # webtransport deps webtransport-quinn = { version = "0.6", optional = true } # systemd dep nix = { version = "0.27", optional = true, default-features = false, features = ["socket"]} # tokio-xmpp if you want a ServerConnector impl tokio-xmpp = { version = "4.0", optional = true, default-features = false } tokio-util = { version = "0.7", optional = true, features = ["codec"] } [features] default = ["c2s-incoming", "c2s-outgoing", "s2s-incoming", "s2s-outgoing", "tls", "quic", "websocket", "webtransport", "logging", "tls-ca-roots-native", "systemd", "tokio-xmpp"] # you must pick one of these or the other, not both: todo: enable picking both and choosing at runtime # don't need either of these if only doing c2s-incoming tls-ca-roots-native = ["rustls-native-certs", "tokio-rustls", "webpki"] # this loads CA certs from your OS tls-ca-roots-bundled = ["webpki-roots", "webpki"] # this bundles CA certs in the binary # internal use only, ignore srv = ["tokio-rustls", "webpki", "trust-dns-resolver", "reqwest"] incoming = ["rustls-pemfile"] outgoing = ["srv"] c2s = [] s2s = ["srv", "rustls-pemfile"] # you must pick one or more of these, you may pick them all c2s-incoming = ["incoming", "c2s",] c2s-outgoing = ["outgoing", "c2s"] s2s-incoming = ["incoming", "s2s"] s2s-outgoing = ["outgoing", "s2s"] # protocols you want to support todo: split out tls vs starttls ? tls = ["tokio-rustls", "webpki", "rustls"] quic = ["quinn", "rustls"] websocket = ["tokio-tungstenite", "futures-util", "tls"] # websocket+incoming also enables incoming TLS support as it's free webtransport = ["webtransport-quinn", "quic"] # webtransport requires quic logging = ["rand", "env_logger"] systemd = ["nix"] tokio-xmpp = ["dep:tokio-xmpp", "dep:tokio-util", "outgoing"] # enables unit tests that need network and therefore may be flaky net-test = [] [dev-dependencies] serde_json = "1.0" # need this until a release is made with this commit in it [patch.crates-io] webtransport-quinn = { git = "https://github.com/kixelated/webtransport-rs", rev = "ba1a372a7a89e4ba9f9bc027733f82f87aa9a4fd" }