[推薦]一個可設置多個proxy伺服器瀏覽器,突破網路的限制暢遊Internet



贊助商連結


頁 : 1 2 [3]

FYI
2008-01-16, 10:33 PM
除了前面所介紹的FoxyProxy 之外, Firefox 用戶也不妨考慮 "SwitchProxy Tool :: Firefox Add-ons (https://addons.mozilla.org/en-US/firefox/addon/125)"

IE 設定: 控制台 -> 網際網路選項 -> 連線 -> 設定值 -> 使用自動組態指令碼
Firefox 工具 -> 選項 -> 進階 -> 網路 -> 設定 -> Proxy 自動設定網址
網址輸入 file://c:\proxy.pac 或 file:///c:/proxy.pac (請自行將 "c:" 改成檔案正確存放位置)
然後建立一個純文字檔 "proxy.pac", 以下範例適用於Hinet 用戶:

function FindProxyForURL(url,host) {

// Convert hostname to lower case.
tmp = host.toLowerCase();
host = tmp;

// Process specific rules first. Run UltraSurf (9666), Freegate_F3 (8580), Garden (8081) or GPass.
if ((host == "www.pandora.com") ||
(host == "video.cgi.cbs.com") ||
(host == "www.grandcentral.com")
) return "PROXY 127.0.0.1:9666; PROXY 127.0.0.1:8580; PROXY 127.0.0.1:8081; DIRECT";

// Bypass https, ftp and mms.
tmp = url.substring(0,5);
protocol = tmp.toLowerCase()
if (protocol != "http:") {
// alert ("Bypass " + url);
return "DIRECT";
}

// Setup default proxy
proxy = "PROXY proxy.hinet.net:80; DIRECT";

// Process specific rules first.
if (dnsDomainIs(host, ".cn") ||
dnsDomainIs(host, ".hk") ||
dnsDomainIs(host, ".jp")
) return proxy;

// Process speedy or private connections. Do not conflic with other rules.
if (dnsDomainIs(host, ".tw") ||
dnsDomainIs(host, ".cc") ||
dnsDomainIs(host, ".org") ||
dnsDomainIs(host, ".net") ||
dnsDomainIs(host, ".google.com") ||
dnsDomainIs(host, ".gmail.com") ||
dnsDomainIs(host, ".yahoo.com") ||
dnsDomainIs(host, ".yimg.com") ||
dnsDomainIs(host, ".live.com") ||
dnsDomainIs(host, ".msn.com") ||
dnsDomainIs(host, ".hotmail.com") ||
dnsDomainIs(host, ".microsoft.com") ||
dnsDomainIs(host, ".flickr.com") ||
dnsDomainIs(host, ".ebay.com") ||
dnsDomainIs(host, ".taobao.com") ||
dnsDomainIs(host, ".mobile01.com") ||
dnsDomainIs(host, ".5i01.com") ||
dnsDomainIs(host, ".shopping01.com") ||
dnsDomainIs(host, ".dd-wrt.com") ||
dnsDomainIs(host, ".openwrt.org") ||
dnsDomainIs(host, ".wl500g.info") ||
dnsDomainIs(host, ".hinet.net")
) return "DIRECT";

// Safely checking local IP address spaces.
// Do not include the "g" flag in the IP regex expression
if ((host.substring(0,1) == "1") ||
(host.substring(0,1) == "2")
) {
reip = /^\d+\.\d+\.\d+\.\d+$/;
if (reip.test(host)) {
// if (shExpMatch(host, "/^\d+\.\d+\.\d+\.\d+$/")) {
// if (isInNet(host, "192.168.0.0", "255.255.0.0") ||
// isInNet(host, "172.16.0.0", "255.240.0.0") ||
// isInNet(host, "10.0.0.0", "255.0.0.0") ||
// isInNet(host, "169.254.0.0", "255.255.0.0")
if (shExpMatch(host, "192.168.*") ||
shExpMatch(host, "172.16.*") ||
shExpMatch(host, "10.*") ||
shExpMatch(host, "224.*") ||
shExpMatch(host, "232.*") ||
shExpMatch(host, "233.*") ||
shExpMatch(host, "239.*") ||
shExpMatch(host, "169.254.*") ||
(host == "127.0.0.1")
) return "DIRECT";
}
}

// Check plain hostname and localhost
if (isPlainHostName(host) ||
// (host == "localhost") ||
shExpMatch(host, "localhost.*")
) return "DIRECT";

// alert ("Proxy alert!");
return proxy;

} // End of fuction

