moving...

Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
Yonle 2024-08-29 16:45:55 +07:00
parent 2a0c641133
commit d3c73eb05a
6 changed files with 12 additions and 12 deletions

View File

@ -40,7 +40,7 @@ npm install -g bostr
or via git: or via git:
``` ```
npm install -g https://github.com/Yonle/bostr.git npm install -g https://codeberg.org/Yonle/bostr.git
``` ```
You will need to make config with the following command: You will need to make config with the following command:
@ -67,7 +67,7 @@ When configuring reverse proxy, Ensure that `x-forwarded-proto` header was set a
### Source code ### Source code
``` ```
git clone -b stable https://github.com/Yonle/bostr git clone -b stable https://codeberg.org/Yonle/bostr
cd bostr cd bostr
npm install npm install
``` ```
@ -89,7 +89,7 @@ When configuring reverse proxy, Ensure that `x-forwarded-proto` header was set a
### Docker ### Docker
``` ```
git clone https://github.com/Yonle/bostr git clone https://codeberg.org/Yonle/bostr
cd bostr cd bostr
cp config.js.example config.js cp config.js.example config.js
``` ```
@ -106,7 +106,7 @@ docker run --rm --name bostr -p 8080:8080 -v ./config.js:/usr/src/app/config.js
### Bun runtime ### Bun runtime
``` ```
git clone -b stable https://github.com/Yonle/bostr git clone -b stable https://codeberg.org/Yonle/bostr
cd bostr cd bostr
bun install bun install
``` ```

View File

@ -19,7 +19,7 @@ function showHelp() {
" testworker [conffile] - Test worker with specified bostr config\n" + " testworker [conffile] - Test worker with specified bostr config\n" +
" help - Show this help text\n\n" + " help - Show this help text\n\n" +
"Software is licensed under BSD-3-Clause\n" + "Software is licensed under BSD-3-Clause\n" +
"https://github.com/Yonle/bostr" "https://codeberg.org/Yonle/bostr"
); );
} }

View File

@ -146,7 +146,7 @@ module.exports = {
"pubkey": "0000000000000000000000000000000000000000000000000000000000000000", "pubkey": "0000000000000000000000000000000000000000000000000000000000000000",
"description": "Nostr relay bouncer", "description": "Nostr relay bouncer",
"name": "Bostr", "name": "Bostr",
"software": "git+https://github.com/Yonle/bostr", "software": "git+https://codeberg.org/Yonle/bostr",
"canonical_url": "wss://bostr.example.com", "canonical_url": "wss://bostr.example.com",
// Some nostr client may read the following for compatibility check. // Some nostr client may read the following for compatibility check.

View File

@ -33,7 +33,7 @@ if (!config.relays?.length) (async () => {
console.log("Load balancer mode. Fetching relays list from", config.loadbalancer[0].replace(/^ws/, "http")); console.log("Load balancer mode. Fetching relays list from", config.loadbalancer[0].replace(/^ws/, "http"));
const request = await undici.request(config.loadbalancer[0].replace(/^ws/, "http"), { const request = await undici.request(config.loadbalancer[0].replace(/^ws/, "http"), {
headers: { headers: {
"User-Agent": `Bostr ${version}; The nostr relay bouncer; https://github.com/Yonle/bostr; ${config.server_meta.canonical_url || "No canonical bouncer URL specified"}; Contact: ${config.server_meta.contact}` "User-Agent": `Bostr ${version}; The nostr relay bouncer; https://codeberg.org/Yonle/bostr; ${config.server_meta.canonical_url || "No canonical bouncer URL specified"}; Contact: ${config.server_meta.contact}`
} }
}); });
@ -139,7 +139,7 @@ server.on('request', (req, res) => {
res.write(`\n ${serverAddr}?save=1`); res.write(`\n ${serverAddr}?save=1`);
res.write(`\n (Saves bandwidth usage)`); res.write(`\n (Saves bandwidth usage)`);
res.write(`\n\nAdministrator Contact: ${config.server_meta.contact}`); res.write(`\n\nAdministrator Contact: ${config.server_meta.contact}`);
res.end(`\n\n---\nPowered by Bostr (${version}) - Open source Nostr bouncer\nhttps://github.com/Yonle/bostr`); res.end(`\n\n---\nPowered by Bostr (${version}) - Open source Nostr bouncer\nhttps://codeberg.org/Yonle/bostr`);
} else if (req.url.includes("favicon") && favicon) { } else if (req.url.includes("favicon") && favicon) {
res.writeHead(200, { "Content-Type": "image/" + config.favicon?.split(".").pop() }); res.writeHead(200, { "Content-Type": "image/" + config.favicon?.split(".").pop() });
res.end(favicon); res.end(favicon);

View File

@ -12,7 +12,7 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+ssh://git@github.com/Yonle/bostr.git" "url": "git+ssh://git@codeberg.org/Yonle/bostr.git"
}, },
"keywords": [ "keywords": [
"nostr", "nostr",
@ -23,9 +23,9 @@
"author": "Yonle <yonle@lecturify.net>", "author": "Yonle <yonle@lecturify.net>",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"bugs": { "bugs": {
"url": "https://github.com/Yonle/bostr/issues" "url": "https://codeberg.org/Yonle/bostr/issues"
}, },
"homepage": "https://github.com/Yonle/bostr#readme", "homepage": "https://codeberg.org/Yonle/bostr#readme",
"dependencies": { "dependencies": {
"nostr-tools": "^2.5.2", "nostr-tools": "^2.5.2",
"undici": "^6.17.0", "undici": "^6.17.0",

View File

@ -292,7 +292,7 @@ class Session extends WebSocket {
if (!stats[addr]) stats[addr] = { raw_rx: 0, rx: 0, tx: 0, f: 0 }; if (!stats[addr]) stats[addr] = { raw_rx: 0, rx: 0, tx: 0, f: 0 };
super(addr, { super(addr, {
headers: { headers: {
"User-Agent": `Bostr ${version}; The nostr relay bouncer; https://github.com/Yonle/bostr; ConnID: ${id}; ${server_meta.canonical_url || "No canonical bouncer URL specified"}; Contact: ${server_meta.contact}`, "User-Agent": `Bostr ${version}; The nostr relay bouncer; https://codeberg.org/Yonle/bostr; ConnID: ${id}; ${server_meta.canonical_url || "No canonical bouncer URL specified"}; Contact: ${server_meta.contact}`,
} }
}); });