PAC 文件中的 HTTPS [英] HTTPS in PAC file

查看:41
本文介绍了PAC 文件中的 HTTPS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个 .pac 文件以在没有越狱的情况下与 iOS5 一起使用,但是我觉得匹配以https"开头的 url 时遇到了麻烦(例如:https://test.com).

I am writing a .pac file for use with iOS5 without jailbreak, but I feel trouble in matching the url starting with "https" (eg: https://test.com).

这是我的脚本:

function FindProxyForURL(url, host) {
  if (shExpMatch(url, "https://*")) return "PROXY 123.123.123.123";
  return 'DIRECT';
}

如果我匹配到https://test.com",我如何将https://123.123.123.123"返回到 URL?

And if I matched "https://test.com", how can I return "https://123.123.123.123" to the URL?

推荐答案

这不应该被接受.如果可以,请投票删除.

This should not have been accepted. Please vote to delete if you can.

您无法在不破坏端到端安全性的情况下代理 HTTPS 协议,这是其唯一的显着特征.您的匹配项不起作用"的原因是您的 PAC 文件被 HTTPS 忽略.

You cannot proxy the HTTPS protocol without breaking end-to-end security, which is its single distinguishing feature. The reason your matches "don't work" is that your PAC file is ignored for HTTPS.

无论技术上是否可行,通过 HTTPS 在浏览器和设备上的代理之间路由流量也是毫无意义的.我想这是出于安全原因而无法实现的(这样用户就不会被愚弄以为流量不安全时就认为它是安全的),但我还没有进行调查.

Routing the traffic between the browser and an on-device proxy over HTTPS is also quite pointless, regardless of whether it is technically possible. I imagine it has been made impossible for security reasons (so that users cannot be fooled to think traffic is secure when it isn't) but I have not investigated.

这篇关于PAC 文件中的 HTTPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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