{"id":15107115,"url":"https://github.com/shadowsocks/pacrunner","last_synced_at":"2025-09-27T05:31:37.941Z","repository":{"id":65979120,"uuid":"219994368","full_name":"shadowsocks/pacrunner","owner":"shadowsocks","description":null,"archived":false,"fork":true,"pushed_at":"2019-11-02T07:32:03.000Z","size":28,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-08T01:01:23.017Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"komsomolskinari/pacrunner","license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shadowsocks.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-06T12:42:51.000Z","updated_at":"2024-07-16T22:31:17.000Z","dependencies_parsed_at":"2023-02-19T19:00:47.916Z","dependency_job_id":null,"html_url":"https://github.com/shadowsocks/pacrunner","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowsocks%2Fpacrunner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowsocks%2Fpacrunner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowsocks%2Fpacrunner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowsocks%2Fpacrunner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shadowsocks","download_url":"https://codeload.github.com/shadowsocks/pacrunner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234391381,"owners_count":18824810,"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","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-09-25T21:04:35.314Z","updated_at":"2025-09-27T05:31:37.669Z","avatar_url":"https://github.com/shadowsocks.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# PACRunner\n\n[![Build Status](https://travis-ci.org/komsomolskinari/pacrunner.svg?branch=master)](https://travis-ci.org/komsomolskinari/pacrunner)\n[![Coverage Status](https://coveralls.io/repos/github/komsomolskinari/pacrunner/badge.svg?branch=master)](https://coveralls.io/github/komsomolskinari/pacrunner?branch=master)\n[![npm version](https://badge.fury.io/js/pacrunner.svg)](https://badge.fury.io/js/pacrunner)\n\nRun PAC file in specific context.\n\n## Example\n[Demo project](https://github.com/komsomolskinari/pacrunner-demo/)\n\nAssume a PAC \"template\" file `template.pac`, some variable is replaced to real value on server side. (So it can't directly run in JS engine):\n\n```js\n// template.pac\n// _HOST and _PROXY will replaced with real value before send to client. \nfunction FindProxyForURL(url, host) {\n\tif (host == _HOST) return _PROXY;\n\treturn 'DIRECT;';\n}\n``` \n\n```js\nimport { PAC } from 'pacrunner';\n\nconsole.log(\n\tPAC.FromFile('template.pac').Run('https://exhentai.org/img/kokomade.jpg', {\n\t\t_HOST: 'exhentai.org',\n\t\t_PROXY: 'SOCKS 127.0.0.1:1080;'\n\t})\n);\n// console: 'SOCKS 127.0.0.1:1080;'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowsocks%2Fpacrunner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshadowsocks%2Fpacrunner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowsocks%2Fpacrunner/lists"}