// Set "proxy.hinet.net:80" for Hinet users
// Set "proxy.seed.net.tw:8080" for Seednet users
// Copyleft: www.pczone.com.tw
// http://www.pczone.com.tw/thread/6/post/20756/1002231/#post1002231
// Reference: http://www.returnproxy.com/proxypac/
// Firefox: file:///c:/proxy.pac
// IE: file://c:/proxy.pac
以上原則是FIFO, 先吻合先執行, 請參考 "Mozilla Taiwan 討論區: 尋找某網站對應某代理伺服器 (Proxy) 的功能 (http://forum.moztw.org/viewtopic.php?t=7156)"

修改proxy.pac 之後, 必須由SwitchProxy 重新載入proxy.pac 或重新啟動IE, 變更才會生效, 以SwitchProxy 切換等同重新載入, 務必注意左右括弧, 若不對稱, 則整個組態都無效

以上範例中, 如果沒有先執行UltraSurf, 就造訪Pandora 的話, 函式FindProxyForURL 會先檢查return "PROXY 127.0.0.1:9666" 是否有效, 若無效則改為 "DIRECT", 避免造成無法連結, 此時請先以SwitchProxy 切換為None, 接著執行UltraSurf, 再切換回原來的Proxy 設定, 就可以不用重新啟動Firefox

在SwitchProxy 之中, 小弟將以上使用自動組態指令碼命名為Default, 除此之外, 小弟還建立了Hinet, Proxomitron (http://en.wikipedia.org/wiki/Proxomitron)/Proximodo (http://proximodo.sourceforge.net) , UltraSurf (無界) (http://www.wujie.net) 和Freegate (自由門/動態網) (http://us.dongtaiwang.com/loc/download_en.php), 如果您需要絕對隱密, 那麼您可以考慮安裝Vidalia Bundles (包含Tor + Privoxy) (http://www.vidalia-project.net), 另外, 請將區網IP 排除在外, 預設No Proxy for 的內容只有 "localhost, 127.0.0.1", 請再改為 "localhost,127.0.0.1,192.168.0.0/16,172.16.0.0/20,10.0.0.0/24"

Switch Proxy Options 只保留 "Show Context Menu" 打勾, 其餘取消, 變換Proxy 範本不重新載入目前頁面, 請手動更新目前頁面

另類代理 - 內容分發網路 Content Distribution Network (CDN) (http://www.pczone.com.tw/thread/29/136379/)
Proxy auto-config - Wikipedia, the free encyclopedia (http://en.wikipedia.org/wiki/Proxy_auto-config)
JavaScript or JScript Auto-Proxy Example Files (http://www.microsoft.com/technet/prodtechnol/ie/ieak/techinfo/deploy/60/en/corpexjs.mspx)
Writing Effective Proxy Automatic Configuration (PAC) Files (http://jcurnow.home.comcast.net/~jcurnow/WritingEffectivePACFiles.html)
Access and Watch Veoh Even if Veoh Is No Longer Available in Your Country >> Raymond.CC Blog (http://www.raymond.cc/blog/archives/2008/06/04/access-and-watch-veoh-even-if-veoh-is-no-longer-available-in-your-country/)
Access and Visit US-Only Restricted Websites (Hulu, Pandora, Weoh, ABC, CW) from Outside of United States >> My Digital Life (http://www.mydigitallife.info/2008/07/01/access-and-visit-us-only-restricted-websites-hulu-pandora-veoh-abc-cw-from-outside-of-united-states/)
HOWTO: Bypass censorship using proxy services - Raymond.CC Forum (http://www.raymond.cc/forum/network/7478-howto-bypass-censorship-using-proxy-services.html)
IPv4 - Wikipedia, the free encyclopedia (http://en.wikipedia.org/wiki/IPv4)

FF2 + SwitchProxy Tool 1.4.1, 請自行修改擴充套件 (以7-Zip 展開):
install.rdf

<em:maxVersion>3+</em:maxVersion>