Respond to this messageReturn to Index
Original Message
  • Pacfile coding
    • Bethrezen (no login)
      Posted Feb 15, 2007 7:39 AM

      hi all

      I'm interested in learning how to code my own pacfile but I'm having trouble finding any reliable information there doesn't seem to be any simple step by step guides that walk me through the process of creating and editing my own pacfile

      after searching the net I found some useful information and have managed to construct a basic template

      here is the code

      function FindProxyForURL(url, host)
      {
      // Blocked sites
      if (0
      || {{Insert Blocks Here}}
      )
      return "PROXY 127.0.0.1:80";
      else
      return "DIRECT";
      }

      now having tested this in my browser it seems to function fine when given a test block

      so it's now on to step 2 adding a white list function now according to what I've been able to find the code for the white list should be

      // Allowed sites
      if (0
      || {{Insert Exceptions Here}}
      )
      return "DIRECT";

      now the problem is that I’m un-familiar with pacfile syntax and I'm not sure how or where to insert the white list code

      it was also suggested to me that in addition to adding the white list code I may also need a third condition that specifies what to do with sights that aren't listed in either the block list or the white list

      what i would like to happen in this case is for the browser to just connect to the sight normally now presumably that would be

      else
      return "DIRECT";

      but again I'm having the same problem I cant find any accurate simple to understand step by step instructions so i have no idea what I'm doing

      so if any one here has experience coding there own pacfiles I would really appreciate some help
    Login Status
  • You are not logged in
    • Login
      Password
       

      Optional
      Provides additional benefits such as notifications, signatures, and user authentication.


      Create Account
    Your Name
    Your Email
    (Optional)
    Message Title
    Message Text
    Options Also send responses to my email address
          


    Create your own forum at Network54
     Copyright © 1999-2009 Network54. All rights reserved.   Terms of Use   Privacy Statement