{"id":13583529,"url":"https://github.com/humanmade/trafficator","last_synced_at":"2026-02-17T23:33:13.727Z","repository":{"id":35022757,"uuid":"197609779","full_name":"humanmade/trafficator","owner":"humanmade","description":"Traffic generator for local analytics testing","archived":false,"fork":false,"pushed_at":"2022-06-25T18:16:45.000Z","size":82,"stargazers_count":32,"open_issues_count":4,"forks_count":6,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-12-31T06:51:18.162Z","etag":null,"topics":["puppeteer","testing-tools","traffic","traffic-generator","traffic-simulation"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/humanmade.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-07-18T15:09:55.000Z","updated_at":"2025-10-17T22:14:58.000Z","dependencies_parsed_at":"2022-07-29T03:18:18.620Z","dependency_job_id":null,"html_url":"https://github.com/humanmade/trafficator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/humanmade/trafficator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Ftrafficator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Ftrafficator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Ftrafficator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Ftrafficator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/humanmade","download_url":"https://codeload.github.com/humanmade/trafficator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Ftrafficator/sbom","scorecard":{"id":473238,"data":{"date":"2025-08-11","repo":{"name":"github.com/humanmade/trafficator","commit":"2149529947762dfa9294c3eee9b1deb70d721572"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Maintained","score":0,"reason":"0 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":"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"Code-Review","score":1,"reason":"Found 3/21 approved changesets -- score normalized to 1","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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"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":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 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"}},{"name":"Vulnerabilities","score":0,"reason":"11 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-pq67-2wwv-3xjx","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq","Warn: Project is vulnerable to: GHSA-gpvc-mx6g-cchv","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T14:31:48.089Z","repository_id":35022757,"created_at":"2025-08-19T14:31:48.089Z","updated_at":"2025-08-19T14:31:48.089Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29562245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T21:50:49.831Z","status":"ssl_error","status_checked_at":"2026-02-17T21:46:15.313Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["puppeteer","testing-tools","traffic","traffic-generator","traffic-simulation"],"created_at":"2024-08-01T15:03:33.505Z","updated_at":"2026-02-17T23:33:08.717Z","avatar_url":"https://github.com/humanmade.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Trafficator\n\n[![npm version](https://badge.fury.io/js/trafficator.svg)](https://www.npmjs.com/package/trafficator)\n\nA simple web traffic generator built on Puppeteer for local analytics testing.\n\n## Intallation\n\n```bash\nnpm install trafficator\n```\n\nOr globally\n\n```\nnpm install --global trafficator\n```\n\n## Usage\n\nTrafficator uses Puppeteer under the hood to power interactions and activities on each page.\n\nTo get started you need to create a `.trafficator.js` file with at least one funnel configured:\n\n```js\n# .trafficator.js\n\nmodule.exports = {\n  funnels: [\n    {\n      entry: 'https://my-project.local/'\n    }\n  ]\n};\n```\n\nThis is a minimal example and will instruct Trafficator to open the page at `https://my-project.local/` before closing it and moving on to another session.\n\nOnce you have the file you can run the `trafficator` command, either directly from the command line for a global installation or from an npm script for a local installation.\n\n```bash\n# See command lines options.\ntrafficator --help\n# Change the configured sessions or concurrency values.\ntrafficator --sessions 100 --concurrency 10\n# Run with a different config file than .trafficator.js.\ntrafficator --config path/to/config.js\n```\n\n### Funnel options\n\n**`entry \u003cstring | array\u003e`**\n\nA single URL or array of URLs. If an array is provided one will be chosen at random.\n\n**`steps \u003carray\u003e`**\n\nAn array of step objects.\n\n### Funnel steps\n\nThe flexibility of trafficator comes from defining funnel steps. These are a set of instructions for puppeteer to execute in order on the website such as clicking links or other interactions.\n\n```js\nmodule.exports = {\n  funnels: [\n    {\n      entry: 'https://my-project.local/'\n      steps: [\n        {\n          action: async (page) =\u003e {\n            // Page is the `page` object from Puppeteer.\n            await page.click('.main-menu a');\n          }\n        }\n      ]\n    }\n  ]\n};\n```\n\nYou can define as many steps as you like but at a minimum they must define an `action` callback.\n\n#### Step options\n\n**`name \u003cstring\u003e`**\n\nAn optional name for the step shown in output logs.\n\n**`action \u003cfunction\u003e`**\n\nA callback that accepts the `page` puppeteer option. Check the [Puppeteer docs](https://github.com/GoogleChrome/puppeteer) for more details on what you can do.\n\n**`probability \u003cnumber | function\u003e`**\n\nA number between 1 and 0 or function that resolves to a number, determines the likelihood that the action is carried out. Use this to create a drop off effect at each stage of your funnel.\n\nIf `probability` is callback it recieves the `page` object from Puppeteer as an argument allowing you to return a dynamic value, ffor example:\n\n```js\n{\n  action: async (page) =\u003e await page.click('a'),\n  probability: async (page) =\u003e {\n    // Get data from the browser context.\n    return await page.evaluate(() =\u003e {\n      if ( localStorage.getItem('ab_test') === 2 ) {\n        // 30% chance.\n        return 0.3;\n      }\n      // 10% chance.\n      return 0.1;\n    });\n  }\n}\n```\n\n**`willNotNavigate \u003cboolean\u003e`**\n\nTrafficator makes the assumption that action callbacks will trigger a navigation event, in which case the steps are advanced automatically.\n\nIf the action does not navigate set `willNotNavigate` to `true` so that the next step is run.\n\n## Full configuration example\n\n```js\nmodule.exports = {\n  // \u003cinteger\u003e: number of sessions to run\n  sessions: 10,\n  // \u003cinteger\u003e: number of concurrent sessions\n  concurrency: 5,\n  // \u003carray\u003e: funnel definitions\n  funnels: [\n    // \u003cobject\u003e: funnel object\n    {\n      // \u003cstring|array\u003e: entry point URL.\n      entry: 'https://my-project.local/',\n      // \u003carray\u003e: step objects\n      steps: [\n        // \u003cobject\u003e: step object\n        {\n          // \u003cstring\u003e: step name\n          name: 'Scroll down',\n          // \u003cfunction\u003e: step action callback\n          action: async page =\u003e await page.evaluate(() =\u003e {\n            window.scrollTo(0, 500);\n          }),\n          // \u003cboolean\u003e: whether the action callback causes a navigation event\n          willNotNavigate: true\n        },\n        {\n          name: 'Click target link',\n          action: async page =\u003e await page.click('a.target'),\n          // \u003cnumber|function\u003e: probability of drop-off\n          probability: 0.5\n        }\n      ]\n    }\n  ],\n  // array: custom referrers added sent with the entry page request\n  referer: [\n    // string: referrer URL\n    '',\n    'https://www.google.com/',\n    'https://twitter.com/',\n  ],\n  // object: configuration for the user-agents library\n  browsers: {},\n  // object: key/value pairs of custom request headers to send\n  headers: {},\n};\n```\n\n### Browsers / User Agents\n\nUser agent support is provided by the [`user-agents`](https://www.npmjs.com/package/user-agents) library. By default this will choose a random user agent string for the visitors based on common distributions.\n\nThe `user-agents` library accepts a configuration object that can be passed by settings the `browsers` property in your `.trafficator.js` config file.\n\nFor example to select only mobile device user agents strings you could do the following:\n\n```js\nmodule.exports = {\n  funnels: [\n    {\n      entry: 'https://example.org'\n    }\n  ],\n  browsers: {\n    deviceCategory: 'mobile'\n  }\n};\n```\n\nYou can find more complete configuration information on the `user-agents` repository.\n\n### Request Headers\n\nTo send custom request headers for each visit you can provide them in your configuration under the `headers` property. This should be key/value pairs where the keys are the header names and values are the header contents. If an array of header values is provided a random one will be selected.\n\nFor example to mimic possible AWS CloudFront headers such as `CloudFront-Viewer-Country` you could set the following:\n\n```js\nmodule.exports = {\n  funnels: [\n    {\n      entry: 'https://example.org'\n    }\n  ],\n  headers: {\n    'CloudFront-Viewer-IsMobile': '1',\n    'CloudFront-Viewer-Country': [\n      'US',\n      'GB',\n      'FR'\n    ]\n  }\n};\n```\n\n## Roadmap\n\nThis is a simple initial iteration and there's much more it could do in future. This includes:\n\n- Device emulation\n- Campaigns eg. `utm_source`, `utm_campaign`\n- Geo location\n- Customisable request headers\n- Ability to define trends or random chance for all of the above\n\n------------------\n\nMade with ❤️ by [Human Made](https://humanmade.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanmade%2Ftrafficator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumanmade%2Ftrafficator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanmade%2Ftrafficator/lists"}