-
Tạo một file proxy.pac với nội dung:
function FindProxyForURL(url, host) { var proxy1 = "PROXY 1st.proxy.com:port"; // <-- Update here var proxy2 = "PROXY 2nd.proxy.com:port"; // <-- Update here var no_proxy = "DIRECT"; var proxy2_hosts = ["*example.com"]; // <-- Update here var no_proxy_hosts = ["127.0.0.1","localhost"]; // <-- Update here for (i = 0; i < no_proxy_hosts.length; i++) { if (shExpMatch(host, no_proxy_hosts[i])) return no_proxy; } for (i = 0; i < proxy2_hosts.length; i++) { if (shExpMatch(host, proxy2_hosts[i])) return proxy2; } return proxy1; }
-
Mở
Firefox Preferences
->Network Settings
. -
Chọn
Automatic proxy configuration URL
. -
Điền đường dẫn tới file proxy.pac:
file:///path/to/proxy.pac
-
Reload.
-
OK.
comments powered by Disqus