將 V2Ray 與 http 代理程式結合使用

將 V2Ray 與 http 代理程式結合使用

我想在學校網路中使用 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";
}

相關內容