This Google Chrome extension allows you to enter a custom proxy server to Chrome. With a click of a button, you can switch to your custom proxy, or back to normal.
It uses the Google Chrome Extension API to interact with the Proxy server. You setup your information in the options (host, port, and scheme), and once you click on the button, it toggles the proxy status.
Note, this is still beta development, and might break in future Chrome releases.
-
Clone this repository:
git clone https://github.com/codeshif/proxy-anywhere-extension -
Open Chrome and go to
chrome://extensions. -
Turn on "Developer mode" (the toggle in the top-right corner).
-
Click "Load unpacked" and select the directory you cloned in step 1.
Enjoy! Please submit your pull requests if you have anything interesting!
This fork contains the following changes on top of the original extension:
- Manifest V3 migration. The background page (
background.html) was replaced by a service worker (background.js);chrome.browserActionwas replaced bychrome.action; and settings storage moved fromlocalStoragetochrome.storage.local(seejs/settings.js). - CSP fix. The inline
onsubmithandler inoptions.htmlwas removed (it violated the MV3script-src 'self'Content Security Policy) and is now bound fromjs/options.js. - Enter key saves. Pressing Enter in any field on the options page now triggers the Save action instead of opening the "Bypass URL" dialog.
- Simplified Chinese (i18n). When the browser UI language is Chinese
(
zh*), all options-page text is shown in Simplified Chinese; otherwise the English defaults are kept. Seejs/i18n.js. - UTF-8 charset. Added
<meta charset="utf-8">tooptions.htmlto fix garbled Chinese text. - UI tweaks. Removed the "Visit extension page", "File bugs and suggestions" and Twitter links from the top of the options page, and added a "Modified by codeshif" credit at the bottom. The "Proxy Anywhere" title is kept in English (not translated).
这个 Google Chrome 扩展可以让你为 Chrome 配置一个自定义代理服务器。 只需点击一下按钮,即可切换到你的自定义代理,或恢复为正常网络。
它使用 Google Chrome 扩展 API 与代理服务器交互。 你在选项里填写相关信息(主机、端口和协议),然后点击按钮即可切换代理状态。
注意,这仍处于测试开发阶段,可能会在未来的 Chrome 版本中失效。
-
克隆本仓库:
git clone https://github.com/codeshif/proxy-anywhere-extension -
打开 Chrome,进入
chrome://extensions。 -
开启"开发者模式"(右上角的开关)。
-
点击"加载已解压的扩展程序",并选择第 1 步中克隆的目录。
开始使用吧!如果你有任何有趣的改进,欢迎提交 Pull Request!
这个分支在原始扩展的基础上做了以下修改:
- 迁移到 Manifest V3。 后台页面(
background.html)被替换为 Service Worker(background.js);chrome.browserAction被替换为chrome.action;设置存储从localStorage迁移到chrome.storage.local(见js/settings.js)。 - CSP 修复。 移除了
options.html中的内联onsubmit处理函数 (它违反了 MV3 的script-src 'self'内容安全策略),改为在js/options.js中绑定。 - Enter 键保存。 在选项页面的任意输入框中按 Enter 现在会触发保存操作, 而不是弹出"Bypass URL"对话框。
- 简体中文(i18n)。 当浏览器界面语言为中文(
zh*)时,选项页面的 所有文字都会显示为简体中文;否则保持英文默认值。见js/i18n.js。 - UTF-8 字符集。 在
options.html中添加了<meta charset="utf-8">, 以修复中文乱码问题。 - 界面调整。 移除了选项页面顶部的"Visit extension page"、"File bugs and suggestions"和 Twitter 链接,并在底部添加了"Modified by codeshif"署名。 "Proxy Anywhere"标题保持英文(不翻译)。


