랭킹으로 돌아가기

ray-lothian/UserAgent-Switcher

JavaScriptwebextension.org/listing/useragent-switcher.html

A User-Agent spoofer browser extension that is highly configurable

chromefirefoxuser-agentspoofjavascriptbrowser-extensionwebextension
스타 성장
스타
1.5k
포크
187
주간 성장
이슈
141
5001k
2017년 9월2020년 8월2023년 8월2026년 7월
아티팩트npmnpm install useragent-switcher
README

UserAgent-Switcher

A highly configurable browser extension for spoofing your User-Agent string.

UserAgent-Switcher modifies both the User-Agent in your browser's request headers and relevant JavaScript navigator properties (e.g., navigator.userAgent, navigator.appVersion, navigator.platform). It also supports modern browser identification mechanisms such as Client Hints headers and the navigator.userAgentData object, ensuring consistent and comprehensive spoofing across all detection methods.

Key Features

  • Comprehensive Spoofing: Modifies both HTTP request headers and JavaScript navigator objects.
  • Granular Control:
    • Spoof User-Agent per specific hostname.
    • Set different User-Agents for individual browser tabs.
    • Utilize Firefox's container feature for distinct User-Agents per container (not available on manifest v3 yet).
  • Randomization: Option to randomly select a User-Agent from a user-defined list.
  • Easy Import/Export: Manage your User-Agent lists with simple import and export functionality.

Demo / Review

See the extension in action:

User-Agent Switcher and Manager - Browser Extension Review

(Video: "User-Agent Switcher and Manager - Browser Extension Review")

Installation - Official Releases

You can install the latest stable version from your browser's official add-on store:

Usage

For detailed instructions on how to use the extension, including configuration options and features, please visit: UserAgent-Switcher Usage Guide

Manual Installation (from Source Files)

If you have cloned or downloaded the source files from this repository, you can manually install the extension in your browser. This is useful for development, testing the latest (potentially unstable) code, or if you prefer to install extensions directly from source.

For Chromium-based Browsers (Google Chrome, Microsoft Edge, Opera)

The process for these browsers involves loading the extension as an "unpacked extension":

  1. Get the Source: Ensure you have the extension's source files (including manifest.json at the root of the extension's directory structure) on your local machine. If you've cloned this repository, these files are typically in the main or a src/ directory. If there's a build process (e.g., npm run build), run it first to generate the distributable files, typically in a dist/ or build/ folder.
  2. Open Browser Extensions Page:
    • Chrome: Navigate to chrome://extensions
    • Edge: Navigate to edge://extensions
    • Opera: Navigate to opera://extensions
  3. Enable Developer Mode:
    • Look for a toggle switch labeled "Developer mode" (usually in the top-right or bottom-left corner of the extensions page) and turn it on.
  4. Load Unpacked Extension:
    • Once Developer Mode is enabled, a button like "Load unpacked" will appear. Click it.
    • A file dialog will open. Navigate to and select the directory containing the extension's source files (the folder that has the manifest.json directly inside it). Click "Select Folder" or "Open."

The UserAgent-Switcher extension should now be loaded and active. If you make changes to the source code, you'll typically need to return to the extensions page and click a "Reload" icon or button for the extension to apply the changes.

For Mozilla Firefox

Method 1: Load Temporary Add-on (for Development/Testing)

This method allows you to load the extension directly from the source files. It will remain installed until you restart Firefox or manually remove it.

  1. Get the Source: Ensure you have the extension's source files (including manifest.json at the root of the extension's directory structure) on your local machine.
  2. Open Firefox.
  3. Navigate to Debugging Tools: Type about:debugging into the Firefox address bar and press Enter.
  4. Select "This Firefox": In the left-hand sidebar, click on "This Firefox".
  5. Load Add-on: Click the "Load Temporary Add-on..." button.
  6. Select Manifest File: Navigate to the directory where you have the extension's source code and select the manifest.json file (or any file within the extension's root directory). Click "Open."

The UserAgent-Switcher extension should now be loaded. If you make changes to the source code, you can click the "Reload" button next to the extension's entry on the about:debugging page.

Method 2: Package as an .xpi File and Install (More Persistent Local Install)

  1. Prepare Files:
    • Ensure all necessary source files are present, with manifest.json at the root.
    • If this repository uses a build process, run it first.
  2. Create a ZIP Archive:
    • Navigate to the directory containing the finalized extension files.
    • Select all files and subfolders inside this directory. The manifest.json file must be at the root level within the ZIP archive.
    • Compress the selected items into a ZIP archive (e.g., user_agent_switcher.zip).
  3. Rename to .xpi: Change the file extension from .zip to .xpi (e.g., user_agent_switcher.xpi).
  4. Install in Firefox:
    • Open Firefox and go to the Add-ons Manager (about:addons or Ctrl+Shift+A / Cmd+Shift+A).
    • Click the gear icon (⚙️) on the Extensions panel.
    • Select "Install Add-on From File..."
    • Locate and select your .xpi file and click "Open." Confirm the installation.

