{"id":20287718,"url":"https://github.com/yinxulai/unlock-browser-requests","last_synced_at":"2025-11-30T17:04:39.975Z","repository":{"id":229560388,"uuid":"767322084","full_name":"yinxulai/unlock-browser-requests","owner":"yinxulai","description":"Unblock browser requests and enjoy the freedom of insecurity.","archived":false,"fork":false,"pushed_at":"2024-06-02T02:28:27.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T08:28:49.677Z","etag":null,"topics":["browser","chrome","cors","http","js","proxy","set-cookie"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yinxulai.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-05T04:41:37.000Z","updated_at":"2024-06-02T02:28:31.000Z","dependencies_parsed_at":"2024-03-25T06:09:32.422Z","dependency_job_id":"55847504-a8d7-4caf-8e1c-ee281d1e18f7","html_url":"https://github.com/yinxulai/unlock-browser-requests","commit_stats":null,"previous_names":["yinxulai/unlock-browser-requests","yinxulai/http-agent"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yinxulai%2Funlock-browser-requests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yinxulai%2Funlock-browser-requests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yinxulai%2Funlock-browser-requests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yinxulai%2Funlock-browser-requests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yinxulai","download_url":"https://codeload.github.com/yinxulai/unlock-browser-requests/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241781343,"owners_count":20019219,"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":["browser","chrome","cors","http","js","proxy","set-cookie"],"created_at":"2024-11-14T14:42:07.612Z","updated_at":"2025-11-30T17:04:39.919Z","avatar_url":"https://github.com/yinxulai.png","language":"Go","readme":"# `Unlock browser requests`\n\n[![Create and publish a Docker image](https://github.com/yinxulai/unlock-browser-requests/actions/workflows/publish.yml/badge.svg)](https://github.com/yinxulai/unlock-browser-requests/actions/workflows/publish.yml)\n\n[Chinese Documentation](https://github.com/yinxulai/unlock-browser-requests/blob/main/README_CN.md) | [English Documentation](https://github.com/yinxulai/unlock-browser-requests/blob/main/README.md)\n\n## What is `Unlock browser requests`\n\n`Unlock browser requests` is a simple HTTP protocol proxy tool designed to be used in browsers. Its main purpose is to remove various security restrictions imposed by browsers. The main use cases are as follows:\n**The security restrictions of browsers are in place to ensure user data security, and in principle, they should not be bypassed. This program is only intended for special research scenarios.**\n\n- Cross-origin issues when frontend directly requests the service\n- Forcibly set restricted special `Request Header`, such as `Referrer`\n- Forcibly read restricted special `Response Header`, such as `Set-Cookie`\n\n## Usage\n\n### overwrite-request-url\n\nYou only need to make a small modification to your request to use `Http Agent` to unlock the request:\n\n- Set the target server of the request to the [open-source service address](#usage)\n- Set the original target server address to the `overwrite-request-url` field in the request header\n\nThat's all!\n\n```js\n  const response = fetch('open-source proxy service address', {\n    header: {\n      // The server will forward the request to this address and return the response upon receiving the request\n      overwrite-request-url: 'target service address'\n    }\n  })\n```\n\n### overwrite-request-header-*\n\nIf you need to set special request headers that cannot be directly set in JavaScript due to browser security restrictions, you can use `overwrite-request-header` to add the `overwrite-request-header-` prefix to the headers you want to set. The proxy service will add this header to the request before forwarding it.\n\n```js\n  const response = fetch('open-source proxy service address', {\n    header: {\n      overwrite-request-url: 'target service address',\n      // The proxy service will add this `set-cookie` to the request header before forwarding the request\n      overwrite-request-header-set-cookie: 'session=example-session-token'\n    }\n  })\n```\n\n### overwrite-response-header-*\n\nSimilar to `overwrite-request-header`, if you want to forcibly override certain headers in the response, you can use `overwrite-response-header`. For example, if you want to override `set-cookie` in the response, you can add `overwrite-response-header-set-cookie` to the request header. The proxy service will add the corresponding response header to the response based on this setting when sending the response.\n\n```js\n  const response = fetch('open-source proxy service address', {\n    header: {\n      overwrite-request-url: 'target service address',\n      // The proxy service will add `set-cookie` to the response header when sending the response\n      overwrite-response-header-set-cookie: 'session=example-session-token'\n    }\n  })\n\n  console.log(response.header)\n  // output:\n  // {\n  //   ...other,\n  //   set-cookie: \"session=example-session-token\"\n  // }\n```\n\n### expose-response-header\n\nIf you need to read certain response headers that are restricted by the browser, you can use `expose-response-header`. Its purpose is to add a prefix to the specified response header in the response, allowing you to bypass the browser's restrictions. For example, if you want to read the `set-cookie` in the response through JavaScript, you can add `expose-response-header: set-cookie` to the request header. When the request returns, you can read the original `set-cookie` field using `exposed-header-set-cookie`.\n\n```js\n  const response = await fetch('open-source proxy service address', {\n    header: {\n      overwrite-request-url: 'target service address',\n      expose-response-header: 'set-cookie',\n      expose-response-header: 'content-type',\n    }\n  })\n\n  console.log(response.header)\n  // output:\n  // {\n  //   ...other,\n  //   exposed-header-set-cookie: \"session=example-session-token\",\n  //   exposed-header-content-type: \"image/png\"\n  // }\n```\n\n## Deploy\n\nIt is recommended to deploy using `ContainerImage`. We have an automatically maintained image file:\n\n```bash\ndocker pull ghcr.io/yinxulai/unlock-browser-requests:latest\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyinxulai%2Funlock-browser-requests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyinxulai%2Funlock-browser-requests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyinxulai%2Funlock-browser-requests/lists"}