Skip to content

Commit

Permalink
使用重定向重写bg.js
Browse files Browse the repository at this point in the history
鉴于你校的神奇vpn对url进行了加密,那我索性就借用夹总的服务器来重定向好了,反正微博不敢在跳转到edu.cn的时候作妖
  • Loading branch information
qwertycxz authored Feb 26, 2022
1 parent fa64237 commit c8e5124
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions bg.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
chrome.browserAction.onClicked.addListener(function (tab) {
let url = tab.url.split("/");
chrome.tabs.create({ url: "https://client.vpn.nuist.edu.cn/https/webvpn7334b0d0eb18724ea659fe8fef89870c/sinaurl?u=" + tab.url });
//鉴于你校的神奇vpn对url进行了加密,那我索性就借用夹总的服务器来重定向好了,反正微博不敢在跳转到edu.cn的时候作妖
/*let url = tab.url.split("/");
let hexCharCode = [];
for (let i = 0; i < url[2].length; i++) {
hexCharCode.push((url[2].charCodeAt(i)).toString(16));
Expand All @@ -8,7 +10,7 @@ chrome.browserAction.onClicked.addListener(function (tab) {
if (url[0] == "https:") {
chrome.tabs.create({ url: "https://client.vpn.nuist.edu.cn/https/webvpn" + hexCharCode.join("") + "/" + url.slice(3).join("/") });
}
else{
else {
chrome.tabs.create({ url: "https://client.vpn.nuist.edu.cn/http/webvpn" + hexCharCode.join("") + "/" + url.slice(3).join("/") });
}
});
}*/
});

0 comments on commit c8e5124

Please sign in to comment.