mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-12 01:00:34 +08:00
Chore: minor changes
This commit is contained in:
parent
527aa4c533
commit
69e9a73b4b
@ -12,6 +12,7 @@ import type { VoidOrVoidArray } from './lib/misc';
|
||||
import picocolors from 'picocolors';
|
||||
import { tagged as html } from 'foxts/tagged';
|
||||
import { compareAndWriteFile } from './lib/create-file';
|
||||
import { appendArrayInPlace } from 'foxts/append-array-in-place';
|
||||
|
||||
const priorityOrder: Record<'default' | string & {}, number> = {
|
||||
LICENSE: 0,
|
||||
@ -71,14 +72,15 @@ export const buildPublic = task(require.main === module, __filename)(async (span
|
||||
await Promise.all([
|
||||
compareAndWriteFile(
|
||||
span,
|
||||
[
|
||||
'/*',
|
||||
' cache-control: public, max-age=240, stale-while-revalidate=60, stale-if-error=15',
|
||||
'https://:project.pages.dev/*',
|
||||
' X-Robots-Tag: noindex',
|
||||
...Object.keys(priorityOrder)
|
||||
.map((name) => `/${name}/*\n content-type: text/plain; charset=utf-8\n X-Robots-Tag: noindex`)
|
||||
],
|
||||
appendArrayInPlace(
|
||||
[
|
||||
'/*',
|
||||
' cache-control: public, max-age=300, stale-while-revalidate=30, stale-if-error=60',
|
||||
'https://:project.pages.dev/*',
|
||||
' X-Robots-Tag: noindex'
|
||||
],
|
||||
Object.keys(priorityOrder).map((name) => `/${name}/*\n content-type: text/plain; charset=utf-8\n X-Robots-Tag: noindex`)
|
||||
),
|
||||
path.join(PUBLIC_DIR, '_headers')
|
||||
),
|
||||
compareAndWriteFile(
|
||||
|
||||
@ -5,15 +5,16 @@ import crypto from 'node:crypto';
|
||||
import { Api, extensions as TgExtensions } from 'telegram';
|
||||
import { bigint2ip } from 'fast-cidr-tools';
|
||||
|
||||
const mtptoto_public_rsa = '-----BEGIN RSA PUBLIC KEY-----\n'
|
||||
+ 'MIIBCgKCAQEAyr+18Rex2ohtVy8sroGP\n'
|
||||
+ 'BwXD3DOoKCSpjDqYoXgCqB7ioln4eDCFfOBUlfXUEvM/fnKCpF46VkAftlb4VuPD\n'
|
||||
+ 'eQSS/ZxZYEGqHaywlroVnXHIjgqoxiAd192xRGreuXIaUKmkwlM9JID9WS2jUsTp\n'
|
||||
+ 'zQ91L8MEPLJ/4zrBwZua8W5fECwCCh2c9G5IzzBm+otMS/YKwmR1olzRCyEkyAEj\n'
|
||||
+ 'XWqBI9Ftv5eG8m0VkBzOG655WIYdyV0HfDK/NWcvGqa0w/nriMD6mDjKOryamw0O\n'
|
||||
+ 'P9QuYgMN0C9xMW9y8SmP4h92OAWodTYgY1hZCxdv6cs5UnW9+PWvS+WIbkh+GaWY\n'
|
||||
+ 'xwIDAQAB\n'
|
||||
+ '-----END RSA PUBLIC KEY-----\n';
|
||||
const mtptoto_public_rsa = `-----BEGIN RSA PUBLIC KEY-----
|
||||
MIIBCgKCAQEAyr+18Rex2ohtVy8sroGP
|
||||
BwXD3DOoKCSpjDqYoXgCqB7ioln4eDCFfOBUlfXUEvM/fnKCpF46VkAftlb4VuPD
|
||||
eQSS/ZxZYEGqHaywlroVnXHIjgqoxiAd192xRGreuXIaUKmkwlM9JID9WS2jUsTp
|
||||
zQ91L8MEPLJ/4zrBwZua8W5fECwCCh2c9G5IzzBm+otMS/YKwmR1olzRCyEkyAEj
|
||||
XWqBI9Ftv5eG8m0VkBzOG655WIYdyV0HfDK/NWcvGqa0w/nriMD6mDjKOryamw0O
|
||||
P9QuYgMN0C9xMW9y8SmP4h92OAWodTYgY1hZCxdv6cs5UnW9+PWvS+WIbkh+GaWY
|
||||
xwIDAQAB
|
||||
-----END RSA PUBLIC KEY-----
|
||||
`;
|
||||
|
||||
export function getTelegramBackupIPFromBase64(base64: string) {
|
||||
// 1. Check base64 size
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user