mirror of
https://github.com/TxtDot/instances.git
synced 2024-11-23 21:36:22 +03:00
new look
This commit is contained in:
parent
22255d4424
commit
15494eddbd
2 changed files with 54 additions and 25 deletions
14
README.md
14
README.md
|
@ -1,10 +1,6 @@
|
||||||
# instances
|
# Instances of TXTDot proxies
|
||||||
|
|
||||||
Instances of TXTDot proxies
|
- <https://txt.dc09.ru> ![search](https://img.shields.io/badge/search-enabled-blue) ![protocol](https://img.shields.io/badge/protocol-https-blue)
|
||||||
|
- <https://txt.artegoser.ru> ![search](https://img.shields.io/badge/search-enabled-blue) ![protocol](https://img.shields.io/badge/protocol-https-blue)
|
||||||
| Name | Base URL | Search | Connection |
|
- <https://txt.bloat.cat> ![search](https://img.shields.io/badge/search-enabled-blue) ![protocol](https://img.shields.io/badge/protocol-https-blue)
|
||||||
| ------------ | -------------------------- | ------- | ---------- |
|
- <https://txt.clovius.club> ![search](https://img.shields.io/badge/search-enabled-blue) ![protocol](https://img.shields.io/badge/protocol-https-blue)
|
||||||
| Official 1 | <https://txt.dc09.ru> | enabled | https |
|
|
||||||
| Official 2 | <https://txt.artegoser.ru> | enabled | https |
|
|
||||||
| Bloatcat | <https://txt.bloat.cat> | enabled | https |
|
|
||||||
| Clovius club | <https://txt.clovius.club> | enabled | https |
|
|
||||||
|
|
65
index.js
65
index.js
|
@ -2,21 +2,54 @@ const fs = require("fs");
|
||||||
|
|
||||||
const instances = JSON.parse(fs.readFileSync("instances.json", "utf8"));
|
const instances = JSON.parse(fs.readFileSync("instances.json", "utf8"));
|
||||||
|
|
||||||
fs.writeFileSync(
|
function badge(url, label, path) {
|
||||||
"README.md",
|
return `![${label}](https://img.shields.io/badge/dynamic/json?url=${encodeURIComponent(
|
||||||
`# instances
|
url
|
||||||
|
)}&query=${encodeURIComponent(path)}&label=${encodeURIComponent(label)})`;
|
||||||
|
}
|
||||||
|
|
||||||
Instances of TXTDot proxies
|
function static(label, text) {
|
||||||
|
return `![${label}](https://img.shields.io/badge/${label}-${text}-blue)`;
|
||||||
|
}
|
||||||
|
|
||||||
| Name | Base URL | Search | Connection |
|
async function run() {
|
||||||
| ---- | -------- | ------ | ---------- |
|
fs.writeFileSync(
|
||||||
${instances
|
"README.md",
|
||||||
.map(
|
`# Instances of TXTDot proxies
|
||||||
(instance) =>
|
\r${(
|
||||||
`| ${instance.name} | <${instance.baseUrl}> | ${
|
await Promise.all(
|
||||||
instance.search ? "enabled" : ""
|
instances.map(async (instance) => {
|
||||||
} | ${instance.HTTPS ? "https" : "http"} |`
|
if (typeof instance === "string") {
|
||||||
)
|
const config_url = instance + "/configuration/json";
|
||||||
.join("\n")}
|
let config = await fetch(config_url).then((res) => res.json());
|
||||||
`
|
|
||||||
);
|
return `- <${instance}> ${badge(
|
||||||
|
config_url,
|
||||||
|
"version",
|
||||||
|
"version"
|
||||||
|
)} ${badge(config_url, "protocol", "protocol")} ${badge(
|
||||||
|
config_url,
|
||||||
|
"searx",
|
||||||
|
"third_party.searx_url"
|
||||||
|
)} ${badge(config_url, "webder", "third_party.webder_url")} ${badge(
|
||||||
|
config_url,
|
||||||
|
"image compression",
|
||||||
|
"proxy.img_compress"
|
||||||
|
)}`;
|
||||||
|
} else {
|
||||||
|
return `- <${instance.baseUrl}> ${
|
||||||
|
instance.search ? static("search", "enabled") : ""
|
||||||
|
} ${
|
||||||
|
instance.HTTPS
|
||||||
|
? static("protocol", "https")
|
||||||
|
: static("protocol", "http")
|
||||||
|
}`;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
|
).join("\n")}
|
||||||
|
`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
run();
|
||||||
|
|
Loading…
Add table
Reference in a new issue