pubky_common/constants.rs
1//! Constants used across Pubky.
2
3/// [Reserved param keys](https://www.rfc-editor.org/rfc/rfc9460#name-initial-contents) for HTTPS Resource Records
4pub mod reserved_param_keys {
5 /// HTTPS (RFC 9460) record's private param key, used to inform browsers
6 /// about the HTTP port to use when the domain is localhost.
7 pub const HTTP_PORT: u16 = 65280;
8}
9
10/// Pubky storage namespace roots.
11pub mod storage {
12 /// Storage root for private data.
13 pub const PRIVATE_ROOT: &str = "/priv/";
14
15 /// Storage root for public, world-readable data.
16 pub const PUBLIC_ROOT: &str = "/pub/";
17}
18
19/// Features advertised by the homeserver client API.
20pub mod features {
21 /// Homeserver supports storage URLs containing the resource owner in the path.
22 pub const PATH_ADDRESSED_STORAGE: &str = "path-addressed-storage";
23}
24
25/// Local test network's hardcoded port numbers for local development.
26pub mod testnet_ports {
27 /// The local test network's hardcoded DHT bootstrapping node's port number.
28 pub const BOOTSTRAP: u16 = 6881;
29 /// The local test network's hardcoded Pkarr Relay port number.
30 pub const PKARR_RELAY: u16 = 15411;
31 /// The local test network's hardcoded HTTP Relay port number.
32 pub const HTTP_RELAY: u16 = 15412;
33 /// The local test network's hardcoded Homeserver ICANN HTTP port number.
34 pub const HOMESERVER_ICANN_HTTP: u16 = 6286;
35 /// The local test network's hardcoded Homeserver Pubky HTTPS port number.
36 pub const HOMESERVER_PUBKY_HTTPS: u16 = 6287;
37 /// The local test network's hardcoded Homeserver admin port number.
38 pub const HOMESERVER_ADMIN: u16 = 6288;
39}