Update chrome.js

This commit is contained in:
Namhyeon Go 2022-09-05 13:54:47 +09:00 committed by GitHub
parent 5cb8fe174e
commit b483617070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,8 @@ var ChromeObject = function(interfaces) {
this.proxy = {
"protocol": "socks5",
"host": "127.0.0.1",
"port": 1080
"port": 1080,
"ua": null
};
this.inPrivate = false;
@ -331,6 +332,9 @@ var ChromeObject = function(interfaces) {
if (this.proxy != null && this.isPreventProxy != true) {
console.log("Enabled proxy server:", this.proxy.protocol + "://" + this.proxy.host + ":" + this.proxy.port);
cmd.push("--proxy-server=\"" + this.proxy.protocol + "://" + this.proxy.host + ":" + this.proxy.port + "\"");
if (this.proxy.ua != null) {
this.setUserAgent(this.proxy.ua);
}
}
// set user data directory