Chrome扩展程序配置代理用户名和密码 [英] Chrome Extension Config Proxy UserName and Password

查看:1418
本文介绍了Chrome扩展程序配置代理用户名和密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个用于动态更改代理设置的Chrome扩展。但是在chrome.proxy.settings.set函数中,不可能为代理配置用户名和密码。因此,每次必须手动输入凭据一次设置更改。

I am creating a chrome extension for changing proxy settings dynamically. But in "chrome.proxy.settings.set" function its not possible to config userName and password for the proxy. So every time I have to manually enter credentials once settings are changed.

但我发现在 Proxy Auto Auth 扩展它的一些如何以编程方式配置用户名和密码。我找不到任何有关如何操作的文档。

But I found that in Proxy Auto Auth extension its some how configuring username and password programmatically. I could not find any documentation on how to do this.

如果有人能够帮助解决这个问题,我将不胜感激。

I would be grateful if someone can help on this.

推荐答案

这是通过使用 webRequest API 来拦截和回答认证请求。

It's doing it by using the webRequest API to intercept and answer the auth request.

请参阅 onAuthRequired 事件。您需要主持人webRequestwebRequestBlocking权限。

这篇关于Chrome扩展程序配置代理用户名和密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