mirror of
https://github.com/Yonle/bostr.git
synced 2025-03-27 18:11:43 +01:00
67 lines
2.0 KiB
Plaintext
67 lines
2.0 KiB
Plaintext
|
|
// Bostr config
|
|
|
|
module.exports = {
|
|
// Server listener [Required]
|
|
address: "0.0.0.0",
|
|
port: "8080",
|
|
|
|
// Clusters.
|
|
// 0 will make bostr run clusters with available parallelism / CPU cores.
|
|
clusters: 0,
|
|
|
|
// Log about bouncer connection with relays?
|
|
log_about_relays: false,
|
|
|
|
// Time before reconnect to relays in miliseconds.
|
|
reconnect_time: 5000,
|
|
|
|
// For personal usage. Leaving this empty allows everyone to use this bostr instance.
|
|
// NOTE: Requires NIP-42 on client.
|
|
authorized_keys: [
|
|
// "pubkey-in-hex",
|
|
// "npub ....",
|
|
// ....
|
|
],
|
|
|
|
// For personal usage. Leaving this empty completely disables NIP-42 function.
|
|
// Private key of authorized user. It could be your key.
|
|
// NOTE:
|
|
// - NIP-42 (auth) is ONLY supported with provided <private_keys>
|
|
// - While both mode could interact with NIP-42 relays,
|
|
// - It's best to use Mode 2 if you have more than <private_keys>
|
|
// - Mode 1 could only work with ONE <private_keys>
|
|
|
|
// Warning: Ensure that <authorized_keys> is NOT empty so only <authorized_keys> could access this bostr bouncer
|
|
private_keys: {
|
|
// "pubkey-in-hex": "privatekey",
|
|
// "pubkey-in-hex": "nsec ...."
|
|
},
|
|
// Tip: If you want to convert your pubkey/privatekey to hex,
|
|
// You could run the following command:
|
|
// $ node hexconverter.js npub....
|
|
// $ node hexconverter.js nsec....
|
|
|
|
// Server information.
|
|
// Only for when nostr client requesting server information.
|
|
server_meta: {
|
|
"contact": "unset",
|
|
"description": "Nostr Bouncer Server",
|
|
"name": "Bostr",
|
|
"software": "git+https://github.com/Yonle/bostr",
|
|
|
|
// Some nostr client may read the following for compatibility check.
|
|
// You may change the supported_nips to match with what your relays supported.
|
|
"supported_nips": [1,2,9,11,12,15,16,20,22,33,40,42,50],
|
|
"version": "1.0.0"
|
|
},
|
|
|
|
// Nostr relays to bounce [Required]
|
|
relays: [
|
|
"wss://example1.com",
|
|
"wss://example2.com",
|
|
// "wss://example3.com",
|
|
// ...and so on
|
|
]
|
|
}
|