From 0d03b82c4b1c0e3c4fb21f3222bc033db64b1100 Mon Sep 17 00:00:00 2001 From: Bilal Date: Thu, 20 Aug 2020 16:06:13 +0300 Subject: [PATCH] remove test.js --- test.js | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 test.js diff --git a/test.js b/test.js deleted file mode 100644 index 56218b9..0000000 --- a/test.js +++ /dev/null @@ -1,29 +0,0 @@ -const axios = require('axios').default -const SocksProxyAgent = require('socks-proxy-agent'); -const HttpsProxyAgent = require('https-proxy-agent'); - -const socksProxyOptions = `socks5://114.103.105.105:4216`; // your sock5 host and port; -const httpsProxyOptions = 'https://92.119.222.1:8080'; - -const socksAgent = new SocksProxyAgent(socksProxyOptions); -const httpAgent = new HttpsProxyAgent(httpsProxyOptions); - -axios.interceptors.request.use( x => { - // to avoid overwriting if another interceptor - // already defined the same object (meta) - x.meta = x.meta || {} - x.meta.requestStartedAt = new Date().getTime(); - return x; -}); - -axios.interceptors.response.use(x => { - x.responseTime = new Date().getTime() - x.config.meta.requestStartedAt; - return x; -}); - -axios({ - httpsAgent: socksAgent, - url:'https://api.ipify.org/?format=json' -}).then(r => { - console.log(r.responseTime); -}) \ No newline at end of file