| 會員 ![]() | SwitchProxy for Firefox + proxy.pac 除了前面所介紹的FoxyProxy 之外, Firefox 用戶也不妨考慮 "SwitchProxy Tool :: Firefox Add-ons" 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/vbb3/thread/6/post/20756/1002231/#post1002231
// Reference: http://www.returnproxy.com/proxypac/
// Firefox: file:///c:/proxy.pac
// IE: file://c:/proxy.pac
修改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/Proximodo , UltraSurf (無界) 和Freegate (自由門/動態網), 如果您需要絕對隱密, 那麼您可以考慮安裝Vidalia Bundles (包含Tor + Privoxy), 另外, 請將區網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) Proxy auto-config - Wikipedia, the free encyclopedia JavaScript or JScript Auto-Proxy Example Files Writing Effective Proxy Automatic Configuration (PAC) Files Access and Watch Veoh Even if Veoh Is No Longer Available in Your Country >> Raymond.CC Blog Access and Visit US-Only Restricted Websites (Hulu, Pandora, Weoh, ABC, CW) from Outside of United States >> My Digital Life HOWTO: Bypass censorship using proxy services - Raymond.CC Forum IPv4 - Wikipedia, the free encyclopedia FF2 + SwitchProxy Tool 1.4.1, 請自行修改擴充套件 (以7-Zip 展開): install.rdf 語法: <em:maxVersion>3+</em:maxVersion> 此篇文章於 2010-08-16 05:27 AM 被 FYI 編輯。. 原因: 修改 proxy.pac |
| 回覆 |
| |
類似的主題 | ||||
| 主題 | 主題作者 | 討論版 | 回覆 | 最後發表 |
| 推薦 - 金錢簡史 | prozacist | ---- PCZONE 讀 書 會 | 5 | 2005-05-15 07:41 PM |
| [推薦] BT檔案分享中文網站 | james19 | -- 優 質 網 站 分 享 | 31 | 2004-11-10 12:56 AM |
| 推薦!!推薦!!一個"許慧欣"的家族 | andy19857428 | -- 優 質 網 站 分 享 | 1 | 2003-01-28 05:31 PM |
| [推薦] Yahoo的即時通 | iget | -- 網 路 軟 體 討 論 二 版 (網路其他軟體) | 0 | 2001-11-21 11:00 PM |
| [推薦]一個可設置多個proxy伺服器瀏覽器,突破網路的限制暢遊Internet | a8300 | ---- ADSL 軟 硬 體 技 術 | 2 | 2001-11-07 07:26 PM |
| XML | RSS 2.0 | RSS |
本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。