Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7694461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:19:34+00:00 2026-05-31T21:19:34+00:00

I remember a while back reading about editing the proxy pac file which would

  • 0

I remember a while back reading about editing the proxy pac file which would switch proxies every set time interval, such as on an hourly basis.

But I cannot find the function or remember how to do this,

am I mistaken or is this possible with proxy.pac?

I am using mozilla.

UPDATE: Is FindProxyForURL() called every time a HTTP request is sent out?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:19:36+00:00Added an answer on May 31, 2026 at 9:19 pm

    The PAC file is simply a Javascript function function FindProxyForURL(url, host) {} that gets the URL of the resource being fetched and returns a string specifying which proxy to use (or DIRECT for no proxy at all) for that resource.
    All browser requests go through the function, regardless of the protocol.

    In that function block, you should be able to query the current time and make a decision on which proxy to return.

    For instance:

    function FindProxyForURL(url, host) {
        // If URL has no dots in host name, send traffic direct.
        if (isPlainHostName(host)) return "DIRECT";
    
        // Known local Top Level Domains are direct
        if(/\.(local|lcl|domain|grp|localdomain)(\:\d+)?($|\/)/i.test(url))
            return "DIRECT";
    
        // Split traffic depending on the time
        var dTime = new Date();
        var hours = dTime.getHours();
        if (hours < 12) {
            // From midnight to lunchtime, use Proxy A
            // which is a standard HTTP proxy on port 8080
            return "PROXY proxyA.example.com:8080"
        } else {
            // From lunchtime to midnight, use Proxy B
            // which is a Socks5 proxy on port 777
            return "SOCKS5 proxyB.example.com:777"
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I remember reading quite a while back about a constructor idiom for C++ in
Ok. Googling fail probably and I remember reading about this a while back but
I'm not terribly familiar with NoSQL systems, but I remember reading a while back
I remember reading a great document a while back explaining the rationale for Git
I remember reading a while back in regards to logical operators that in the
I remember reading a while back that randomly SQL Server can slow down and
I remember reading a blog post about a group that had taken a branch
Vaguely remember seeing some discussions on this quite a while back but haven't heard
I remember using a JavaScript in-browser editor a while back but cant remember the
I am using MySQL Community Server 5.1. I remember a while back I heard

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.