解決Android Studio無法使用genpac生成的pac文件設置自動選擇代理的問題

genpac生成的文件少了個“;”,提了pull request但是作者不知道能不能看到,這裏手動改就好了。

打開pac文件,到最底下。

function testHost(host, index) {
    for (var i = 0; i < rules[index].length; i++) {
        for (var j = 0; j < rules[index][i].length; j++) {
            lastRule = rules[index][i][j]; //-->這裏加一個";",以前是沒有的。
            if (host == lastRule || host.endsWith('.' + lastRule))
                return i % 2 == 0 ? 'DIRECT' : proxy;
        }
    }
    lastRule = '';
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章