{"id":13641683,"url":"https://github.com/manugarg/pacparser","last_synced_at":"2025-10-21T04:56:08.785Z","repository":{"id":6719019,"uuid":"7964777","full_name":"manugarg/pacparser","owner":"manugarg","description":"A library to parse proxy auto-config (PAC) files","archived":false,"fork":false,"pushed_at":"2025-10-03T06:03:30.000Z","size":4665,"stargazers_count":526,"open_issues_count":17,"forks_count":121,"subscribers_count":20,"default_branch":"main","last_synced_at":"2025-10-03T08:18:17.745Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://pacparser.manugarg.com","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manugarg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2013-02-01T19:30:16.000Z","updated_at":"2025-10-03T06:03:31.000Z","dependencies_parsed_at":"2022-07-20T12:02:38.760Z","dependency_job_id":"3538dfbc-2dfd-428c-ae2f-f5401cc375b4","html_url":"https://github.com/manugarg/pacparser","commit_stats":{"total_commits":351,"total_committers":17,"mean_commits":"20.647058823529413","dds":"0.40740740740740744","last_synced_commit":"c489c97c390d632213eec7fe5be9037c2cd4e1c5"},"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"purl":"pkg:github/manugarg/pacparser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manugarg%2Fpacparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manugarg%2Fpacparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manugarg%2Fpacparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manugarg%2Fpacparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manugarg","download_url":"https://codeload.github.com/manugarg/pacparser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manugarg%2Fpacparser/sbom","scorecard":{"id":616017,"data":{"date":"2025-08-11","repo":{"name":"github.com/manugarg/pacparser","commit":"198ccdb23b9f0c84e58d9d5864ccffbe80a52506"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/build.yml:21","Warn: topLevel 'packages' permission set to 'write': .github/workflows/build.yml:22","Info: topLevel permissions set to 'read-all': .github/workflows/sonar.yml:8","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: COPYING:0","Info: FSF or OSI recognized license: GNU Lesser General Public License v3.0: COPYING:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.4.5 not signed: https://api.github.com/repos/manugarg/pacparser/releases/163160521","Warn: release artifact v1.4.3 not signed: https://api.github.com/repos/manugarg/pacparser/releases/137256330","Warn: release artifact v1.4.2 not signed: https://api.github.com/repos/manugarg/pacparser/releases/104287842","Warn: release artifact v1.4.0 not signed: https://api.github.com/repos/manugarg/pacparser/releases/65299451","Warn: release artifact v1.4.5 does not have provenance: https://api.github.com/repos/manugarg/pacparser/releases/163160521","Warn: release artifact v1.4.3 does not have provenance: https://api.github.com/repos/manugarg/pacparser/releases/137256330","Warn: release artifact v1.4.2 does not have provenance: https://api.github.com/repos/manugarg/pacparser/releases/104287842","Warn: release artifact v1.4.0 does not have provenance: https://api.github.com/repos/manugarg/pacparser/releases/65299451"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:103: update your workflow using https://app.stepsecurity.io/secureworkflow/manugarg/pacparser/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:118: update your workflow using https://app.stepsecurity.io/secureworkflow/manugarg/pacparser/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:277: update your workflow using https://app.stepsecurity.io/secureworkflow/manugarg/pacparser/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:283: update your workflow using https://app.stepsecurity.io/secureworkflow/manugarg/pacparser/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:289: update your workflow using https://app.stepsecurity.io/secureworkflow/manugarg/pacparser/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:292: update your workflow using https://app.stepsecurity.io/secureworkflow/manugarg/pacparser/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:295: update your workflow using https://app.stepsecurity.io/secureworkflow/manugarg/pacparser/build.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:2","Warn: containerImage not pinned by hash: Dockerfile:17: pin your Docker image by updating ubuntu:latest to ubuntu:latest@sha256:7c06e91f61fa88c08cc74f7e1b7c69ae24910d745357e0dfe1d2c0322aaf20f9","Warn: pipCommand not pinned by hash: .github/workflows/build.yml:180","Warn: pipCommand not pinned by hash: .github/workflows/build.yml:200","Warn: pipCommand not pinned by hash: .github/workflows/build.yml:241","Info:  12 out of  16 GitHub-owned GitHubAction dependencies pinned","Info:   3 out of   6 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned","Info:   0 out of   3 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":2,"reason":"SAST tool is not run on all commits -- score normalized to 2","details":["Warn: 4 commits out of 19 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T03:58:46.894Z","repository_id":6719019,"created_at":"2025-08-21T03:58:46.894Z","updated_at":"2025-08-21T03:58:46.894Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280207209,"owners_count":26290616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T01:01:23.046Z","updated_at":"2025-10-21T04:56:08.769Z","avatar_url":"https://github.com/manugarg.png","language":"C","funding_links":[],"categories":["Development","C"],"sub_categories":["Time Series"],"readme":"[![Build Status](https://github.com/manugarg/pacparser/actions/workflows/build.yml/badge.svg)](https://github.com/manugarg/pacparser/actions/workflows/build.yml)\n[![PyPI version](https://badge.fury.io/py/pacparser.svg)](https://badge.fury.io/py/pacparser)\n[![PyPI Downloads](https://static.pepy.tech/badge/pacparser)](https://pepy.tech/project/pacparser)\n[![Packaging status](https://repology.org/badge/tiny-repos/pacparser.svg)](https://repology.org/project/pacparser/versions)\n\n# [Pacparser](http://pacparser.manugarg.com)\n***[pacparser.manugarg.com](http://pacparser.manugarg.com)***\n\nPacparser is a library to parse proxy auto-config (PAC) files. Proxy auto-config\nfiles are a vastly used proxy configuration method these days. Web browsers can\nuse a PAC file to determine which proxy server to use or whether to go direct\nfor a given URL. PAC files are written in JavaScript and can be programmed to\nreturn different proxy methods (e.g., `\"PROXY proxy1:port; DIRECT\"`) depending\nupon URL, source IP address, protocol, time of the day etc. PAC files introduce\na lot of possibilities. Please look at the wikipedia entry for Proxy auto-config\n(\u003chttp://en.wikipedia.org/wiki/Proxy_auto-config\u003e) for more information.\n\nThe idea behind pacparser is to make it easy to add PAC-file parsing capability\nto any program (C and python supported right now). It comes as a shared C library\nand a python module which can be used to make any C or python program PAC scripts\naware.\n\n### Implementation\nPacparser makes use of the Mozilla's JavaScript interpreter SpiderMonkey to parse\nPAC files (which are nothing but javascripts). Apart from that, proxy\nauto-config standard assumes availability of some functions which are not\npart of the standard JavaScript. Pacparser uses Mozilla's PAC implementation to\ndefine all these functions except for a couple of dns functions which are defined by\npacparser itself. As a result, pacparser is as close to standard as it gets :)\n\n### Install\n\nFor Python module, you can use pip. Pre-built module is available for `64-bit Linux,\nWindows, MacOS-Intel, and MacOS-ARM`, for Python `3.7, 3.8, 3.9, 3.10 and 3.11`.\n```\npython -m pip install pacparser\npython -m pip install pacparser==1.3.8.dev15 (specific version)\n```\n\nFor other pre-built binaries, download them from the project's [releases](\n  https://github.com/manugarg/pacparser/releases) page.\n  \nYou can also download the latest binaries from the [Github actions](\n  https://github.com/manugarg/pacparser/actions) artifcacts.\n\nSee [INSTALL](https://github.com/manugarg/pacparser/blob/master/INSTALL) for how\nto compile pacparser from the source.\n\n### How to use it?\nPacparser comes as a shared library (`libpacparser.so` on Linux, `libpacparser.dylib`\non MacOS, and pacparser.dll on windows) as well as a python module. Using it is as\neasy compiling your C programs against it or importing pacparser module in your\npython programs.\n\n### Usage Examples\n\n#### Python:\n```python\n\u003e\u003e\u003e import pacparser\n\u003e\u003e\u003e pacparser.init()\n\u003e\u003e\u003e pacparser.parse_pac('examples/wpad.dat')\n\u003e\u003e\u003e pacparser.find_proxy('http://www.google.com', 'www.google.com')\n'DIRECT'\n\u003e\u003e\u003e pacparser.setmyip(\"192.168.1.134\")\n\u003e\u003e\u003e pacparser.find_proxy('http://www.google.com', 'www.google.com')\n'PROXY proxy1.manugarg.com:3128; PROXY proxy2.manugarg.com:3128; DIRECT'\n\u003e\u003e\u003e pacparser.find_proxy('http://www2.manugarg.com', 'www2.manugarg.com')\n'DIRECT'\n\u003e\u003e\u003e pacparser.cleanup()\n\u003e\u003e\u003e\n```\n\n#### C\n```C\n#include \u003cstdio.h\u003e\n\nint pacparser_init();\nint pacparser_parse_pac(char* pacfile);\nchar *pacparser_find_proxy(char *url, char *host);\nvoid pacparser_cleanup();\n\nint main(int argc, char* argv[])\n{\n  char *proxy;\n  pacparser_init();\n  pacparser_parse_pac(argv[1]);\n  proxy = pacparser_find_proxy(argv[2], argv[3]);\n  printf(\"%s\\n\", proxy);\n  pacparser_cleanup();\n}\n```\n```\nmanugarg@hobbiton:~$ gcc -o pactest pactest.c -lpacparser\nmanugarg@hobbiton:~$ ./pactest wpad.dat http://www.google.com www.google.com\nPROXY proxy1.manugarg.com:3128; PROXY proxy2.manugarg.com:3128; DIRECT\n```\n\n#### Platforms\npacparser has been tested to work on Linux (all architectures supported by\nDebian), FreeBSD, Mac OS X and Win32 systems.\n\n#### Homepage\nhttp://pacparser.manugarg.com\n\nAuthor: [Manu Garg](http://github.com/manugarg)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanugarg%2Fpacparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanugarg%2Fpacparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanugarg%2Fpacparser/lists"}