Compare commits

...

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian
a373a899e3 1.248.28 2026-02-04 17:59:12 +01:00
DebaucheryLibrarian
ca925d4d7f Added proxy test. 2026-02-04 17:59:09 +01:00
5 changed files with 21 additions and 3 deletions

View File

@@ -339,6 +339,7 @@ module.exports = {
}, },
proxy: { proxy: {
enable: false, enable: false,
test: 'https://api.ipify.org?format=json',
host: '', host: '',
port: 8888, port: 8888,
hostnames: [], hostnames: [],

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.248.27", "version": "1.248.28",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "traxxx", "name": "traxxx",
"version": "1.248.27", "version": "1.248.28",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@aws-sdk/client-s3": "^3.458.0", "@aws-sdk/client-s3": "^3.458.0",

View File

@@ -1,6 +1,6 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.248.27", "version": "1.248.28",
"description": "All the latest porn releases in one place", "description": "All the latest porn releases in one place",
"main": "src/app.js", "main": "src/app.js",
"scripts": { "scripts": {

View File

@@ -112,6 +112,16 @@ async function startMemorySample(snapshotTriggers = []) {
}, config.memorySampling.sampleDuration); }, config.memorySampling.sampleDuration);
} }
async function testProxy() {
if (config.proxy.enable && argv.testProxy) {
const res = await unprint.get(argv.testProxy);
if (!res.ok) {
throw new Error(`Proxy is offline (${res.status})`);
}
}
}
async function init() { async function init() {
try { try {
await redis.connect(); await redis.connect();
@@ -186,6 +196,8 @@ async function init() {
console.log(res.status, res.body); console.log(res.status, res.body);
} }
await testProxy();
const actorsFromFile = argv.actorsFile && await getFileEntries(argv.actorsFile); const actorsFromFile = argv.actorsFile && await getFileEntries(argv.actorsFile);
const actorNames = (argv.actors || []).concat(actorsFromFile || []); const actorNames = (argv.actors || []).concat(actorsFromFile || []);

View File

@@ -40,6 +40,11 @@ const { argv } = yargs
type: 'boolean', type: 'boolean',
alias: 'web', alias: 'web',
}) })
.option('test-proxy', {
describe: 'Test URL to ensure proxy is online',
type: 'string',
default: config.proxy.test,
})
.option('include-networks', { .option('include-networks', {
describe: 'Network to scrape all channels from (overrides configuration)', describe: 'Network to scrape all channels from (overrides configuration)',
type: 'array', type: 'array',