Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df9b9a71d9 | ||
|
|
ede2359e8a | ||
|
|
b9a55f01d7 |
@@ -1,4 +1,6 @@
|
||||
let config = {
|
||||
postRateLimit: 100,
|
||||
rateLimit: 200,
|
||||
bitcoind: {
|
||||
rpc: 'http://login:password@1.1.1.1:8332/wallet/wallet.dat',
|
||||
},
|
||||
|
||||
@@ -126,7 +126,7 @@ setInterval(updateDescribeGraph, 120000);
|
||||
const rateLimit = require('express-rate-limit');
|
||||
const postLimiter = rateLimit({
|
||||
windowMs: 30 * 60 * 1000,
|
||||
max: 100,
|
||||
max: config.postRateLimit || 100,
|
||||
});
|
||||
|
||||
router.post('/create', postLimiter, async function (req, res) {
|
||||
|
||||
@@ -70,6 +70,7 @@ const pubkey2name = {
|
||||
'026c7d28784791a4b31a64eb34d9ab01552055b795919165e6ae886de637632efb': 'LivingRoomOfSatoshi',
|
||||
'02816caed43171d3c9854e3b0ab2cf0c42be086ff1bd4005acc2a5f7db70d83774': 'ln.pizza',
|
||||
'0254ff808f53b2f8c45e74b70430f336c6c76ba2f4af289f48d6086ae6e60462d3': 'bitrefill thor',
|
||||
'03d607f3e69fd032524a867b288216bfab263b6eaee4e07783799a6fe69bb84fac': 'bitrefill 3',
|
||||
'02a0bc43557fae6af7be8e3a29fdebda819e439bea9c0f8eb8ed6a0201f3471ca9': 'LightningPeachHub',
|
||||
'02d4531a2f2e6e5a9033d37d548cff4834a3898e74c3abe1985b493c42ebbd707d': 'coinfinity.co',
|
||||
'02d23fa6794d8fd056c757f3c8f4877782138dafffedc831fc570cab572620dc61': 'paywithmoon.com',
|
||||
|
||||
4
index.js
4
index.js
@@ -8,6 +8,7 @@ let express = require('express');
|
||||
let morgan = require('morgan');
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
let logger = require('./utils/logger');
|
||||
const config = require('./config');
|
||||
|
||||
morgan.token('id', function getId(req) {
|
||||
return req.id;
|
||||
@@ -19,7 +20,7 @@ app.enable('trust proxy');
|
||||
const rateLimit = require('express-rate-limit');
|
||||
const limiter = rateLimit({
|
||||
windowMs: 15 * 60 * 1000,
|
||||
max: 200,
|
||||
max: config.rateLimit || 200,
|
||||
});
|
||||
app.use(limiter);
|
||||
|
||||
@@ -35,7 +36,6 @@ app.use(
|
||||
);
|
||||
|
||||
let bodyParser = require('body-parser');
|
||||
let config = require('./config');
|
||||
|
||||
app.use(bodyParser.urlencoded({ extended: false })); // parse application/x-www-form-urlencoded
|
||||
app.use(bodyParser.json(null)); // parse application/json
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lndhub",
|
||||
"version": "1.3.2",
|
||||
"version": "1.3.3",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lndhub",
|
||||
"version": "1.3.2",
|
||||
"version": "1.3.3",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -9,18 +9,23 @@ const important_channels = {
|
||||
uri: '03abf6f44c355dec0d5aa155bdbdd6e0c8fefe318eff402de65c6eb2e1be55dc3e@18.221.23.28:9735',
|
||||
wumbo: 1,
|
||||
},
|
||||
'0242a4ae0c5bef18048fbecf995094b74bfb0f7391418d71ed394784373f41e4f3': {
|
||||
name: 'coingate.com',
|
||||
uri: '0242a4ae0c5bef18048fbecf995094b74bfb0f7391418d71ed394784373f41e4f3@3.124.63.44:9735',
|
||||
},
|
||||
// '0242a4ae0c5bef18048fbecf995094b74bfb0f7391418d71ed394784373f41e4f3': {
|
||||
// name: 'coingate.com',
|
||||
// uri: '0242a4ae0c5bef18048fbecf995094b74bfb0f7391418d71ed394784373f41e4f3@3.124.63.44:9735',
|
||||
// },
|
||||
// '0254ff808f53b2f8c45e74b70430f336c6c76ba2f4af289f48d6086ae6e60462d3': {
|
||||
// name: 'bitrefill thor',
|
||||
// uri: '0254ff808f53b2f8c45e74b70430f336c6c76ba2f4af289f48d6086ae6e60462d3@52.30.63.2:9735',
|
||||
// wumbo: 1,
|
||||
// },
|
||||
'030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f': {
|
||||
name: 'bitrefill 2',
|
||||
uri: '030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f@52.50.244.44:9735',
|
||||
// '030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f': {
|
||||
// name: 'bitrefill 2',
|
||||
// uri: '030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f@52.50.244.44:9735',
|
||||
// wumbo: 1,
|
||||
// },
|
||||
'03d607f3e69fd032524a867b288216bfab263b6eaee4e07783799a6fe69bb84fac': {
|
||||
name: 'bitrefill 3',
|
||||
uri: '03d607f3e69fd032524a867b288216bfab263b6eaee4e07783799a6fe69bb84fac@3.237.23.179:9735',
|
||||
wumbo: 1,
|
||||
},
|
||||
// '025f1456582e70c4c06b61d5c8ed3ce229e6d0db538be337a2dc6d163b0ebc05a5': {
|
||||
@@ -40,6 +45,11 @@ const important_channels = {
|
||||
uri: '02816caed43171d3c9854e3b0ab2cf0c42be086ff1bd4005acc2a5f7db70d83774@35.238.153.25:9735',
|
||||
wumbo: 1,
|
||||
},
|
||||
'02570432c30df86ff7dbe3b49e24e8280411674f96470154cadc76d447e339292b': {
|
||||
name: 'okcoin',
|
||||
uri: '02570432c30df86ff7dbe3b49e24e8280411674f96470154cadc76d447e339292b@8.210.75.128:26657',
|
||||
wumbo: 1,
|
||||
},
|
||||
// '0331f80652fb840239df8dc99205792bba2e559a05469915804c08420230e23c7c': {
|
||||
// name: 'LightningPowerUsers.com',
|
||||
// uri: '0331f80652fb840239df8dc99205792bba2e559a05469915804c08420230e23c7c@34.200.181.109:9735',
|
||||
@@ -52,10 +62,10 @@ const important_channels = {
|
||||
// name: 'fixedfloat.com',
|
||||
// uri: '037f990e61acee8a7697966afd29dd88f3b1f8a7b14d625c4f8742bd952003a590@185.5.53.91:9735',
|
||||
// },
|
||||
'03c2abfa93eacec04721c019644584424aab2ba4dff3ac9bdab4e9c97007491dda': {
|
||||
name: 'tippin.me',
|
||||
uri: '03c2abfa93eacec04721c019644584424aab2ba4dff3ac9bdab4e9c97007491dda@157.245.68.47:9735',
|
||||
},
|
||||
// '03c2abfa93eacec04721c019644584424aab2ba4dff3ac9bdab4e9c97007491dda': {
|
||||
// name: 'tippin.me',
|
||||
// uri: '03c2abfa93eacec04721c019644584424aab2ba4dff3ac9bdab4e9c97007491dda@157.245.68.47:9735',
|
||||
// },
|
||||
};
|
||||
|
||||
let lightning = require('../lightning');
|
||||
|
||||
Reference in New Issue
Block a user