constgot=require("got");constspawn=require("cross-spawn");const{SocksProxyAgent}=require("socks-proxy-agent");// Launch a TOR proxy via Docker// @see https://github.com/osminogin/docker-tor-simpleconstproxy=spawn("docker",[...["run","--rm","-i","-a","stdout"],...["-p","127.0.0.1:9050:9050/tcp"],...["osminogin/tor-simple:latest"],]);// Wait until the socks5 proxy server is up and runningproxy.stdout.on("data",(data)=>{process.stderr.write(data);if(data.toString().includes("Opened Socks listener")){run().finally(()=>proxy.kill("SIGINT"));}});// Configure an HTTP client using socks5 proxyconstclient=got.extend({agent:{https:newSocksProxyAgent("socks5://localhost:9050"),},});// TODO: Write some code that requires a proxyasyncfunctionrun(){constbody=awaitclient.get("https://jsonip.com/").json();console.log("Client IP:",body.ip);}
SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.
Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.
Top comments (0)