GithubHelp home page GithubHelp logo

firefoxbar / headereditor Goto Github PK

View Code? Open in Web Editor NEW
917.0 27.0 325.0 3.36 MB

Manage browser's requests, include modify the request headers and response headers, redirect requests, cancel requests

Home Page: https://he.firefoxcn.net/

License: GNU General Public License v2.0

JavaScript 15.86% HTML 0.33% Less 0.28% TypeScript 83.53%
webextension firefox chrome http-header

headereditor's People

Contributors

fenyuluoshang avatar github-actions[bot] avatar imba-tjd avatar inaru avatar jakutis avatar sylingd avatar yfdyh000 avatar zhtw2013 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

headereditor's Issues

Can't disable rules and execute type is always set to normal

When I disable a rule it is still enabled. When I edit a disabled rule it is enabled after saving.

When I edit a rule with a custom function, the execute type is always set back to "normal".

The bugs exists in FF extension 3.0.1 and Chrome extension 3.0.0

关于简介

我说的是
A extension which you can modify the request header (for Firefox)

A extension which can modify the request headers and response headers.
你还看不出问题的话当我没说

火狐不接受Cookie时无法新建规则

火狐55.0.3 64位Win,新建配置,在选项中取消勾选接受来自站点的Cookie(即network.cookie.cookieBehavior的值设为2)。
安装扩展1.1.0版本后工具栏按钮无反应,从附加组件管理器中该扩展选项可以进入管理界面,但是点击添加规则保存后浏览器控制台提示Error: Could not establish connection. Receiving end does not exist.
很奇怪的一个Bug,怀疑是出现在saveRule函数里,不过我还不懂IndexedDB,找不出问题所在呢

分组等的进一步改进建议

2.3.0
Related: #14

  • 导出信息不包含分组设置。导入当然也就没有了。

  • 不能批量移动规则到指定分组。

  • 目前删除分组是将组内规则改回到未分组中,其实是单纯删除组标签。但很需要 只删除组内全部规则/删除组标签及组内规则 的选项。毕竟现在全选是跨组别的。

Rules disappear in private browsing

When you use a private browsing window all the rules disappear. Also it's not possible to import rules as after you choose your backup file nothing happens.

Using Firefox latest stable.

P.S. Probably unrelated to the above but from time to time all my rules (even in normal browsing window) disappear. I have no idea how to reproduce this issue but it has happened to me 3-4 times so far so the problem looks like it is persistent and not a one-off.

Small bugs

  1. Clicking 'X' of the Group entity doesn't do anything. Also since this is deleting a whole group of rules it should have a 'Are you sure?' dialog/popup.

  2. When importing rules all the rules are placed in 'Ungrouped'. They should be exported with their relevant group names and placed in their respectively named groups when imported.

其他模式增加和redirect一样的下方快速test

例如这个:

正则表达式为http://a(\d+).qpic.cn/psb,修改Referer为http://qzone.qq.com

也会匹配到http://a123xqpic.cn/psb,不安全