Important Considerations for Manual Installation (from Source):

  • Extension ID Consistency: For stable development and testing (especially if your extension uses storage or needs a consistent ID for APIs):
    • Chromium-based browsers: You can add a "key" field to your manifest.json. This is a Base64 encoded public key. If the key field is present when loading an unpacked extension, Chrome/Edge/Opera will derive a consistent ID. Without it, the ID may change if the path to the extension folder changes.
    • Firefox: Ensure the manifest.json includes a unique add-on ID via the browser_specific_settings.gecko.id field (e.g., "id": "user-agent-switcher@your-domain.com").
  • Persistence: Loading an unpacked extension (Chromium) or as a temporary add-on (Firefox) typically means the extension is active for the current session or until manually reloaded/removed. The Firefox .xpi method provides a more permanent installation for that browser.
  • Packaging for Distribution: If you intend to distribute the extension more widely outside of simply loading the source files:
    • Chromium-based browsers: Extensions are packaged into .crx files, often handled through the respective web stores (Chrome Web Store, Microsoft Edge Add-ons, Opera addons).
    • Firefox: Extensions are packaged as signed .xpi files, typically distributed via addons.mozilla.org (AMO).
    • Signing is a crucial step for official distribution to ensure security and integrity. Standard browser versions often restrict or warn against installing unsigned extensions from outside their official stores.

Contributing

Contributions are welcome! If you have ideas for improvements, new features, or have found a bug, please feel free to:

  1. Open an issue in the repository to discuss the change or report the bug.
  2. Fork the repository and submit a pull request with your changes.

Please ensure any contributions align with the project's coding style and goals.

License

This project is licensed under the Mozilla Public License 2.0 (MPL-2.0).

You can find a copy of the license in the LICENSE file in this repository or at https://www.mozilla.org/en-US/MPL/2.0/.

관련 저장소
electron/electron

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS

C++MIT Licenseelectronjavascript
electronjs.org
122.1k17.3k
puppeteer/puppeteer

JavaScript API for Chrome and Firefox

TypeScriptnpmApache License 2.0headless-chrometesting
pptr.dev
95.3k9.5k
microsoft/playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

TypeScriptnpmApache License 2.0playwrighttesting
playwright.dev
93.2k6.1k
FiloSottile/mkcert

A simple zero-config tool to make locally trusted development certificates with any names you'd like.

GoGo ModulesBSD 3-Clause "New" or "Revised" Licensehttpstls
mkcert.dev
59.4k3.1k
ChromeDevTools/chrome-devtools-mcp

Chrome DevTools for coding agents

TypeScriptnpmApache License 2.0mcp-serverpuppeteer
npmjs.org/package/chrome-devtools-mcp
47.4k3.2k
jaywcjlove/linux-command

Linux命令大全搜索工具,内容包含Linux命令手册、详解、学习、搜集。https://git.io/linux

MarkdownMIT Licenselinuxlinux-command
jaywcjlove.github.io/linux-command
36.5k6.6k
feder-cr/Jobs_Applier_AI_Agent_AIHawk

AIHawk aims to easy job hunt process by automating the job application process. Utilizing artificial intelligence, it enables users to apply for multiple jobs in a tailored way.

PythonPyPIGNU Affero General Public License v3.0automationbot
30k4.6k
feder-cr/Jobs_Applier_AI_Agent

Auto_Jobs_Applier_AI_Agent aims to easy job hunt process by automating the job application process. Utilizing artificial intelligence, it enables users to apply for multiple jobs in an automated and personalized way.

PythonPyPIautomationbot
24.5k3.6k
ovity/octotree

GitHub on steroids

JavaScriptnpmGNU Affero General Public License v3.0githubchrome
octotree.io
23.2k1.8k
gildas-lormeau/SingleFile

Web Extension for saving a faithful copy of a complete web page in a single HTML file

JavaScriptnpmGNU Affero General Public License v3.0browserarchive
getsinglefile.com
21.9k1.4k
xifangczy/cat-catch

猫抓 浏览器资源嗅探扩展 / cat-catch Browser Resource Sniffing Extension

JavaScriptnpmGNU General Public License v3.0chromechrome-extension
cat-catch.94cat.com
20.8k1.8k
segment-boneyard/nightmare

A high-level browser automation library.

JavaScriptnpmelectronheadless-chrome
open.segment.com
19.8k1.1k