我想在学校网络上使用 SSH 和其他协议。但是,学校网络输出完全被阻止。访问互联网的唯一方法是使用 Squid HTTP 代理,它支持 HTTPS 的 CONNECT 方法。我开始计划使用通过 V2Ray 和 WebSocket 隧道传输的 shadowsocks 代理。它在家里可以工作,但我找不到指示 V2Ray 使用 http squid 代理的方法。
我尝试做透明代理,但它不适用于本地 Squid HTTP 代理。
# Client config
{
"server":"138.201.145.226",
"server_port":80,
"local_port":2554,
"password":"_redacted_",
"timeout":600,
"method":"chacha20-ietf-poly1305",
"plugin": "v2ray-plugin",
"plugin_opts": "loglevel=debug;host=redacted.host"
}
# WPAD for the school network
function FindProxyForURL(url, host) {
if (
isInNet(dnsResolve(host), "127.0.0.0", "255.255.255.0") ||
isInNet(dnsResolve(host), "10.129.0.0", "255.255.0.0") ||
isInNet(myIpAddress(), "10.167.191.0", "255.255.255.0") ||
isInNet(dnsResolve(host), "192.168.228.0", "255.255.255.0") ||
isInNet(dnsResolve(host), "10.167.191.0", "255.255.255.0") ||
isInNet(dnsResolve(host), "10.167.224.0", "255.255.224.0") ||
isInNet(dnsResolve(host), "10.167.191.0", "255.255.255.0") ||
isInNet(dnsResolve(host), "10.167.224.0", "255.255.224.0")
)
{
return "DIRECT";
};
return "PROXY 192.168.228.254:3128";
}