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

第 3 頁,共 3 頁 首頁首頁 1 2 3
顯示結果從第 21 筆 到 21 筆,共計 21 筆
  1. #21
    FYI
    FYI 目前未上線
    會員
    註冊日期
    2001-06-22
    討論區文章
    7,294

    SwitchProxy for Firefox + proxy.pac

    除了前面所介紹的FoxyProxy 之外, Firefox 用戶也不妨考慮 "SwitchProxy Tool :: Firefox Add-ons"

    IE 設定: 控制台 -> 網際網路選項 -> 連線 -> 設定值 -> 使用自動組態指令碼
    Firefox 工具 -> 選項 -> 進階 -> 網路 -> 設定 -> Proxy 自動設定網址
    網址輸入 file://c:\proxy.pacfile:///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) 的功能"

    修改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

第 3 頁,共 3 頁 首頁首頁 1 2 3

類似的主題

  1. 【求助】如何突破社區網路的限制?
    作者:kazzer 所在討論版:-- 網 路 技 術 版
    回覆: 10
    最後發表: 2005-09-14, 08:28 PM
  2. 【求助】我的網路竟然要設proxy伺服器才可以連線?
    作者:goto430 所在討論版:-- Cable Modem 心 得 交 流 版
    回覆: 4
    最後發表: 2005-04-11, 12:25 PM
  3. 一個可以過過MAC癮的瀏覽器
    作者:metalmax 所在討論版:-- Windows 討 論 版
    回覆: 2
    最後發表: 2002-01-19, 12:32 PM
  4. 一個可以過過MAC癮的瀏覽器
    作者:metalmax 所在討論版:-- 網 路 軟 體 討 論 一 版 (Browser,Email
    回覆: 2
    最後發表: 2002-01-19, 12:32 PM
  5. [推薦]一個可設置多個proxy伺服器瀏覽器,突破網路的限制暢遊Internet
    作者:a8300 所在討論版:---- ADSL 軟 硬 體 技 術
    回覆: 2
    最後發表: 2001-11-07, 07:26 PM

 

proxy .pac 突破

proxy.pac not alert mac

發表文章規則

  • 不可以發表新主題
  • 不可以回覆文章
  • 不可以上傳附加檔案
  • 不可以編輯自己的文章
  •