Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ulixee
GitHub Repository: ulixee/secret-agent
Path: blob/main/examples/proxy-example.mjs
1028 views
1
import agent from 'secret-agent';
2
3
(async () => {
4
await agent.configure({
5
upstreamProxyUrl: `socks5://${process.env.PROXY_PASS}@proxy-nl.privateinternetaccess.com:1080`,
6
});
7
await agent.goto('https://whatsmyip.com/');
8
await agent.waitForPaintingStable();
9
await agent.close();
10
})().catch(err => console.log('Caught error in script', err));
11
12