import { serve } from "https://deno.land/std@0.192.0/http/server.ts";
import { HttpsProxyAgent } from "npm:@sam01101/node-proxy-agent";
import fetch from "npm:node-fetch";
// Proxy and authentication information
const proxy = 'XXX';
const proxyAuth = 'XXXX';
async function fetchThroughProxy(query: string) {
const agent = new HttpsProxyAgent(proxy, {
headers: {
'Proxy-Authorization': `Basic ${btoa(proxyAuth)}`, // Base64 encode the proxy auth details
},
});
import { serve } from "https://deno.land/std@0.192.0/http/server.ts";
import { HttpsProxyAgent } from "npm:@sam01101/node-proxy-agent";
import fetch from "npm:node-fetch";
// Proxy and authentication information
const proxy = 'XXX';
const proxyAuth = 'XXXX';
async function fetchThroughProxy(query: string) {
const agent = new HttpsProxyAgent(proxy, {
headers: {
'Proxy-Authorization': `Basic ${btoa(proxyAuth)}`, // Base64 encode the proxy auth details
},
});