After i click on Set Proxy Button my socks5 proxy will set but How can i force browser to use proxy for specific domains, such as site.com. notice that i want use fixed_servers and singleProxy rule. I set my proxy setting as follows, but it works on any domain...!
manifest.json
"permissions":["tabs","proxy"]
popup.js
$('#btnSetProxy').click(function () {
var config = {
mode: "fixed_servers",
rules: {
singleProxy: {
scheme: 'socks5',
host: '192.168.1.25',
port: 7598
},
bypassList: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "<local>"]
}
};
chrome.proxy.settings.set(
{value: config, scope: 'regular'},
function() {});
});
popup.html
<!DOCTYPE html>
<html>
<head>
<script src="js/popup.js"></script>
<link rel="stylesheet" href="css/popup.css">
</head>
<body id="secbody" class="dirrtl">
<button type="button" id="btnSetProxy">Set Proxy</button>
</body>
</html>