在Titanium-Web-Proxy中,可以排除您不想代理的Https地址。这些示例为此使用OnBeforeTunnelConnectRequest,但是目前只有该请求是已知的。
private async Task OnBeforeTunnelConnectRequest(object sender, TunnelConnectSessionEventArgs e)
{
string hostname = e.HttpClient.Request.RequestUri.Host;
await WriteToConsole("Tunnel to: " + hostname);
if (hostname.Contains("dropbox.com"))
{
// Exclude Https addresses you don't want to proxy
// Useful for clients that use certificate pinning
// for example dropbox.com
e.DecryptSsl = false;
}
}
但是我需要从服务器证书中获取信息以排除地址。我只能在ServerCertificateValidationCallback
中获得服务器证书,但是目前无法排除该地址。该怎么办?