2023-02-07 00:22:17 -05:00
|
|
|
[workspace]
|
|
|
|
members = [
|
|
|
|
"fuzz",
|
|
|
|
"."
|
|
|
|
]
|
|
|
|
|
2021-04-12 23:40:44 -04:00
|
|
|
[package]
|
|
|
|
name = "xmpp-proxy"
|
|
|
|
version = "1.0.0"
|
|
|
|
authors = ["moparisthebest <admin@moparisthebest.com>"]
|
|
|
|
|
2021-05-12 00:51:53 -04:00
|
|
|
description = "XMPP reverse proxy and outgoing proxy"
|
2021-04-12 23:40:44 -04:00
|
|
|
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]
|
2023-12-19 23:16:39 -05:00
|
|
|
toml = "0.8"
|
2021-04-12 23:40:44 -04:00
|
|
|
serde_derive = "1.0"
|
|
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
|
|
futures = "0.3"
|
2021-04-27 02:02:02 -04:00
|
|
|
die = "0.2"
|
2021-04-12 23:40:44 -04:00
|
|
|
anyhow = "1.0"
|
2023-12-19 23:16:39 -05:00
|
|
|
tokio = { version = "1.35", features = ["net", "rt", "rt-multi-thread", "macros", "io-util", "signal", "time"] }
|
|
|
|
ring = "0.17"
|
|
|
|
data-encoding = "2.5"
|
2023-08-16 22:30:32 -04:00
|
|
|
async-trait = "0.1"
|
2022-06-21 23:09:50 -04:00
|
|
|
|
2021-04-27 02:02:02 -04:00
|
|
|
|
2021-06-08 00:14:22 -04:00
|
|
|
# logging deps
|
|
|
|
log = "0.4"
|
2021-07-24 01:53:00 -04:00
|
|
|
rand = { version = "0.8", optional = true, features = [] }
|
2023-08-16 22:30:32 -04:00
|
|
|
env_logger = { version = "0.10", optional = true, features = [] }
|
2021-06-08 00:14:22 -04:00
|
|
|
|
2021-04-27 02:02:02 -04:00
|
|
|
# incoming deps
|
2023-08-16 22:30:32 -04:00
|
|
|
tokio-rustls = { version = "0.24", optional = true }
|
2023-08-17 00:21:35 -04:00
|
|
|
webpki = { package = "rustls-webpki", version = "0.101", optional = true }
|
2021-04-27 02:02:02 -04:00
|
|
|
|
|
|
|
# outgoing deps
|
2023-08-16 22:30:32 -04:00
|
|
|
lazy_static = "1.4"
|
2023-12-19 23:16:39 -05:00
|
|
|
trust-dns-resolver = { version = "0.23", optional = true }
|
2022-07-16 16:27:41 -04:00
|
|
|
# todo: feature+code for dns-over-rustls
|
2022-06-21 23:09:50 -04:00
|
|
|
#trust-dns-resolver = { version = "0.21", features = ["dns-over-rustls"], optional = true }
|
2023-08-16 22:30:32 -04:00
|
|
|
webpki-roots = { version = "0.25", optional = true }
|
2022-02-10 01:18:35 -05:00
|
|
|
rustls-native-certs = { version = "0.6", optional = true }
|
2022-07-16 16:27:41 -04:00
|
|
|
# todo: feed reqwest the roots we already have
|
2022-02-13 14:45:13 -05:00
|
|
|
reqwest = { version = "0.11", optional = true, default-features = false, features = ["rustls-tls-native-roots", "json", "gzip", "trust-dns"] }
|
2021-04-27 02:02:02 -04:00
|
|
|
|
|
|
|
# quic deps
|
2023-08-16 22:30:32 -04:00
|
|
|
quinn = { version = "0.10", optional = true }
|
2022-01-19 01:09:32 -05:00
|
|
|
|
|
|
|
# shared deps needed by quic and incoming
|
2023-08-16 22:30:32 -04:00
|
|
|
rustls = { version = "0.21", optional = true, features = ["dangerous_configuration"] }
|
|
|
|
rustls-pemfile = { version = "1.0", optional = true }
|
2021-04-27 02:02:02 -04:00
|
|
|
|
2021-07-28 02:24:08 -04:00
|
|
|
# websocket deps
|
2023-12-19 23:16:39 -05:00
|
|
|
tokio-tungstenite = { version = "0.21", optional = true, default-features = false, features = ["handshake"] }
|
2022-02-10 01:18:35 -05:00
|
|
|
futures-util = { version = "0.3", default-features = false, features = ["async-await", "sink", "std"], optional = true }
|
2021-07-28 02:24:08 -04:00
|
|
|
|
2023-12-19 22:28:48 -05:00
|
|
|
# webtransport deps
|
|
|
|
webtransport-quinn = { version = "0.6", optional = true }
|
|
|
|
|
2022-07-18 01:49:56 -04:00
|
|
|
# systemd dep
|
2023-12-19 23:16:39 -05:00
|
|
|
nix = { version = "0.27", optional = true, default-features = false, features = ["socket"]}
|
2022-07-18 01:49:56 -04:00
|
|
|
|
2021-04-27 02:02:02 -04:00
|
|
|
[features]
|
2023-12-19 22:28:48 -05:00
|
|
|
default = ["c2s-incoming", "c2s-outgoing", "s2s-incoming", "s2s-outgoing", "tls", "quic", "websocket", "webtransport", "logging", "tls-ca-roots-native", "systemd"]
|
2022-07-16 16:27:41 -04:00
|
|
|
|
|
|
|
# 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
|
2023-08-16 22:30:32 -04:00
|
|
|
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
|
2022-07-16 16:27:41 -04:00
|
|
|
|
|
|
|
# internal use only, ignore
|
2023-08-16 22:30:32 -04:00
|
|
|
srv = ["tokio-rustls", "webpki", "trust-dns-resolver", "reqwest"]
|
2022-07-16 16:27:41 -04:00
|
|
|
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"]
|
2022-01-19 01:09:32 -05:00
|
|
|
|
2022-07-16 16:27:41 -04:00
|
|
|
s2s-incoming = ["incoming", "s2s"]
|
|
|
|
s2s-outgoing = ["outgoing", "s2s"]
|
|
|
|
|
|
|
|
# protocols you want to support todo: split out tls vs starttls ?
|
2023-08-16 22:30:32 -04:00
|
|
|
tls = ["tokio-rustls", "webpki", "rustls"]
|
2022-07-16 16:27:41 -04:00
|
|
|
quic = ["quinn", "rustls"]
|
|
|
|
websocket = ["tokio-tungstenite", "futures-util", "tls"] # websocket+incoming also enables incoming TLS support as it's free
|
2023-12-19 22:28:48 -05:00
|
|
|
webtransport = ["webtransport-quinn", "quic"] # webtransport requires quic
|
2022-07-16 16:27:41 -04:00
|
|
|
|
|
|
|
logging = ["rand", "env_logger"]
|
2022-07-18 01:49:56 -04:00
|
|
|
systemd = ["nix"]
|
2022-02-27 02:04:06 -05:00
|
|
|
|
2023-08-18 23:00:35 -04:00
|
|
|
# enables unit tests that need network and therefore may be flaky
|
|
|
|
net-test = []
|
|
|
|
|
2022-02-27 02:04:06 -05:00
|
|
|
[dev-dependencies]
|
|
|
|
serde_json = "1.0"
|
2023-12-19 22:28:48 -05:00
|
|
|
|
|
|
|
# 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" }
|
|
|
|
|