https://github.com/alykoshin/selenium-chrome-proxy-plugin
Chrome plugin generator for setting private proxies
https://github.com/alykoshin/selenium-chrome-proxy-plugin
authorization chrome proxy selenium
Last synced: 12 months ago
JSON representation
Chrome plugin generator for setting private proxies
- Host: GitHub
- URL: https://github.com/alykoshin/selenium-chrome-proxy-plugin
- Owner: alykoshin
- License: mit
- Created: 2017-10-27T10:10:55.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-06-12T10:15:15.000Z (about 1 year ago)
- Last Synced: 2025-06-12T11:32:59.683Z (about 1 year ago)
- Topics: authorization, chrome, proxy, selenium
- Language: JavaScript
- Size: 344 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](http://badge.fury.io/js/selenium-chrome-proxy-plugin)
[](https://travis-ci.org/alykoshin/selenium-chrome-proxy-plugin)
[](https://coveralls.io/github/alykoshin/selenium-chrome-proxy-plugin?branch=master)
[](https://codeclimate.com/github/alykoshin/selenium-chrome-proxy-plugin)
[](https://inch-ci.org/github/alykoshin/selenium-chrome-proxy-plugin)
[](https://david-dm.org/alykoshin/selenium-chrome-proxy-plugin#info=dependencies)
[](https://david-dm.org/alykoshin/selenium-chrome-proxy-plugin#info=devDependencies)
# selenium-chrome-proxy-plugin
Chrome plugin generator for setting private proxies to use with Selenium
This module is based on https://github.com/RobinDev/Selenium-Chrome-HTTP-Private-Proxy
If you have different needs regarding the functionality, please add a [feature request](https://github.com/alykoshin/selenium-chrome-proxy-plugin/issues).
## Installation
```sh
npm install --save selenium-chrome-proxy-plugin
```
## Usage
For usage please refer to `examples/index.js`.
Do not forget to put `chromedriver` into same directory.
To run with debug output:
```sh
$ DEBUG=selenium-chrome-proxy-plugin node index
```
Module uses `os.tmpdir()` for temporary files (it depends on OS;`/tmp` for Linux).
Temp directory may be changed by providing `tempDir` property in config:
Please, do not forget to call `plugin.cleanpu()` to remove temporary files.
```js
const proxyConfig = {
host: '',
port: '',
username: '',
password: '',
tempDir: './temp'
};
return new ProxyPlugin({
proxyConfig: proxyConfig
//chromeOptions: chromeOptions,
})
.then((plugin) => {
console.log('PLUGIN READY');
return new webdriver.Builder()
.forBrowser('chrome')
.setChromeOptions(plugin.chromeOptions)
.build()
.then((driver) => plugin.cleanup()
.then(() => driver.get('http://whatismyip.host/'))
.then(() => console.log('DONE'))
)
;
})
.catch((err) => console.log('ERROR:', err))
;
```
It is also possible to provide `chromeOptions`:
```js
return new ProxyPlugin({ proxyConfig: config, options: chromeOptions })
.then((plugin) => {
...
```
May be used with callbacks:
```js
return new ProxyPlugin({
proxyConfig: proxyConfig,
//chromeOptions: chromeOptions,
}, (err, plugin) => {
...
});
```
More info along with working examples may be found in `examples` subdirectory.
## Credits
[Alexander](https://github.com/alykoshin/)
# Links to package pages:
[github.com](https://github.com/alykoshin/selenium-chrome-proxy-plugin) [npmjs.com](https://www.npmjs.com/package/selenium-chrome-proxy-plugin) [travis-ci.org](https://travis-ci.org/alykoshin/selenium-chrome-proxy-plugin) [coveralls.io](https://coveralls.io/github/alykoshin/selenium-chrome-proxy-plugin) [inch-ci.org](https://inch-ci.org/github/alykoshin/selenium-chrome-proxy-plugin)
## License
MIT