Compare commits
2 Commits
43358550a9
...
a373a899e3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a373a899e3 | ||
|
|
ca925d4d7f |
@@ -339,6 +339,7 @@ module.exports = {
|
||||
},
|
||||
proxy: {
|
||||
enable: false,
|
||||
test: 'https://api.ipify.org?format=json',
|
||||
host: '',
|
||||
port: 8888,
|
||||
hostnames: [],
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "traxxx",
|
||||
"version": "1.248.27",
|
||||
"version": "1.248.28",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "traxxx",
|
||||
"version": "1.248.27",
|
||||
"version": "1.248.28",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.458.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "traxxx",
|
||||
"version": "1.248.27",
|
||||
"version": "1.248.28",
|
||||
"description": "All the latest porn releases in one place",
|
||||
"main": "src/app.js",
|
||||
"scripts": {
|
||||
|
||||
12
src/app.js
12
src/app.js
@@ -112,6 +112,16 @@ async function startMemorySample(snapshotTriggers = []) {
|
||||
}, 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() {
|
||||
try {
|
||||
await redis.connect();
|
||||
@@ -186,6 +196,8 @@ async function init() {
|
||||
console.log(res.status, res.body);
|
||||
}
|
||||
|
||||
await testProxy();
|
||||
|
||||
const actorsFromFile = argv.actorsFile && await getFileEntries(argv.actorsFile);
|
||||
const actorNames = (argv.actors || []).concat(actorsFromFile || []);
|
||||
|
||||
|
||||
@@ -40,6 +40,11 @@ const { argv } = yargs
|
||||
type: 'boolean',
|
||||
alias: 'web',
|
||||
})
|
||||
.option('test-proxy', {
|
||||
describe: 'Test URL to ensure proxy is online',
|
||||
type: 'string',
|
||||
default: config.proxy.test,
|
||||
})
|
||||
.option('include-networks', {
|
||||
describe: 'Network to scrape all channels from (overrides configuration)',
|
||||
type: 'array',
|
||||
|
||||
Reference in New Issue
Block a user