-1

我想在 C# 中使用带有 Xilium CefGlue 凭据的代理。谁能告诉我该怎么做?

我正在做这样的事情: -

internal class CefProxy : CefUrlRequestClient
    {
        protected override void OnDownloadData(CefUrlRequest request, Stream data)
        {
            throw new NotImplementedException();
        }

        protected override void OnDownloadProgress(CefUrlRequest request, ulong current, ulong total)
        {
            throw new NotImplementedException();
        }

        protected override void OnRequestComplete(CefUrlRequest request)
        {
            throw new NotImplementedException();
        }

        protected override void OnUploadProgress(CefUrlRequest request, ulong current, ulong total)
        {
            throw new NotImplementedException();
        }

        protected override bool GetAuthCredentials(bool isProxy, string host, int port, string realm, string scheme, CefAuthCallback callback)
        {
            return base.GetAuthCredentials(true, host, port, realm, scheme, callback);
        }
    }

但是如何调用 GetAuthCredentials 方法呢?

4

1 回答 1

0

CEF调用的GetAuthCredentials,你不应该直接调用它(也没有办法这样做)。如果您需要这个进行常规浏览:您需要实现 CefRequestHandler(并覆盖 GetAuthCredentials)。CefUrlRequestClient 仅与 CefUrlRequest 有关,不清楚您到底在做什么。

此外,只有需要授权的代理才会调用 GetAuthCredentials 方法。

于 2017-07-02T17:31:18.073 回答