-
WebBrowser.zip下载
资源介绍
CefSharp49.0.1.0浏览器模拟人工点击输入进行deepl翻译,同时可动态更换IP
更换IP相关代码如下:
async Task SetProxy(ChromiumWebBrowser cwb, string Address)
{
await Cef.UIThreadTaskFactory.StartNew(delegate
{
var rc = cwb.GetBrowser().GetHost().RequestContext;
//var v = new Dictionary(Tkey,Tvalue);
var v = new Dictionary();
v["mode"] = "fixed_servers";
v["server"] = Address;
string error;
bool success = rc.SetPreference("proxy", v, out error);
if (success && string.IsNullOrWhiteSpace(error))
{
LoadURL("http://www.wycaiji.com/ajax.php?tt=12345");
MessageBox.Show("代理设置成功,代理IP:" + Address);
}
else
MessageBox.Show("代理设置失败,"+error, "Tip", MessageBoxButtons.OK, MessageBoxIcon.Error);
});
注意:初始化时不要设代理,否则无效
}
- 上一篇: Nginx运维宝典
- 下一篇: nginx-1.19.0-windows.zip