提交 561b8a92 编写于 作者: yanghye's avatar yanghye

add: demo proxy

上级 8a3b9564
......@@ -58,7 +58,7 @@ func main() {
//&cef.TCefProxy{
// ProxyType: consts.PtAutodetect,
// ProxyScheme: consts.PsSOCKS4,
// ProxyServer: "127.0.0.1",
// ProxyServer: "192.168.1.100",
// ProxyPort: 8888,
// ProxyUsername: "username",
// ProxyPassword: "password",
......@@ -67,7 +67,7 @@ func main() {
// MaxConnectionsPerProxy: 100,
//}
proxyDict.SetString("mode", "fixed_servers")
proxyDict.SetString("server", "192.168.1.31:8888")
proxyDict.SetString("server", "192.168.1.100:8888")
// 最后通过 Value 将代理字典值设置到 requestContext.SetPreference("proxy", proxy)
proxy := cef.ValueRef.New()
proxy.SetDictionary(proxyDict)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册