logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

pacparser - Library to parse proxy auto-confg (PAC) files.

Author

       Generated automatically by Doxygen for Pacparser from the source code.

Pacparser                                        Tue Sep 1 2015                                     pacparser(3)

Detailed Description

       API for pacparser library, a library to use proxy auto-config (PAC) files. See project homepage:
       http://github.com/pacparser/pacparser for more information.

       Author:
           Manu Garg manugarg@gmail.com

Function Documentation

intpacparser_init(void)
       Initializes pac parser.

       Returns:
           0 on failure and 1 on success.

       Initializes JavaScript engine and does few basic initializations specific to pacparser.

   intpacparser_parse_pac_file(constchar*pacfile)
       Parses the given PAC file.

       Parameters:pacfile PAC file to parse.

       Returns:
           0 on failure and 1 on success.

       Reads the given PAC file and evaluates it in the JavaScript context created by pacparser_init.

   intpacparser_parse_pac_string(constchar*pacstring)
       Parses the given PAC script string.

       Parameters:pacstring PAC string to parse.

       Returns:
           0 on failure and 1 on success.

       Evaluates the given PAC script string in the JavaScript context created by pacparser_init.

   intpacparser_parse_pac(constchar*pacfile)
       Parses the gievn pac file.

       Deprecated
           Use pacparser_parse_pac_file instead.

           Parameters:pacfile PAC file to parse.

           Returns:
               0 on failure and 1 on success.

       Same as pacparser_parse_pac_file. Included only for backward compatibility.

   char*pacparser_find_proxy(constchar*url,constchar*host)
       Finds proxy for the given URL and Host.

       Parameters:url URL to find proxy for.
           host Host part of the URL.

       Returns:
           proxy string on success and NULL on error.

       Finds proxy for the given URL and Host. This function should be called only after pacparser engine has
       been initialized (using pacparser_init) and pac script has been parsed (using pacparser_parse_pac_file or
       pacparser_parse_pac_string).

   char*pacparser_just_find_proxy(constchar*pacfile,constchar*url,constchar*host)
       Finds proxy for the given PAC file, URL and Host.

       Parameters:pacfile PAC file to parse.
           url URL to find proxy for.
           host Host part of the URL.

       Returns:
           proxy string on success and NULL on error.

       This function is a wrapper around functions pacparser_init, pacparser_parse_pac_file,
       pacparser_find_proxy and pacparser_cleanup. If you just want to find out proxy for a given set of pac
       file, url and host, this is the function to call. This function takes care of all the initialization and
       cleanup.

   voidpacparser_cleanup(void)
       Destroys JavaSctipt context. This function should be called once you're done with using pacparser engine.

   voidpacparser_setmyip(constchar*ip)
       Sets my IP address.

       Parameters:ip Custom IP address.

       Sets my IP address to a custom value. This is the IP address returned by myIpAddress() javascript
       function.

   voidpacparser_set_error_printer(pacparser_error_printerfunc)
       Sets error printing function.

       Parameters:func Printing function.

       Sets error variadic-argument printing function. If not set the messages are printed to stderr. If
       messages begin with DEBUG: or WARNING:, they are not fatal error messages, otherwise they are. May be
       called before pacparser_init().

   voidpacparser_enable_microsoft_extensions(void)
       (Deprecated) Enable Microsoft IPv6 PAC extensions. Deprecated. IPv6 extension (*Ex functions) are enabled
       by default now.

   char*pacparser_version(void)
       Returns pacparser version.

       Returns:
           version string if version defined, '' otherwise.

       Version string is determined at the time of build. If built from a released package, version corresponds
       to the latest release (git) tag. If built from the repository, it corresponds to the head revision of the
       repo.

Name

       pacparser - Library to parse proxy auto-confg (PAC) files.

       API for pacparser library, a library to use proxy auto-config (PAC) files. See project homepage:
       http://github.com/pacparser/pacparser for more information.

   Typedefs
       typedef int(* pacparser_error_printer )(const char *fmt, va_list argp)
           Typedefinitionforpacparser_error_printer.Functions
       int pacparser_init (void)
           Initializespacparser.
       int pacparser_parse_pac_file (const char *pacfile)
           ParsesthegivenPACfile.
       int pacparser_parse_pac_string (const char *pacstring)
           ParsesthegivenPACscriptstring.
       int pacparser_parse_pac (const char *pacfile)
           Parsesthegievnpacfile.
       char * pacparser_find_proxy (const char *url, const char *host)
           FindsproxyforthegivenURLandHost.
       char * pacparser_just_find_proxy (const char *pacfile, const char *url, const char *host)
           FindsproxyforthegivenPACfile,URLandHost.
       void pacparser_cleanup (void)
           DestroysJavaSctiptcontext.
       void pacparser_setmyip (const char *ip)
           SetsmyIPaddress.
       void pacparser_set_error_printer (pacparser_error_printer func)
           Setserrorprintingfunction.
       void pacparser_enable_microsoft_extensions (void)
           (Deprecated)EnableMicrosoftIPv6PACextensions.
       char * pacparser_version (void)
           Returnspacparserversion.

See Also