{"version":3,"sources":["jsdelivr-header.js","/npm/proxy-agent-server@0.1.2/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;ACJA,MAAM,KAAO,QAAQ,QACf,WAAa,QAAQ,eACrB,QAAU,QAAQ,WAClB,QAAU,QAAQ,kBAAkB,QAEpC,SAAW,YACX,KAAO,QAAQ,KAAK,IAAM,KAE1B,SAAW,QAAQ,IAAI,aAAe,2BAEtC,OAAS,KAAK,cAAa,CAAC,EAAK,KACnC,QAAQ,CACJ,IAAK,EAAI,IACT,QAAS,EAAI,QACb,OAAQ,EAAI,OACZ,MAAO,IAAI,WAAW,YACvB,GAAG,SAAS,SAAU,GACrB,QAAQ,IAAI,GACZ,EAAI,WAAa,IACjB,EAAI,IAAI,cAAc,EAAI,aAC9B,IAAG,KAAK,EAAI,IAIhB,OAAO,OAAO,KAAM,UAAU,KAC1B,QAAQ,IAAI,uBAAuB,6BAA6B,YAAY,YAAY,WAAW","file":"/npm/proxy-agent-server@0.1.2/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/proxy-agent-server@0.1.2/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","#! /usr/bin/env node\n\nconst http = require('http');\nconst ProxyAgent = require('proxy-agent');\nconst request = require('request');\nconst version = require('./package.json').version\n\nconst hostname = '127.0.0.1';\nconst port = process.argv[2] || 1090;\n\nconst proxyUri = process.env.socks_proxy || 'socks5://127.0.0.1:57197';\n\nconst server = http.createServer((req, res) => {\n    request({\n        url: req.url,\n        headers: req.headers,\n        method: req.method,\n        agent: new ProxyAgent(proxyUri)\n    }).on('error', function (err) {\n        console.log(err);\n        res.statusCode = 500;\n        res.end(`PAS Error: ${err.toString()}`);\n    }).pipe(res);\n\n});\n\nserver.listen(port, hostname, () => {\n    console.log(`Proxy-agent-server v${version} running at http://${hostname}:${port}/ -> ${proxyUri}`);\n});"]}