mirror of
https://github.com/misskey-dev/media-proxy.git
synced 2025-04-29 10:57:30 +09:00
25 lines
682 B
TypeScript
25 lines
682 B
TypeScript
/// <reference types="node" />
|
|
/// <reference types="node" />
|
|
import * as http from 'node:http';
|
|
import * as https from 'node:https';
|
|
export type DownloadConfig = {
|
|
[x: string]: any;
|
|
userAgent: string;
|
|
allowedPrivateNetworks: string[];
|
|
maxSize: number;
|
|
httpAgent: http.Agent;
|
|
httpsAgent: https.Agent;
|
|
proxy?: boolean;
|
|
};
|
|
export declare const defaultDownloadConfig: {
|
|
httpAgent: http.Agent;
|
|
httpsAgent: https.Agent;
|
|
userAgent: string;
|
|
allowedPrivateNetworks: never[];
|
|
maxSize: number;
|
|
proxy: boolean;
|
|
};
|
|
export declare function downloadUrl(url: string, path: string, settings?: DownloadConfig): Promise<{
|
|
filename: string;
|
|
}>;
|