mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-31 14:58:05 +00:00
Added Proxy Options
This commit is contained in:
@@ -2,9 +2,19 @@ import https, { RequestOptions } from 'https';
|
||||
import { IncomingMessage } from 'http';
|
||||
import { URL } from 'url';
|
||||
|
||||
interface ProxyOpts {
|
||||
host : string,
|
||||
port : number,
|
||||
authentication? : {
|
||||
username : string;
|
||||
password : string;
|
||||
}
|
||||
}
|
||||
|
||||
interface RequestOpts extends RequestOptions {
|
||||
body?: string;
|
||||
method?: 'GET' | 'POST';
|
||||
proxies? : string[] | ProxyOpts[]
|
||||
}
|
||||
|
||||
function https_getter(req_url: string, options: RequestOpts = {}): Promise<IncomingMessage> {
|
||||
|
||||
Reference in New Issue
Block a user