1 year ago

#332185

test-img

Arc Official

Connect to SOCKS5 Proxy Via PAC script

In my chrome extension, I am using the PAC script chrome.proxy API that has worked in the past.

How do I connect to a SOCKS5 proxy using this method? I have been using this code, but I get a socks error.

    var config = {
                mode: "pac_script",
                pacScript: {
                    data: "function     FindProxyForURL(url, host) {\n" +
                        "  if (host == 'mygeoip.co      /*')\n" +
                        "    return 'SOCKS5 blackhole:80';\n" +
                        "  return 'SOCKS5 "+ip+":"+port+"';\n" +
                        "}"
                    }
                };
          
                
                chrome.proxy.settings.set(
                {value: config, scope: 'regular'},
                function() {}
                );

javascript

google-chrome-extension

proxy

pac

httptosocks5proxy

0 Answers

Your Answer

Accepted video resources