Spaces:
Running
Running
JOHN SILLVESTOR commited on
Improve stream range lookahead and pipe error resilience
Browse files
server.js
CHANGED
|
@@ -11,7 +11,7 @@ const { TelegramClient, Api } = require("teleproto");
|
|
| 11 |
const { StringSession } = require("teleproto/sessions");
|
| 12 |
|
| 13 |
const PORT = Number(process.env.PORT || 7860);
|
| 14 |
-
const ORIGIN = process.env.ALLOWED_ORIGIN || "https://
|
| 15 |
const CHANNEL_ID = process.env.TELEGRAM_CHANNEL_ID || "";
|
| 16 |
const API_ID = Number(process.env.TELEGRAM_API_ID || 0);
|
| 17 |
const API_HASH = process.env.TELEGRAM_API_HASH || "";
|
|
@@ -87,7 +87,7 @@ const PLANS = {
|
|
| 87 |
week: { amount: 199, label: "1 Week VIP", sec: 604800, price: "1.99" },
|
| 88 |
month: { amount: 599, label: "1 Month VIP", sec: 2592000, price: "5.99" }
|
| 89 |
};
|
| 90 |
-
const HOME_URL = "https://
|
| 91 |
const BRAND_FILE = path.join(__dirname, "brand.png");
|
| 92 |
const BRAND_URL = "https://dublk2000.pages.dev/assets/brand-mark.png";
|
| 93 |
|
|
@@ -101,8 +101,6 @@ const ADMIN_KEY_ENV = String(process.env.ADMIN_API_KEY || "");
|
|
| 101 |
const ADMIN_KEY = ADMIN_KEY_ENV || adminKey;
|
| 102 |
|
| 103 |
const BLOG_HOSTS = new Set([
|
| 104 |
-
"dublk2000.blogspot.com",
|
| 105 |
-
"dublk20000.blogspot.com",
|
| 106 |
"dublk2000.pages.dev"
|
| 107 |
]);
|
| 108 |
|
|
@@ -2163,7 +2161,7 @@ async function handleGenerate(req, res) {
|
|
| 2163 |
return JSON.parse(out.join(""));
|
| 2164 |
} catch { return null; }
|
| 2165 |
};
|
| 2166 |
-
const parsed = decReq(raw.enc, dom) || decReq(raw.enc, "
|
| 2167 |
if (parsed) {
|
| 2168 |
if (parsed.p) path = String(parsed.p);
|
| 2169 |
if (parsed.h) hash = String(parsed.h).toLowerCase();
|
|
@@ -3154,7 +3152,7 @@ const FB_CLIENT_CFG = {
|
|
| 3154 |
const G_CLIENT_ID = "475299842360-crrejjs7b7krvpsuu16jc9mimg0qaing.apps.googleusercontent.com";
|
| 3155 |
|
| 3156 |
function encDomain(text, domain) {
|
| 3157 |
-
const dom = domain || "dublk2000.
|
| 3158 |
const key = Buffer.from(dom, "utf8");
|
| 3159 |
const kLen = key.length;
|
| 3160 |
const out = [];
|
|
|
|
| 11 |
const { StringSession } = require("teleproto/sessions");
|
| 12 |
|
| 13 |
const PORT = Number(process.env.PORT || 7860);
|
| 14 |
+
const ORIGIN = process.env.ALLOWED_ORIGIN || "https://dublk2000.pages.dev";
|
| 15 |
const CHANNEL_ID = process.env.TELEGRAM_CHANNEL_ID || "";
|
| 16 |
const API_ID = Number(process.env.TELEGRAM_API_ID || 0);
|
| 17 |
const API_HASH = process.env.TELEGRAM_API_HASH || "";
|
|
|
|
| 87 |
week: { amount: 199, label: "1 Week VIP", sec: 604800, price: "1.99" },
|
| 88 |
month: { amount: 599, label: "1 Month VIP", sec: 2592000, price: "5.99" }
|
| 89 |
};
|
| 90 |
+
const HOME_URL = "https://dublk2000.pages.dev/";
|
| 91 |
const BRAND_FILE = path.join(__dirname, "brand.png");
|
| 92 |
const BRAND_URL = "https://dublk2000.pages.dev/assets/brand-mark.png";
|
| 93 |
|
|
|
|
| 101 |
const ADMIN_KEY = ADMIN_KEY_ENV || adminKey;
|
| 102 |
|
| 103 |
const BLOG_HOSTS = new Set([
|
|
|
|
|
|
|
| 104 |
"dublk2000.pages.dev"
|
| 105 |
]);
|
| 106 |
|
|
|
|
| 2161 |
return JSON.parse(out.join(""));
|
| 2162 |
} catch { return null; }
|
| 2163 |
};
|
| 2164 |
+
const parsed = decReq(raw.enc, dom) || decReq(raw.enc, "dublk2000.pages.dev");
|
| 2165 |
if (parsed) {
|
| 2166 |
if (parsed.p) path = String(parsed.p);
|
| 2167 |
if (parsed.h) hash = String(parsed.h).toLowerCase();
|
|
|
|
| 3152 |
const G_CLIENT_ID = "475299842360-crrejjs7b7krvpsuu16jc9mimg0qaing.apps.googleusercontent.com";
|
| 3153 |
|
| 3154 |
function encDomain(text, domain) {
|
| 3155 |
+
const dom = domain || "dublk2000.pages.dev";
|
| 3156 |
const key = Buffer.from(dom, "utf8");
|
| 3157 |
const kLen = key.length;
|
| 3158 |
const out = [];
|