mirror of
https://github.com/QuiteAFancyEmerald/Holy-Unblocker.git
synced 2025-05-12 19:40:02 -04:00
Updated a few more things
This commit is contained in:
parent
c827e9f7e1
commit
73cdcb3186
47 changed files with 35805 additions and 1102 deletions
|
@ -13,12 +13,12 @@ function createRequestProxy(ctx) {
|
|||
const requestContext = {
|
||||
url: urlData.value,
|
||||
flags: urlData.flags,
|
||||
origin: ((clientRequest.socket.encrypted || ctx.config.forceHttps) ? 'https://' : 'http://') + clientRequest.headers.host,
|
||||
origin: (clientRequest.socket.encrypted ? 'https://' : 'http://') + clientRequest.headers.host,
|
||||
body: await getChunks(clientRequest),
|
||||
headers: { ...clientRequest.headers },
|
||||
method: clientRequest.method,
|
||||
rewrite: ctx,
|
||||
agent: new ((urlData.value.protocol == 'https:' || ctx.config.forceHttps) ? https : http).Agent({
|
||||
agent: new (urlData.value.protocol == 'https:' ? https : http).Agent({
|
||||
rejectUnauthorized: false,
|
||||
}),
|
||||
address: null,
|
||||
|
@ -27,7 +27,7 @@ function createRequestProxy(ctx) {
|
|||
};
|
||||
for (let i in ctx.config.requestMiddleware) ctx.config.requestMiddleware[i](requestContext);
|
||||
if (clientResponse.writableEnded) return;
|
||||
((requestContext.url.protocol == 'https:' || ctx.config.forceHttps) ? https : http).request({
|
||||
(requestContext.url.protocol == 'https:' ? https : http).request({
|
||||
headers: requestContext.headers,
|
||||
method: requestContext.method,
|
||||
hostname: requestContext.url.hostname,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue