From 4041028721080898f073530b30a139d5d3699997 Mon Sep 17 00:00:00 2001 From: usertest Date: Sat, 11 Nov 2023 04:27:08 +0000 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E9=80=9F=EF=BC=81=EF=BC=81=EF=BC=81?= =?UTF-8?q?=EF=BC=81=EF=BC=81=EF=BC=81=EF=BC=81=EF=BC=81=EF=BC=81=EF=BC=81?= =?UTF-8?q?=EF=BC=81=EF=BC=81=EF=BC=81=EF=BC=81=EF=BC=81=EF=BC=81=EF=BC=81?= =?UTF-8?q?=EF=BC=81=EF=BC=81=EF=BC=81=EF=BC=81=EF=BC=81=EF=BC=81=EF=BC=81?= =?UTF-8?q?=E6=B8=85=E9=99=A4=E6=97=A0=E6=95=88=E6=BA=90=20=E6=9C=AC?= =?UTF-8?q?=E4=BA=BA=E5=B0=8F=E7=99=BD=EF=BC=8C=E7=B2=97=E7=95=A5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E6=9C=9B=E8=AF=B7=E6=8C=87=E6=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: usertest --- main.js | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/main.js b/main.js index cfeb614..26dd2df 100644 --- a/main.js +++ b/main.js @@ -1,33 +1,28 @@ const {Plugin, PluginSettingTab, Setting } = require("obsidian"); - -let server = 'fastgit' - +//改了一下默认镜像 +let server = 'gitmirror' +//删了几个慢的和无效的 let proMap = { - fastgit:{ - down:"https://download.fastgit.org/" - ,raw:"https://raw.fastgit.org/" - ,home:"https://hub.fastgit.org/" + gitmirror:{ + down:"https://hub.gitmirror.com/" + ,raw:"https://raw.gitmirror.com" + ,home:"https://hub.gitmirror.com/" } - ,mtr:{ + ,fastgit:{ down:"https://download.fastgit.org/" - ,raw:"https://raw-gh.gcdn.mirr.one/" - ,home:"https://api.mtr.pub/" + ,raw:"https://raw.fgit.cf" + ,home:"https://hub.fgit.cf/" } ,ghproxy:{ - down:"https://mirror.ghproxy.com/https://github.com/" - ,raw:"https://mirror.ghproxy.com/https://github.com/" - ,home:"https://mirror.ghproxy.com/https://github.com/" + down:"https://ghproxy.com/https://github.com/" + ,raw:"https://ghproxy.com/https://github.com/" + ,home:"https://ghproxy.com/https://github.com/" } ,gitclone:{ down:"https://download.fastgit.org/" ,raw:"https://raw.fastgit.org/" ,home:"https://gitclone.com/github.com/" } - ,mirr:{ - down:"https://gh.gcdn.mirr.one/" - ,raw:"https://raw-gh.gcdn.mirr.one/" - ,home:"https://gh.gcdn.mirr.one/" - } } let include = [ @@ -220,12 +215,11 @@ class ProxyGithubSettingTab extends PluginSettingTab { .setDesc(`通过选择不同的服务器来切换代理,可以解决某些情况下,某个服务器无法访问的情况。当前代理服务器:${this.plugin.settings.server}`) // .setValue(this.plugin.settings.server) // <-- Add me! .addDropdown(dropDown => { - dropDown.addOption('mirr', '请选择'); + dropDown.addOption('mirror', '请选择'); + dropDown.addOption('gitmirror', 'gitmirror'); dropDown.addOption('fastgit', 'fastgit'); - dropDown.addOption('mtr', 'mtr'); dropDown.addOption('ghproxy', 'ghproxy'); dropDown.addOption('gitclone', 'gitclone'); - dropDown.addOption('mirr', 'mirr'); dropDown.onChange(async (value) => { this.plugin.settings.server=value // this.plugin.settings.server = value; @@ -248,10 +242,10 @@ module.exports = class ProxyGithub extends Plugin { ape.regedit(); apc.regedit(); app.regedit(); - this.settings = {server:'mirr'} + this.settings = {server:'gitmirror'} } async loadSettings() { - this.settings = Object.assign({}, {server:'mirr'}, await this.loadData()); + this.settings = Object.assign({}, {server:'gitmirror'}, await this.loadData()); } async saveSettings() { await this.saveData(this.settings); -- Gitee