另外求两个feature:
1 通配符模式,对于某些特别简单的匹配,用regex太啰嗦了
2 其他模式增加和redirect一样的下方快速test(返回truefalse

不支持新增请求头字段么?

页面已经有的请求头名称如Referer和User-Agent, HE可以更改它的内容

如果页面不存的头名称如Save-Data, 我用HE来设置, 没有生效, 是不是因为不支持新增头名称呢?

Firefox nightly 20170929100122 版启动后扩展卡住,不能加载网页

名称 Firefox
版本 58.0a1
版本 ID 20170929100122
更新通道 nightly

前几天使用一直正常,昨天更新 firefox 后启动后不能加载网页,似乎是卡在启动扩展了
尝试点击 Header Editor 2.3.2 扩展图标或者其他扩展(Tampermonkey,xStyle)无响应
尝试刷新网页,开发者工具->网络没有请求显示

禁用 Header Editor 2.3.2,重新启动,故障消失

能否提供部分导出功能

现在可以导入多个规则,但导出就不能导出部分。
希望能将规则分组,比方说反盗链组,这样选中后可以将其组内规则全部导出,不影响其他组别。
不然各家分享规则,碎片化会极其严重,会影响新人加入。

Remove request/response headers

Thanks for the WebExtension! Look forward to using it more

Currently, it looks like it is only possible to modify request/response headers but can you add an option to remove request/response headers?

Thanks for this little gem.

Hi,

I found your addon while I was browsing Github to see if somebody had made new addons for Firefox.

Strangely I was looking also for something to replace the old Stylish addon that will no longr work after Firefox 56 and I found that your addon was injecting UserStyle with the webext API so it will work after Firefox 56.

Moreover your addon seem a lot better than Stylish and Stylus, with the help of Google Translate I've translated and read http://tieba.baidu.com/p/5243145582?pn=1 to know a little more about it.

If you need translation in French I can translate it in my free time since my native language is french.

I will test it tomorrow importing my styles from Stylish with Firefox 56 and will ask if you agree to Ghack to make a review of your beautiful addon.

A small hint: Another Very good addon for Firefox/Chrome I use to edit CSS live maybe you could add colors swatch "color picker widget" to your editor if it is not already done like here: http://i.imgur.com/V8c4lOL.png

The code for the color widget is here and it is very easy to integrate with the codemirror editor: https://github.com/easylogic/codemirror-colorpicker

Best Regards :octocat:

use .toLowerCase when comparing header names

from this comment

The code doesn't use .toLowerCase to compare headers but I think existing headers are now always lowercase, meaning you need use lowercase when you want to remove (=use an empty value for it) a certain header. BUT if you want to add one you should probably use the correct casing, fe. if you always want to add a Referer Header, name it 'Referer' not 'referer' or you might make yourself pretty unique because nobody else sends a lowercase referer header!

The HeaderEditor doesn't work on the Basilisk browser

Basilisk is a new Firefox fork released a couple of weeks ago which supports XUL (legacy) extensions. In response to an article on ghacks.net I installed your extension this evening, but unfortunately it isn't possible to save any rules. The toolbar button doesn't work and using the Add-ons Manager/Options menu to open the menu allows a rule to be created, but nothing happens when clicking the Save button.

I tried using an older version but that didn't help either.

If possible, please fix the problem.

Latest version sometimes rules not taking effect

In the latest version some of my rules are not taking effect. Not sure if it's reproducible reliably.

Went back to 2.3.3 and it works as intended so I'm assuming something might have broke in the latest update.

反馈:豆瓣去跳转规则会造成页面错误

例如这个链接:
https://www.douban.com/search?q=逍遥法外

第一个结果是:
https://www.douban.com/link2/?url=https://movie.douban.com/subject/26973756/&query=逍遥法外&cat_id=1002&type=search&pos=0
去跳转之后成了:
https://movie.douban.com/subject/26973756/&query=逍遥法外&cat_id=1002&type=search&pos=0
直接在地址栏输以上地址豆瓣会报错。不去跳转就不会。锅是豆瓣的,扩展本身没有问题。

Add header option so it works with site changes

Currently it looks as though if you add an header the header you add is the only value that is set and the server/webpage set headers won't be added. That is the usual use-case scenario, but is it possible to create something like a tickbox option that allows someone to add/modify header but also allows the website you're on to add on to the header that the user specified?

Example:
I add cookie=myaddedcookie=abc
then site can also add on to my header too like
cookie=myaddedcookie=abc;siteaddedcookie=abc;

Feature Request: Case insensitive RegEx

The regular expressions in the match rules are case sensitive. Can you please add an option to make them case insensitive (or make them case insensitive by default).

看一下 规则转换 Error .js

//转域名
{
name: "userscripts转Mirror",
from: /^https?://(userscripts.org(?::8080|)|(?:www.|)webextender.net)/(.)/i,
to: "http://userscripts-mirror.org/$2",
regex: true
},{
name: "魂+转北+",
from: /^http://(.{4})?((soul|north|south).plus|imoutolove).\w+(.
)/i,
to: "https://bbs.white-plus.net$4",
regex: true
},{
name: "Firefox FTP",
from: /^(http|ftp)://ftp.(mozilla.org.)/i,
to: "http://archive.$2",
regex: true
},{
name: "火狐范重定向",
from: /^http://(www.)?firefoxfan\.(net|com|cc)(.*)/i,
to: "http://firefoxfan.org$3",
regex: true //网站好像挂了
},{
name: "琉璃神社重定向",
from: /^https?://www.hacg.(?!fi)\w{2,3}(/.
)/i,
to: "https://www.hacg.fi$1",
regex: true
},
//封面大图
{
name: "QQ音乐专辑封面大图",
from: /^(https://y.gtimg.cn/music/.)?300x300(.jpg)(.)/i,
to: "$1500x500$2",
regex: true
},{
name: "网易云专辑歌单封面大图",
from: /^(http://p..music.126.net/.jpg).param=((1|2).0.)/i,
to: "$1",
regex: true
},{
name: "虾米专辑歌单封面大图",
from: /^(http://pic.xiami.net/images/album/.jpg)(@.)/i,
to: "$1",
regex: true
},{
name: "iTunes专辑封面大图",
from: /^(https?://is.-ssl.mzstatic.com/image/thumb/Music.
/source/).0w.jpg/i,
to: "$11200x1200.jpg",
regex: true
},{
name: "ebay封面原始大图",
from: /^(https?://i.ebayimg.com/(?:\w+/|))(images/g/\w+/s-l)(?!1600)\d+.(\w+)/i,
to: "$1$21600.$3",
regex: true
},{
name: "哔哩哔哩视频封面大图",
from: /^(https?://i..hdslb.com.
)(\d{2,3}x\d{2,3}|@\d{2,3}w\d{2,3}h).(jpg|png)/i,
to: "$1",
regex: true
},{
name: "tradingfloor原始大图",
from: /^https?://www.tradingfloor.com/images/article/max608w/(.)/i,
to: "https://www.tradingfloor.com/images/article/original/$1",
regex: true
},{
name: "500px原始大图",
from: /^https?://gp1.wac.edgecastcdn.net/806614/photos/photos.500px.net/(.
)/(.)/[\d].jpg+(/.)?/i,
to: "https://gp1.wac.edgecastcdn.net/806614/photos/photos.500px.net/$1/$2/2048.jpg",
regex: true
},{
name: "百度百科原始大图",
from: /^https?://(imgsa.baidu.com/baike/)\w.+/sign=.(/\w+.jpg)/i,
to: "https://$1pic/item$2",
regex: true
},{
name: "酷安原始大图",
from: /(^http://image.coolapk.com/(feed|apk_image)/.
.jpg)./i,
to: "$1",
regex: true
},{
name: "Lofter原始大图",
from: /(^https?://imglf.?.nosdn.127.net/img/.
.\w+)?./i,
to: "$1",
regex: true
},{
name: "Tumblr原始大图",
from: /(^https?://\d+.media.tumblr.com/.tumblr_\w+_)(?!1280)\d+(.\w+)./i,
to: "$11280$2",
regex: true
},{
name: "Pinterest原始大图",
from: /(^https?://(?:s-|)media-cache-ak0.pinimg.com/)\d+x(.
.\w+)./i,
to: "$1originals$2",
regex: true
},{
name: "果壳原始大图",
from: /(^https?://\d.im.guokr.com/.
.\w+)?./i,
to: "$1",
regex: true
},{
name: "Pixiv原始大图",
from: /(^https?://i.pximg.net/)c/600x600/img-master(/img/.
)_master1200(.jpg)/?.*/i,
to: "$1img-original$2$3",
regex: true,
state: false //已禁用,网速太慢大图加载不出来,对网速自信的可以删除本行以启用规则
},

//HTTP/HTTPS
{
name: "哔哩哔哩转https",
from: /^http://(\w+.bilibili.\w{2,3}/.)/i,
to: "https://$1",
regex: true
},{
name: "优酷转https",
from: /^http://(\w+.youku.com(/?$|sprite.gif$))/i,
to: "https://$1",
regex: true,
},{
name: "微博转https",
from: /^http://((www.)?(weibo|sinaimg).(com|cn)/(?!.topnav|?|ajaxlogin|logout).+)/i,
to: "https://$1",
regex: true,
},{
name: "imgur外链转http",
from: /^https://(i.imgur.com/.
)/i,
to: "http://$1",
regex: true
},{
name: "mozest转http",
from: /https://([a-z].mozest.com/.)/i,
to: "http://$1",
regex: true
},
//手机版跳转
{
name: "天涯论坛手机版跳转",
from: /^(http://bbs.tianya.cn/)m/(.
)/i,
to: "$1$2",
regex: true
},{
name: "百度百科手机版跳转",
from: /^(http://)wap(baike.baidu.com/.)/i,
to: "$1$2",
regex: true
},{
name: "萌娘百科手机版跳转",
from: /^https?://m.(moegirl.org)(/.
)/i,
to: "https://zh.$1/zh$2",
regex: true
},{
name: "百度搜索手机版跳转",
from: /^https?://m(.baidu.com/).from=.(/|&)(.)/i,
to: "https://www$1s?$3",
regex: true
},{
name: "acfun手机版跳转",
from: /^https?://m(.acfun.tv/v/).ac=(.
)/i,
to: "http://www$1ac$2",
regex: true
},{
name: "bilibili手机版跳转",
from: /^(https?://www.bilibili.com/)mobile/(.).html/i,
to: "$1$2",
regex: true
},{
name: "dilidili手机版跳转",
from: /^http://m(.dilidili.\w+/.
)/i,
to: "http://www$1",
regex: true
},{
name: "新浪微博手机版跳转",
from: /^(https?://)(m.)?weibo.cn(/u/.)/i,
to: "$1weibo.com$3",
regex: true
},{
name: "微博文章手机版跳转",
from: /^https?://media.weibo.cn/article(?id=\d+)./i,
to: "https://weibo.com/ttarticle/p/show$1",
regex: true
},{
name: "V2EX手机版跳转",
from: /^(https?://www.v2ex.com)/amp(/t/.
)/i,
to: "$1$2",
regex: true
},{
name: "推特手机版跳转",
from: /^(https?://)mobile.(twitter.com/.)/i,
to: "$1$2",
regex: true
},{
name: "酷狗手机版跳转",
from: /^(https?://)m.(kugou.com/)plist/list/(.
)/i,
to: "$1www.$2yy/special/single/$3.html",
regex: true
},
//外链去跳转
{
name: "贴吧链接去跳转",
from: /^https?://jump2?.bdimg.com/(.)/i,
to: "http://tieba.baidu.com/$1",
regex: true
},{
name: "豆瓣链接去跳转",
from: /^https?://www.douban.com/link2?url=(http.
)/i,
to: "$1",
regex: true
},{
name: "知乎链接去跳转",
from: /^https?://(link|www).zhihu.com/(?target=|question/.)(http.)/i,
to: "$3",
regex: true
},{
name: "好搜结果去跳转",
from: /^https?://www.so.com/link?url=(.)/i,
to: "$1",
regex: true,
decode: true
},{
name: "WordPress博客去跳转",
from: /^https?://.
/go(.php|/)?url=(http.)/i,
to: "$2",
regex: true
},{
name: "Pixiv去跳转",
from: /^https?://www.pixiv.net/jump.php?(http.
)/i,
to: "$1",
regex: true
},{
name: "Deviantart去跳转",
from: /^https?://www.deviantart.com/users/outgoing?(http.)/i,
to: "$1",
regex: true
},{
name: "AMO链接去跳转",
from: /^https?://outgoing.prod.mozaws.net/.
/(http.)/i,
to: "$1",
regex: true
},
//简体中文
{
name: "GreasyFork转简中",
from: /^(https?://greasyfork.org/)(?!zh-CN).{2,5}($|/.
)/i,
to: "$1zh-CN$2",
regex: true
},{
name: "维基中文转简中",
from: /^https?:(//zh.wikipedia.org/).{5}(/.)/i,
to: 'https:$1wiki$2',
regex: true
},{
name: "火狐附加组件简中",
from: /^(https://addons.mozilla.org/(?!zh-CN)).{2,5}(/.
)/i,
to: "$1zh-CN$2",
regex: true
},
//Google服务转科大博客,https://servers.ustclug.org/index.php/2014/06/blog-googlefonts-speedup/
{
name: "ajax/fonts >> 科大博客",
from: /^https?://(ajax|fonts).googleapis.com/(.)/i,
to: "https://$1.proxy.ustclug.org/$2",
regex: true
},{
name: "fonts >> 科大博客",
from: /^https?://(fonts.gstatic).com/(.
)/i,
to: "https://$1.proxy.ustclug.org/$2",
regex: true,
state: false
},{
name: "themes >> 科大博客",
from: /^https?://(themes).(google)usercontent.com/(.)/i,
to: "https://$2-$1.proxy.ustclug.org/$3",
regex: true
},{
name: "gerrit >> 科大博客",
from: /^(https?://gerrit).(googlesource).com/(.
)/i,
to: "$1-$2.proxy.ustclug.org/$3",
regex: true
},{
name: "推特谷歌社交插件CDN",
from: /^https?://(platform.twitter.com/|apis.google.com/js/)(widgets|api|plusone).js(.)/i,
to: "https://cdn.rawgit.com/jiacai2050/gooreplacer/gh-pages/proxy/$2.js$3",
regex: true,
state: false //CDN的JS文件版本过旧
},
//谷歌系
{
name: "google链接加密",
from: /^http://(([^\.]+.)?google..+)/i,
exclude: /google.cn/i,
to: "https://$1",
regex: true
},{
name: "google搜索去多余参数",
from: /^(https?://www.google..{2,6}/search?).
(?:(?:safe|source|newwindow)=.(q=[^&]+)|(q=[^&]+).(?:ved|newwindow)=)./i,
to: function(r) {
var a = r[0].match(/&hl=[^&]+/), b = r[0].match(/&start=\d+/), c = r[0].match(/&tbm=[^&]+/), d = r[0].match(/&tbs=[^&]+/);
return r[1] + (r[2] ? r[2] : r[3]) + (a ? a : "") + (b ? b : "") + (c ? c : "") + (d ? d : "");
},
regex: true,
},{
name: "google搜索结果禁止跳转",
from: /^https?://www.google..{2,6}/url?.url=([^&]).
/i,
to: "$1",
regex: true,
decode: true
},{
name: "google图片搜索结果禁止跳转",
from: /^https?://www.google..{2,6}/imgres?.imgurl=([^&])./i,
to: "$1",
regex: true,
decode: true
},{
name: "ssl google搜索禁止跳转",
from: /^https?://encrypted.google..{2,6}/url?.url=([^&]).
/i,
to: "$1",
regex: true,
decode: true
},{
name: "gmail邮箱链接跳转",
from: /^https?://www.google..{2,6}/url.(?q|&q)=(http[^&]+)./i,
to: "$2",
regex: true,
//decode: true
},{
name: "google搜索首页跳转",
from: /^(https?://www.google..{2,6})/webhp.+/i,
to: "$1",
regex: true
},{
name: "google图片搜索首页跳转",
from: /^(https?://www.google..{2,6}/)(imghp.sbi=1|imghp(?!.sbi=1)).+/i,
to: "$1$2",
regex: true
},{
name: "谷歌香港转简中结果",
from: /^(https?://www.google.com).hk/search?(.)/i,
to: "$1/search?$2&hl=zh-CN",
regex: true
},{
name: "关闭谷歌安全搜索",
from: /^(https?://www.google.com/search?(?!.
&safe=off$).)/i,
to: "$1&safe=off",
regex: true
},{
name: "谷歌搜索危险结果",
from: /^https?://www.google..{2,6}/interstitial.url=(.
)/i,
to: "$1",
regex: true
},{
name: "谷歌镜像访问",
from: /^https?://www.google..{2,6}(/.)/i,
to: "https://a.gufen.gq$1",
regex: true,
state: false //找不到可用镜像站
},{
name: "谷歌搜索转https",
from: /^http://(www.google..{2,6}/.
)/i,
to: "https://$1",
regex: true
},{
name: "谷歌快照转https",
from: /^http://(webcache.googleusercontent.com/.)/i,
to: "https://$1",
regex: true
},{
name: "谷歌图书转com",
from: /^(https?://books.google.)cn(.
)/i,
to: "$1com$2",
regex: true
},{
name: "谷歌翻译转cn",
from: /^https?://(translate.google.)(?!cn).{2,6}(/.)/i,
to: "https://$1cn$2",
regex: true
},
//百度系
{
name: "百度搜索去多余参数",
from: /^https?://(www.baidu.com/)(s|baidu)?.
((wd=.&pn=[^&]+)|(wd=[^&]+(?!&pn.)))&(?!ie).+/i,
to: "https://$1s?$3&ie=utf-8",
regex: true
},{
name: "百度随身听(音质改320)",
from: /^http://music.baidu.com/data/music/fmlink(.[&?])rate=[^3]\d+(.)/i,
to: "http://music.baidu.com/data/music/fmlink$1rate=320$2",
regex: true
},{
name: "贴吧图片大图",
from: /^(http://imgsrc.baidu.com/forum/)w./sign=.(/\w+.jpg)/i,
to: "$1pic/item$2",
regex: true
},{
name: "贴吧域名重定向",
from: /^http://([a-z].tieba|xingqu)(.baidu.com/)(p/|f.kw=|f.ct|f.kz=)(.)/i,
to: "http://tieba$2$3$4",
regex: true
},{
name: "贴吧蓝字转百科",
from: /^https?://([\u4e00-\u9fa5]+)/?$/i,
to: "http://baike.baidu.com/item/$1",
regex: true
},{
name: "手机贴吧列表页转电脑版",
from: /^http://.
?tieba.baidu.com/mo/.?/.{4}=(?!\d+)([^&])./i,
to: "http://tieba.baidu.com/f?kw=$1",
regex: true
},{
name: "手机贴吧内容页转电脑版",
from: /^http://.
?tieba.baidu.com/mo/.?/.{4}=(\d+)&./i,
to: "http://tieba.baidu.com/p/$1",
regex: true
},{
name: "百度网盘转https",
from: /^http://(pan|yun).baidu.com/(disk|s|share)/(.)/i,
to: 'https://pan.baidu.com/$2/$3',
regex: true
},{
name: "百度盘wap/link >> share/link",
from: /^https?://(pan|yun).baidu.com/wap/(link?|shareview?&)(.
)/i,
to: 'https://pan.baidu.com/share/link?$3',
regex: true
},{
name: "百度盘wap/album/file >> pcloud/album/file",
from: /^https?://(pan|yun).baidu.com/wap/album/file(.)/i,
to: 'https://pan.baidu.com/pcloud/album/file$2',
regex: true
},{
name: "百度盘wap/share/home >> share/home",
from: /^https?://(pan|yun).baidu.com/wap/share/(home?|)(.
)/i,
to: 'https://pan.baidu.com/share/home?$3',
regex: true
},
//特殊功能
{
name: "网易云播放页重定向",
from: /^(https?://music.163.com/#/song)(/|?id=)(\d+).+/i,
exclude: /?id=\d+$/i,
to: "$1?id=$3",
regex: true
},{
name: "进入微博主页热门转全部",
from: /^(https?://.weibo.com/([\w%]+|u/[0-9]+|n/[\w%]+))($|?.refer_flag=.+?$|?from=feed.$|?topnav.$)/i,
exclude: /is_hot=1$/,
to: "$1?is_all=1#_0",
regex: true
},{
name: "sourceforge直接下载",
from: /https://sourceforge.net/projects/(\w.)/files/(.)/download/i,
to: "https://excellmedia.dl.sourceforge.net/project/$1/$2",
regex: true
},{
name: "反Google搜索人机验证",
from: /^https?://ipv4.google.com/sorry/index(?:Redirect|)?continue=https?.?((q=.)&q=.|(tbs=.))/i,
to: "https://www.google.com/search?$2$3",
regex: true,
decode: true
},{
name: "天使动漫直接打工",
from: /^(http://www.tsdm.{3})/forum.php?mod=viewthread&tid=321479/i,
to: "$1/plugin.php?id=np_cliworkdz:work",
regex: true
},{
name: "哔哩哔哩番剧播放器宽屏",
from: /(https://www.bilibili.com/blackboard/html5player.html?cid=.)/i,
exclude: /as_wide/,
to: "$1&as_wide=1",
regex: true
},{
name: "风之动漫钓鱼跳转",
from: /^http://manhua.fzdm.com(.
)/i,
to: "http://www.fzdm.com/manhua$1",
regex: true
},{
name: "Stylish查找当前网站样式链接修改",
from: /^https://userstyles.org/styles/browse?category=(.)/i,
to: "https://userstyles.org/styles/browse/$1",
regex: true
},{
name: "样式站预览图转原图",
from: /^(https://userstyles.org/style_screenshot)_thumbnail(s/.
)/i,
to: "$1$2",
regex: true
},{
name: "Discuz!X2转完整版",
from: /^(https?://./)archiver/?tid-(.).html./i,
to: "$1forum.php?mod=viewthread&tid=$2",
regex: true
},{
name: "Discuz!X3转完整版",
from: /^(https?://.
/)archiver/tid-(.).html./i,
to: "$1thread-$2-1-1.html",
regex: true
},{
name: "脚本链接二级转用户页,三级转项目页",
from: /^https?://raw.(github)usercontent(.com/\w+)(/?|/\w+/?)$/i,
to: "https://$1$2$3",
regex: true
},{
name: "图站图片短链接",
from: /^https?://(files.(yande.re/(image|sample)/\w+/).+|(konachan.com/(image|sample)/\w+)/.+)..(.)/i,
to: "https://$2$4.$6",
regex: true
},{
name: "优酷网页去后缀",
from: /^(https?://\w+.youku.com/.)?(spm|from)=./i,
to: "$1",
regex: true
},{
name: "今日头条去后缀",
from: /^(https?://www.toutiao.com/(a|i)(\d+)/)?./i,
to: "$1",
regex: true
},{
name: "汤不热改子域名",
from: /(^https?://)(41|65|67)(.media.tumblr.com/.
)/i,
to: "$168$3",
regex: true
},{
name: "知乎首页注册转登陆",
from: /(^https?://www.zhihu.com/)$/i,
to: "$1#signin",
regex: true
},

能否在请求头部加上 Upgrade-Insecure-Requests ?

功能来自:UpgradeMixedContent 扩展

相关讨论:
EFForg/https-everywhere#8506
fengyc/URLRedirector#15

文档 https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Upgrade-Insecure-Requests

简述:
main_frame 为 https 但页内有 http 资源时,浏览器会默认禁止主动性资源如 JS,目前还会放行被动型资源如 image,这一行为由浏览器完成,扩展基本不能干预。
UpgradeMixedContent 扩展提供了目前仅见的干预思路:给所有的 http 资源插入一个 upgrade-insecure-requests ,这样浏览器就会尝试用 https 来访问本会被 MCB 的资源。
缺陷:
UpgradeMixedContent 扩展是默认全局使用的,于是部分资源,主要是图片就会被破坏,如 好奇心日报
该扩展作者是个极端派,他认为没有加密的资源就不应该被载入。

现状:
Chrome 有了黑名单版的专用扩展:https://github.com/gloomy-ghost/UpgradeMixedContent
我为其维护了一个在线黑名单:https://github.com/ivysrono/UpgradeMixedContentBlacklist
目前 Firefox 上尚无可用实现。

重定向时,有关"file:///"的都不能正常运作

地址栏里用http访问一个html文件,里面将一个脚本(http)定向到另一个脚本(file),不生效
地址栏里用file访问一个html文件,里面将一个脚本(http)定向到另一个脚本(http),不生效
地址栏里用http访问一个html文件,里面将一个脚本(http)定向到另一个脚本(http),生效

然而FF57前我用mason是可以在第一个例子的情况下生效的,第二个没试过

环境: win10家庭中文版16299.64
浏览器: Firefox 57.0 64bit
附加组件版本: Mozilla Add-ons上下的2.3.5
防火墙都关了

【功能请求】是否可以修改火狐下载程序的header

photobucket网站的外链图片最初是通过refferer来控制是否获取真实图片的。
但是现在升级了,是通过检测Accept的值来决定是否返回真实图片的。

火狐设置里image.http.accept的值是*/*,所以<img>标签内的图片可以正常获取到图,但是network.http.accept.default的值是text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8,如果直接访问图片地址,请求头的值是后者,于是服务器会返回302重定向到photobucket的网页。

Header Editor 扩展修改i1296.photobucket.com域名的Accept*/*后,浏览器访问图片网址可以正常获得图片了。但是使用右键另存为,下载下来的还是重定向的网页。
Fidder测试发现 Header Editor 的修改似乎对下载程序无效,下载程序的http请求仍然是network.http.accept.default的值。

我后来只有手动修改network.http.accept.default*/*才下载成功。


我就想知道, Header Editor 扩展的规则能否影响到下载程序。

关于规则备份、更新、与维护

用微信公众号平台的图片反盗链简单测试了下。

  • 导出的 json 不具有可读性,难以维护。

虽然可以通过编辑器来格式化,但少一步是一步嘛。

  • 导入规则时不检测是否是重复规则。

一个规则反复导入,在管理页面会发现不断叠加,而不是覆盖或增量修改。

  • 在管理页面删除规则会导致排序颠倒。

  • 不能对特定规则禁用。

  • 需要增加测试链接,否则时间长了不知道规则是干什么的。

  • 建议添加在线规则订阅功能。

到57+,本扩展可能是最好的实现反盗链等功能的扩展了,非常需要在线规则来协作。

同时鉴于上述问题,在线订阅更新也便于统一用户多终端之间的管理。

https://github.com/ivysrono/URLRedirectorRules
https://github.com/ivysrono/UpgradeMixedContentBlacklist

俺已经维护了上面两个规则类项目,毫不介意再维护一个。

Thanks... and blocking ETags :)

Hi, I just want to say thank you for this extension 💋 I'm part of a group of people who for the last three years have been building a privacy, anti-tracking, anti-fingerprinting etc user.js for Firefox (obviously there is more outside the browser level that can be done, but that is the project's scope).

For a while it has really bothered me that Firefox no longer fully clears the cache edit, FF does clear the cache, the test site was a little flawed - end edit.. It used to be that you could go Ctrl-Shift-Del and clear Cache and it would eliminate any ETags - you will find lots of older forum discussions and articles where this was proposed. The other way was to disable both disk and memory cache. I have always had disk cache off, but left RAM being used. This still retained the ETag (edit, the test site was flawed: but removing etags allows caching and no etag tracking but may make you a very small subset of users that do this re fingerprinting).

Thanks to your extension and this rule, everything is as peachy as we can get it 👍 There is still a risk of Last-Modified being used as a tracking mechanism for now.

The above link contains test sites for those interested

Bugs with new layout

  1. After rule is saved, you can't edit Match type or Rule type, it is all whited out.

  2. If you edit a rule and then save it you cannot see changes you made to that rule on the page. You have to refresh the page to see the changes to the rule.

  3. If you import a certain group's rules (example, 3rd group) only the first rule of that group is imported into it while the rest of the rules are imported to another group (example, 2nd group).

  4. Pink buttons (batch operation + add rule) are a little too big. They can block the ^ icon of the group when scrolling. Maybe it's better idea to have them as tabs in the top blue bar (with Rules List + Export/Import).

  5. Adding hover tooltips to the buttons will be helpful as it can be confusing what each button does.

Rearrange groups and rules

I would like to be able to rearrange groups and rules
Also, when you group all rules, the default group "Ungrouped" stay visible and can't be deleted

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.