fix Style
parent
4db666165b
commit
6b697a8979
22
README.md
22
README.md
|
@ -3,7 +3,7 @@
|
||||||
开发者边车,命名取自service-mesh的service-sidecar,意为为开发者打辅助的边车工具(以下简称ds)
|
开发者边车,命名取自service-mesh的service-sidecar,意为为开发者打辅助的边车工具(以下简称ds)
|
||||||
通过本地代理的方式将https请求代理到一些国内的加速通道上
|
通过本地代理的方式将https请求代理到一些国内的加速通道上
|
||||||
|
|
||||||
<a href='https://github.com/docmirror/dev-sidecar'><img alt="GitHub stars" src="https://img.shields.io/github/stars/docmirror/dev-sidecar?logo=github"></a>
|
`<a href='https://github.com/docmirror/dev-sidecar'><img alt="GitHub stars" src="https://img.shields.io/github/stars/docmirror/dev-sidecar?logo=github">``</a>`
|
||||||
|
|
||||||
> Gitee上的同步项目已被封禁,此项目将不再更新与维护 【狗头保命】
|
> Gitee上的同步项目已被封禁,此项目将不再更新与维护 【狗头保命】
|
||||||
>
|
>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
## 打个广告
|
## 打个广告
|
||||||
|
|
||||||
> <https://github.com/certd/certd>
|
> [https://github.com/certd/certd](https://github.com/certd/certd)
|
||||||
> 我的开源证书管理工具项目,全自动申请和部署证书,有需求的可以去试试,帮忙点个star
|
> 我的开源证书管理工具项目,全自动申请和部署证书,有需求的可以去试试,帮忙点个star
|
||||||
|
|
||||||
## 重要提醒
|
## 重要提醒
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
> 注意:由于electron无法监听windows的关机事件,开着ds情况下直接重启电脑,会导致无法上网,你可以手动启动ds即可恢复网络,你也可以将ds设置为开机自启。
|
> 注意:由于electron无法监听windows的关机事件,开着ds情况下直接重启电脑,会导致无法上网,你可以手动启动ds即可恢复网络,你也可以将ds设置为开机自启。
|
||||||
>
|
>
|
||||||
> 关于此问题的更多讨论请前往:
|
> 关于此问题的更多讨论请前往:
|
||||||
> <https://github.com/docmirror/dev-sidecar/issues/109>
|
> [https://github.com/docmirror/dev-sidecar/issues/109](https://github.com/docmirror/dev-sidecar/issues/109)
|
||||||
|
|
||||||
> ------------------------------重要提醒2---------------------------------
|
> ------------------------------重要提醒2---------------------------------
|
||||||
>
|
>
|
||||||
|
@ -54,12 +54,12 @@
|
||||||
- 解决git push 偶尔失败需要输入账号密码的问题(fatal: TaskCanceledException encountered / fatal: HttpRequestException encountered)
|
- 解决git push 偶尔失败需要输入账号密码的问题(fatal: TaskCanceledException encountered / fatal: HttpRequestException encountered)
|
||||||
- raw/blame加速
|
- raw/blame加速
|
||||||
|
|
||||||
> 以上部分功能通过`X.I.U`的油猴脚本实现, 以下是仓库和脚本下载链接,大家可以去支持一下。
|
> 以上部分功能通过 `X.I.U` 的油猴脚本实现, 以下是仓库和脚本下载链接,大家可以去支持一下。
|
||||||
>
|
>
|
||||||
> - <https://github.com/XIU2/UserScript>
|
> - [https://github.com/XIU2/UserScript](https://github.com/XIU2/UserScript)
|
||||||
> - <https://greasyfork.org/scripts/412245>
|
> - [https://greasyfork.org/scripts/412245](https://greasyfork.org/scripts/412245)
|
||||||
>
|
>
|
||||||
> 由于此脚本在ds中是打包在本地的,更新会不及时,你可以直接通过浏览器安装油猴插件使用此脚本,从而获得最新更新(ds本地的可以通过`加速服务->基本设置->启用脚本`进行关闭)。
|
> 由于此脚本在ds中是打包在本地的,更新会不及时,你可以直接通过浏览器安装油猴插件使用此脚本,从而获得最新更新(ds本地的可以通过 `加速服务->基本设置->启用脚本` 进行关闭)。
|
||||||
|
|
||||||
### 1.4、 Stack Overflow 加速
|
### 1.4、 Stack Overflow 加速
|
||||||
|
|
||||||
|
@ -152,10 +152,12 @@
|
||||||
#### 1)git clone 加速
|
#### 1)git clone 加速
|
||||||
|
|
||||||
- 方式1:快捷复制:
|
- 方式1:快捷复制:
|
||||||
|
|
||||||
> 开启脚本支持,然后在复制clone链接下方,即可复制到加速链接
|
> 开启脚本支持,然后在复制clone链接下方,即可复制到加速链接
|
||||||
|
|
||||||
- 方式2:
|
- 方式2:
|
||||||
> 1. 使用方式:用实际的名称替换 `{}` 的内容,即可加速clone <https://hub.fastgit.org/{username}/{reponame}.git>
|
|
||||||
|
> 1. 使用方式:用实际的名称替换 `{}` 的内容,即可加速clone [https://hub.fastgit.org/{username}/{reponame}.git](https://hub.fastgit.org/%7Busername%7D/%7Breponame%7D.git)
|
||||||
> 2. clone 出来的 remote "origin" 为fastgit的地址,需要手动改回来
|
> 2. clone 出来的 remote "origin" 为fastgit的地址,需要手动改回来
|
||||||
> 3. 你也可以直接使用他们的clone加速工具 [fgit-go](https://github.com/FastGitORG/fgit-go)
|
> 3. 你也可以直接使用他们的clone加速工具 [fgit-go](https://github.com/FastGitORG/fgit-go)
|
||||||
|
|
||||||
|
@ -258,7 +260,7 @@ networksetup -setwebproxy 'WiFi' 127.0.0.1 31181
|
||||||
|
|
||||||
1. 本应用仅支持https加速
|
1. 本应用仅支持https加速
|
||||||
请务必确认你访问的地址是https开头的
|
请务必确认你访问的地址是https开头的
|
||||||
比如: <https://github.com/>
|
比如: [https://github.com/](https://github.com/)
|
||||||
2. 检查浏览器是否装了什么插件,与ds有冲突
|
2. 检查浏览器是否装了什么插件,与ds有冲突
|
||||||
3. 检查是否安装了其他代理软件,与ds有冲突
|
3. 检查是否安装了其他代理软件,与ds有冲突
|
||||||
4. 请确认浏览器的代理设置为使用IE代理/或者使用系统代理状态
|
4. 请确认浏览器的代理设置为使用IE代理/或者使用系统代理状态
|
||||||
|
@ -279,7 +281,7 @@ networksetup -setwebproxy 'WiFi' 127.0.0.1 31181
|
||||||
|
|
||||||
1. 火狐浏览器->选项->隐私与安全->证书->查看证书
|
1. 火狐浏览器->选项->隐私与安全->证书->查看证书
|
||||||
2. 证书颁发机构->导入
|
2. 证书颁发机构->导入
|
||||||
3. 选择证书文件`C:\Users(用户)\Administrator(你的账号)\.dev-sidecar\dev-sidecar.ca.crt`(Mac或linux为`~/.dev-sidecar`目录)
|
3. 选择证书文件 `C:\Users(用户)\Administrator(你的账号)\.dev-sidecar\dev-sidecar.ca.crt`(Mac或linux为 `~/.dev-sidecar` 目录)
|
||||||
4. 勾选信任由此证书颁发机构来标识网站,确定即可
|
4. 勾选信任由此证书颁发机构来标识网站,确定即可
|
||||||
|
|
||||||
### 6.4、打开github显示连接超时
|
### 6.4、打开github显示连接超时
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const fs = require('fs')
|
const fs = require('node:fs')
|
||||||
const path = require('path')
|
const path = require('node:path')
|
||||||
const jsonApi = require('@docmirror/mitmproxy/src/json')
|
const jsonApi = require('@docmirror/mitmproxy/src/json')
|
||||||
const lodash = require('lodash')
|
const lodash = require('lodash')
|
||||||
const request = require('request')
|
const request = require('request')
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const path = require('path')
|
const path = require('node:path')
|
||||||
|
|
||||||
function getUserBasePath () {
|
function getUserBasePath () {
|
||||||
const userHome = process.env.USERPROFILE || process.env.HOME || '/'
|
const userHome = process.env.USERPROFILE || process.env.HOME || '/'
|
||||||
|
|
|
@ -6,7 +6,9 @@ function register (channel, handle, order = 10) {
|
||||||
handles = listener[channel] = []
|
handles = listener[channel] = []
|
||||||
}
|
}
|
||||||
handles.push({ id: index, handle, order })
|
handles.push({ id: index, handle, order })
|
||||||
handles.sort((a, b) => { return a.order - b.order })
|
handles.sort((a, b) => {
|
||||||
|
return a.order - b.order
|
||||||
|
})
|
||||||
return index++
|
return index++
|
||||||
}
|
}
|
||||||
function fire (channel, event) {
|
function fire (channel, event) {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
|
const fork = require('node:child_process').fork
|
||||||
|
const fs = require('node:fs')
|
||||||
|
const path = require('node:path')
|
||||||
const lodash = require('lodash')
|
const lodash = require('lodash')
|
||||||
const config = require('../../config')
|
const config = require('../../config')
|
||||||
const event = require('../../event')
|
const event = require('../../event')
|
||||||
const status = require('../../status')
|
const status = require('../../status')
|
||||||
const fork = require('child_process').fork
|
|
||||||
const fs = require('fs')
|
|
||||||
const path = require('path')
|
|
||||||
const jsonApi = require('@docmirror/mitmproxy/src/json')
|
const jsonApi = require('@docmirror/mitmproxy/src/json')
|
||||||
const log = require('../../utils/util.log')
|
const log = require('../../utils/util.log')
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const path = require('path')
|
const path = require('node:path')
|
||||||
const log = require('../../../utils/util.log')
|
const log = require('../../../utils/util.log')
|
||||||
|
|
||||||
function getExtraPath () {
|
function getExtraPath () {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/**
|
/**
|
||||||
* 获取环境变量
|
* 获取环境变量
|
||||||
*/
|
*/
|
||||||
const fs = require('fs')
|
const fs = require('node:fs')
|
||||||
const path = require('path')
|
const path = require('node:path')
|
||||||
const request = require('request')
|
const request = require('request')
|
||||||
const Registry = require('winreg')
|
const Registry = require('winreg')
|
||||||
const log = require('../../../utils/util.log')
|
const log = require('../../../utils/util.log')
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const childProcess = require('child_process')
|
const childProcess = require('node:child_process')
|
||||||
const os = require('os')
|
const os = require('node:os')
|
||||||
const fixPath = require('fix-path')
|
const fixPath = require('fix-path')
|
||||||
const iconv = require('iconv-lite')
|
const iconv = require('iconv-lite')
|
||||||
const PowerShell = require('node-powershell')
|
const PowerShell = require('node-powershell')
|
||||||
|
@ -78,7 +78,7 @@ class WindowsSystemShell extends SystemShell {
|
||||||
|
|
||||||
function _childExec (composeCmds, options = {}) {
|
function _childExec (composeCmds, options = {}) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const childProcess = require('child_process')
|
const childProcess = require('node:child_process')
|
||||||
log.info('shell:', composeCmds)
|
log.info('shell:', composeCmds)
|
||||||
childProcess.exec(composeCmds, options, (error, stdout, stderr) => {
|
childProcess.exec(composeCmds, options, (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
|
@ -101,7 +101,7 @@ function childExec (composeCmds, options = {}) {
|
||||||
const encoding = 'cp936'
|
const encoding = 'cp936'
|
||||||
const binaryEncoding = 'binary'
|
const binaryEncoding = 'binary'
|
||||||
|
|
||||||
const childProcess = require('child_process')
|
const childProcess = require('node:child_process')
|
||||||
log.info('shell:', composeCmds)
|
log.info('shell:', composeCmds)
|
||||||
childProcess.exec(composeCmds, { encoding: binaryEncoding }, (error, stdout, stderr) => {
|
childProcess.exec(composeCmds, { encoding: binaryEncoding }, (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
// console.error(e)
|
// console.error(e)
|
||||||
// })
|
// })
|
||||||
|
|
||||||
const fs = require('fs')
|
const fs = require('node:fs')
|
||||||
const request = require('request')
|
const request = require('request')
|
||||||
|
|
||||||
request({
|
request({
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
const fs = require('fs')
|
const fs = require('node:fs')
|
||||||
const jsonApi = require('@docmirror/mitmproxy/src/json')
|
|
||||||
const DevSidecar = require('../index')
|
const DevSidecar = require('../index')
|
||||||
const log = require('../src/utils/util.log')
|
const jsonApi = require('@docmirror/mitmproxy/src/json')
|
||||||
|
|
||||||
// 启动服务
|
// 启动服务
|
||||||
const mitmproxyPath = './start/mitmproxy'
|
const mitmproxyPath = './start/mitmproxy'
|
||||||
|
@ -13,7 +12,7 @@ async function startup () {
|
||||||
if (fs.existsSync(configPath)) {
|
if (fs.existsSync(configPath)) {
|
||||||
const file = fs.readFileSync(configPath)
|
const file = fs.readFileSync(configPath)
|
||||||
const userConfig = jsonApi.parse(file.toString())
|
const userConfig = jsonApi.parse(file.toString())
|
||||||
log.info('读取 user_config.json5 成功:', configPath)
|
console.info('读取 user_config.json5 成功:', configPath)
|
||||||
DevSidecar.api.config.set(userConfig)
|
DevSidecar.api.config.set(userConfig)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const fs = require('fs')
|
const fs = require('node:fs')
|
||||||
const path = require('path')
|
const path = require('node:path')
|
||||||
const server = require('@docmirror/mitmproxy')
|
const server = require('@docmirror/mitmproxy')
|
||||||
const jsonApi = require('@docmirror/mitmproxy/src/json')
|
const jsonApi = require('@docmirror/mitmproxy/src/json')
|
||||||
const log = require('../src/utils/util.log')
|
const log = require('../src/utils/util.log')
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const https = require('https')
|
const https = require('node:https')
|
||||||
|
|
||||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '1'
|
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '1'
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const fs = require('fs')
|
const fs = require('node:fs')
|
||||||
const path = require('path')
|
const path = require('node:path')
|
||||||
const pkg = require('../package.json')
|
const pkg = require('../package.json')
|
||||||
|
|
||||||
function appendIntro (context, systemType, latest) {
|
function appendIntro (context, systemType, latest) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const fs = require('fs')
|
const fs = require('node:fs')
|
||||||
const path = require('path')
|
const path = require('node:path')
|
||||||
const AdmZip = require('adm-zip')
|
const AdmZip = require('adm-zip')
|
||||||
const pkg = require('../package.json')
|
const pkg = require('../package.json')
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
/* global __static */
|
/* global __static */
|
||||||
import path from 'path'
|
import path from 'node:path'
|
||||||
import DevSidecar from '@docmirror/dev-sidecar'
|
import DevSidecar from '@docmirror/dev-sidecar'
|
||||||
import { app, BrowserWindow, dialog, globalShortcut, ipcMain, Menu, nativeImage, nativeTheme, powerMonitor, protocol, Tray } from 'electron'
|
import { app, BrowserWindow, dialog, globalShortcut, ipcMain, Menu, nativeImage, nativeTheme, powerMonitor, protocol, Tray } from 'electron'
|
||||||
import minimist from 'minimist'
|
import minimist from 'minimist'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import fs from 'fs'
|
import fs from 'node:fs'
|
||||||
import path from 'path'
|
import path from 'node:path'
|
||||||
import DevSidecar from '@docmirror/dev-sidecar'
|
import DevSidecar from '@docmirror/dev-sidecar'
|
||||||
import { ipcMain } from 'electron'
|
import { ipcMain } from 'electron'
|
||||||
import lodash from 'lodash'
|
import lodash from 'lodash'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const fs = require('fs')
|
const fs = require('node:fs')
|
||||||
const path = require('path')
|
const path = require('node:path')
|
||||||
const server = require('@docmirror/mitmproxy')
|
const server = require('@docmirror/mitmproxy')
|
||||||
const jsonApi = require('@docmirror/mitmproxy/src/json')
|
const jsonApi = require('@docmirror/mitmproxy/src/json')
|
||||||
const log = require('../utils/util.log')
|
const log = require('../utils/util.log')
|
||||||
|
|
|
@ -12,7 +12,7 @@ function install (app, api) {
|
||||||
}
|
}
|
||||||
app.$confirm({
|
app.$confirm({
|
||||||
title: '关闭策略',
|
title: '关闭策略',
|
||||||
content: h => (
|
content: (h) => (
|
||||||
<div>
|
<div>
|
||||||
<div style="margin-top:10px">
|
<div style="margin-top:10px">
|
||||||
<a-radio-group vOn:change={onRadioChange} defaultValue={closeType}>
|
<a-radio-group vOn:change={onRadioChange} defaultValue={closeType}>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import fs from 'fs'
|
import fs from 'node:fs'
|
||||||
import path from 'path'
|
import path from 'node:path'
|
||||||
import DevSidecar from '@docmirror/dev-sidecar'
|
import DevSidecar from '@docmirror/dev-sidecar'
|
||||||
import AdmZip from 'adm-zip'
|
import AdmZip from 'adm-zip'
|
||||||
import { ipcMain } from 'electron'
|
import { ipcMain } from 'electron'
|
||||||
|
|
|
@ -75,7 +75,6 @@ function install (app, api) {
|
||||||
function goManualUpdate (value) {
|
function goManualUpdate (value) {
|
||||||
updateParams.newVersion = false
|
updateParams.newVersion = false
|
||||||
app.$confirm({
|
app.$confirm({
|
||||||
// title: '暂不支持自动升级',
|
|
||||||
title: '暂不提供自动升级',
|
title: '暂不提供自动升级',
|
||||||
cancelText: '取消',
|
cancelText: '取消',
|
||||||
okText: '打开链接',
|
okText: '打开链接',
|
||||||
|
@ -83,7 +82,11 @@ function install (app, api) {
|
||||||
content: (h) => {
|
content: (h) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div>请前往 <a onClick={openGithubUrl}>github项目release页面</a> 下载新版本手动安装</div>
|
<div>
|
||||||
|
请前往
|
||||||
|
<a onClick={openGithubUrl}>github项目release页面</a>
|
||||||
|
下载新版本手动安装
|
||||||
|
</div>
|
||||||
<div><a onClick={openGithubUrl}>https://github.com/docmirror/dev-sidecar/releases</a></div>
|
<div><a onClick={openGithubUrl}>https://github.com/docmirror/dev-sidecar/releases</a></div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@ -154,7 +157,10 @@ function install (app, api) {
|
||||||
const releaseNotes = value.releaseNotes.replace(/\r\n/g, '\n')
|
const releaseNotes = value.releaseNotes.replace(/\r\n/g, '\n')
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div>发布公告:<a onClick={openGithubUrl}>https://github.com/docmirror/dev-sidecar/releases</a></div>
|
<div>
|
||||||
|
发布公告:
|
||||||
|
<a onClick={openGithubUrl}>https://github.com/docmirror/dev-sidecar/releases</a>
|
||||||
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<pre style="max-height:350px;font-family:auto">
|
<pre style="max-height:350px;font-family:auto">
|
||||||
{releaseNotes}
|
{releaseNotes}
|
||||||
|
@ -167,7 +173,10 @@ function install (app, api) {
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div>发布公告:<a onClick={openGithubUrl}>https://github.com/docmirror/dev-sidecar/releases</a></div>
|
<div>
|
||||||
|
发布公告:
|
||||||
|
<a onClick={openGithubUrl}>https://github.com/docmirror/dev-sidecar/releases</a>
|
||||||
|
</div>
|
||||||
<div>更新内容:</div>
|
<div>更新内容:</div>
|
||||||
<ol>{notes}</ol>
|
<ol>{notes}</ol>
|
||||||
</div>
|
</div>
|
||||||
|
@ -200,7 +209,10 @@ function install (app, api) {
|
||||||
const releaseNotes = value.releaseNotes.replace(/\r\n/g, '\n')
|
const releaseNotes = value.releaseNotes.replace(/\r\n/g, '\n')
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div>发布公告:<a onClick={openGithubUrl}>https://github.com/docmirror/dev-sidecar/releases</a></div>
|
<div>
|
||||||
|
发布公告:
|
||||||
|
<a onClick={openGithubUrl}>https://github.com/docmirror/dev-sidecar/releases</a>
|
||||||
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<pre style="max-height:350px;font-family:auto">
|
<pre style="max-height:350px;font-family:auto">
|
||||||
{releaseNotes}
|
{releaseNotes}
|
||||||
|
@ -213,7 +225,10 @@ function install (app, api) {
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div>发布公告:<a onClick={openGithubUrl}>https://github.com/docmirror/dev-sidecar/releases</a></div>
|
<div>
|
||||||
|
发布公告:
|
||||||
|
<a onClick={openGithubUrl}>https://github.com/docmirror/dev-sidecar/releases</a>
|
||||||
|
</div>
|
||||||
<div>更新内容:</div>
|
<div>更新内容:</div>
|
||||||
<ol>{notes}</ol>
|
<ol>{notes}</ol>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import os from 'os'
|
import os from 'node:os'
|
||||||
import path from 'path'
|
import path from 'node:path'
|
||||||
|
|
||||||
function getSystemPlatform () {
|
function getSystemPlatform () {
|
||||||
switch (os.platform()) {
|
switch (os.platform()) {
|
||||||
|
|
|
@ -88,17 +88,17 @@ export default {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
body{
|
body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
.mt10{
|
.mt10 {
|
||||||
margin-top:10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
.mt5{
|
.mt5 {
|
||||||
margin-top:5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
.mt20{
|
.mt20 {
|
||||||
margin-top:20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
.ds_layout {
|
.ds_layout {
|
||||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||||
|
@ -106,31 +106,33 @@ body{
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
color: #2c3e50;
|
color: #2c3e50;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
.ant-layout-has-sider{
|
.ant-layout-has-sider {
|
||||||
border:1px solid #eee;
|
border: 1px solid #eee;
|
||||||
}
|
}
|
||||||
.ant-layout-sider-children{
|
.ant-layout-sider-children {
|
||||||
border-right:1px solid #eee;
|
border-right: 1px solid #eee;
|
||||||
}
|
}
|
||||||
.ant-layout{
|
.ant-layout {
|
||||||
height:100%
|
height: 100%;
|
||||||
}
|
}
|
||||||
.logo{
|
.logo {
|
||||||
padding:5px;
|
padding: 5px;
|
||||||
border-bottom: #eee solid 1px;
|
border-bottom: #eee solid 1px;
|
||||||
height:60px;
|
height: 60px;
|
||||||
background-image: url("/logo/logo-lang.svg");
|
background-image: url('/logo/logo-lang.svg');
|
||||||
background-size: auto 50px;
|
background-size: auto 50px;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: 5px center;
|
background-position: 5px center;
|
||||||
}
|
}
|
||||||
.ant-layout-footer{
|
.ant-layout-footer {
|
||||||
padding:10px;
|
padding: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-top:#d6d4d4 solid 1px;
|
border-top: #d6d4d4 solid 1px;
|
||||||
}
|
}
|
||||||
.ant-menu-inline, .ant-menu-vertical, .ant-menu-vertical-left{
|
.ant-menu-inline,
|
||||||
border:0;
|
.ant-menu-vertical,
|
||||||
|
.ant-menu-vertical-left {
|
||||||
|
border: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -7,21 +7,27 @@ export default {
|
||||||
<template>
|
<template>
|
||||||
<div class="ds-container">
|
<div class="ds-container">
|
||||||
<div class="body-wrapper">
|
<div class="body-wrapper">
|
||||||
<div v-if="$slots.header" class="container-header"><slot name="header" /></div>
|
<div v-if="$slots.header" class="container-header">
|
||||||
<div class="container-body"><slot /></div>
|
<slot name="header" />
|
||||||
<div class="container-footer"><slot name="footer" /></div>
|
</div>
|
||||||
|
<div class="container-body">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
<div class="container-footer">
|
||||||
|
<slot name="footer" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.ds-container{
|
.ds-container {
|
||||||
height:100%;
|
height: 100%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.body-wrapper{
|
.body-wrapper {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
|
@ -32,21 +38,21 @@ export default {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container-header{
|
.container-header {
|
||||||
padding:15px;
|
padding: 15px;
|
||||||
border-bottom: 1px solid #EEE;
|
border-bottom: 1px solid #eee;
|
||||||
background: #FFF;
|
background: #fff;
|
||||||
height:60px;
|
height: 60px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.container-body{
|
.container-body {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 0;
|
height: 0;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding:15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -386,7 +386,7 @@ export default {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding:10px;
|
padding: 10px;
|
||||||
.donate {
|
.donate {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,8 +115,12 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<div class="footer-bar">
|
<div class="footer-bar">
|
||||||
<a-button :loading="resetDefaultLoading" class="md-mr-10" icon="sync" @click="resetDefault()">恢复默认</a-button>
|
<a-button :loading="resetDefaultLoading" class="md-mr-10" icon="sync" @click="resetDefault()">
|
||||||
<a-button :loading="applyLoading" icon="check" type="primary" @click="apply()">应用</a-button>
|
恢复默认
|
||||||
|
</a-button>
|
||||||
|
<a-button :loading="applyLoading" icon="check" type="primary" @click="apply()">
|
||||||
|
应用
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</ds-container>
|
</ds-container>
|
||||||
|
|
|
@ -136,8 +136,12 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<div class="footer-bar">
|
<div class="footer-bar">
|
||||||
<a-button :loading="resetDefaultLoading" class="md-mr-10" icon="sync" @click="resetDefault()">恢复默认</a-button>
|
<a-button :loading="resetDefaultLoading" class="md-mr-10" icon="sync" @click="resetDefault()">
|
||||||
<a-button :loading="applyLoading" icon="check" type="primary" @click="apply()">应用</a-button>
|
恢复默认
|
||||||
|
</a-button>
|
||||||
|
<a-button :loading="applyLoading" icon="check" type="primary" @click="apply()">
|
||||||
|
应用
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</ds-container>
|
</ds-container>
|
||||||
|
|
|
@ -213,8 +213,12 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<div class="footer-bar">
|
<div class="footer-bar">
|
||||||
<a-button :loading="resetDefaultLoading" class="md-mr-10" icon="sync" @click="resetDefault()">恢复默认</a-button>
|
<a-button :loading="resetDefaultLoading" class="md-mr-10" icon="sync" @click="resetDefault()">
|
||||||
<a-button :loading="applyLoading" icon="check" type="primary" @click="apply()">应用</a-button>
|
恢复默认
|
||||||
|
</a-button>
|
||||||
|
<a-button :loading="applyLoading" icon="check" type="primary" @click="apply()">
|
||||||
|
应用
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</ds-container>
|
</ds-container>
|
||||||
|
|
|
@ -120,8 +120,12 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<div class="footer-bar">
|
<div class="footer-bar">
|
||||||
<a-button :loading="resetDefaultLoading" class="md-mr-10" icon="sync" @click="resetDefault()">恢复默认</a-button>
|
<a-button :loading="resetDefaultLoading" class="md-mr-10" icon="sync" @click="resetDefault()">
|
||||||
<a-button :loading="applyLoading" icon="check" type="primary" @click="apply()">应用</a-button>
|
恢复默认
|
||||||
|
</a-button>
|
||||||
|
<a-button :loading="applyLoading" icon="check" type="primary" @click="apply()">
|
||||||
|
应用
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</ds-container>
|
</ds-container>
|
||||||
|
|
|
@ -113,7 +113,9 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item v-if="isWindows()" label="设置loopback" :label-col="labelCol" :wrapper-col="wrapperCol">
|
<a-form-item v-if="isWindows()" label="设置loopback" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||||
<a-button @click="loopbackVisible = true">去设置</a-button>
|
<a-button @click="loopbackVisible = true">
|
||||||
|
去设置
|
||||||
|
</a-button>
|
||||||
<div class="form-help">
|
<div class="form-help">
|
||||||
解决<code>OneNote</code>、<code>MicrosoftStore</code>、<code>Outlook</code>等<code>UWP应用</code>开启代理后无法访问网络的问题
|
解决<code>OneNote</code>、<code>MicrosoftStore</code>、<code>Outlook</code>等<code>UWP应用</code>开启代理后无法访问网络的问题
|
||||||
</div>
|
</div>
|
||||||
|
@ -162,8 +164,12 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<div class="footer-bar">
|
<div class="footer-bar">
|
||||||
<a-button :loading="resetDefaultLoading" class="md-mr-10" icon="sync" @click="resetDefault()">恢复默认</a-button>
|
<a-button :loading="resetDefaultLoading" class="md-mr-10" icon="sync" @click="resetDefault()">
|
||||||
<a-button :loading="applyLoading" icon="check" type="primary" @click="apply()">应用</a-button>
|
恢复默认
|
||||||
|
</a-button>
|
||||||
|
<a-button :loading="applyLoading" icon="check" type="primary" @click="apply()">
|
||||||
|
应用
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -179,7 +185,9 @@ export default {
|
||||||
>
|
>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
设置Loopback
|
设置Loopback
|
||||||
<a-button style="float:right;margin-right:10px;" @click="openEnableLoopback()">打开EnableLoopback</a-button>
|
<a-button style="float:right;margin-right:10px;" @click="openEnableLoopback()">
|
||||||
|
打开EnableLoopback
|
||||||
|
</a-button>
|
||||||
</template>
|
</template>
|
||||||
<div>
|
<div>
|
||||||
<div>1、此设置用于解决OneNote、MicrosoftStore、Outlook等UWP应用无法访问网络的问题。</div>
|
<div>1、此设置用于解决OneNote、MicrosoftStore、Outlook等UWP应用无法访问网络的问题。</div>
|
||||||
|
|
|
@ -407,8 +407,12 @@ export default {
|
||||||
<a-divider />
|
<a-divider />
|
||||||
<a-row :gutter="10" class="mt10">
|
<a-row :gutter="10" class="mt10">
|
||||||
<a-col span="24">
|
<a-col span="24">
|
||||||
<a-button type="primary" icon="plus" @click="reSpeedTest()">立即重新测速</a-button>
|
<a-button type="primary" icon="plus" @click="reSpeedTest()">
|
||||||
<a-button class="md-ml-10" type="primary" icon="reload" @click="reloadAllSpeedTester()">刷新</a-button>
|
立即重新测速
|
||||||
|
</a-button>
|
||||||
|
<a-button class="md-ml-10" type="primary" icon="reload" @click="reloadAllSpeedTester()">
|
||||||
|
刷新
|
||||||
|
</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
||||||
|
@ -434,8 +438,12 @@ export default {
|
||||||
</div>
|
</div>
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<div class="footer-bar">
|
<div class="footer-bar">
|
||||||
<a-button :loading="resetDefaultLoading" class="md-mr-10" icon="sync" @click="resetDefault()">恢复默认</a-button>
|
<a-button :loading="resetDefaultLoading" class="md-mr-10" icon="sync" @click="resetDefault()">
|
||||||
<a-button :loading="applyLoading" icon="check" type="primary" @click="apply()">应用</a-button>
|
恢复默认
|
||||||
|
</a-button>
|
||||||
|
<a-button :loading="applyLoading" icon="check" type="primary" @click="apply()">
|
||||||
|
应用
|
||||||
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</ds-container>
|
</ds-container>
|
||||||
|
@ -454,7 +462,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.jsoneditor-vue {
|
.jsoneditor-vue {
|
||||||
height: 100%
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-tabs {
|
.ant-tabs {
|
||||||
|
|
|
@ -235,11 +235,19 @@ export default {
|
||||||
try {
|
try {
|
||||||
const remoteConfig = {}
|
const remoteConfig = {}
|
||||||
|
|
||||||
await this.$api.config.readRemoteConfigStr().then((ret) => { remoteConfig.old1 = ret })
|
await this.$api.config.readRemoteConfigStr().then((ret) => {
|
||||||
await this.$api.config.readRemoteConfigStr('_personal').then((ret) => { remoteConfig.old2 = ret })
|
remoteConfig.old1 = ret
|
||||||
|
})
|
||||||
|
await this.$api.config.readRemoteConfigStr('_personal').then((ret) => {
|
||||||
|
remoteConfig.old2 = ret
|
||||||
|
})
|
||||||
await this.$api.config.downloadRemoteConfig()
|
await this.$api.config.downloadRemoteConfig()
|
||||||
await this.$api.config.readRemoteConfigStr().then((ret) => { remoteConfig.new1 = ret })
|
await this.$api.config.readRemoteConfigStr().then((ret) => {
|
||||||
await this.$api.config.readRemoteConfigStr('_personal').then((ret) => { remoteConfig.new2 = ret })
|
remoteConfig.new1 = ret
|
||||||
|
})
|
||||||
|
await this.$api.config.readRemoteConfigStr('_personal').then((ret) => {
|
||||||
|
remoteConfig.new2 = ret
|
||||||
|
})
|
||||||
|
|
||||||
if (remoteConfig.old1 === remoteConfig.new1 && remoteConfig.old2 === remoteConfig.new2) {
|
if (remoteConfig.old1 === remoteConfig.new1 && remoteConfig.old2 === remoteConfig.new2) {
|
||||||
this.$message.info('远程配置没有变化,不做任何处理。')
|
this.$message.info('远程配置没有变化,不做任何处理。')
|
||||||
|
@ -276,7 +284,9 @@ export default {
|
||||||
1. 找到备份文件,路径:
|
1. 找到备份文件,路径:
|
||||||
<span>~/.dev-sidecar/config.json.时间戳.bak.json</span>
|
<span>~/.dev-sidecar/config.json.时间戳.bak.json</span>
|
||||||
<br />
|
<br />
|
||||||
2. 将该备份文件重命名为<span>config.json</span>,再重启软件即可恢复个性化配置。
|
2. 将该备份文件重命名为
|
||||||
|
<span>config.json</span>
|
||||||
|
,再重启软件即可恢复个性化配置。
|
||||||
</div>
|
</div>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -316,7 +326,9 @@ export default {
|
||||||
<a-checkbox v-model="config.app.autoStart.enabled" @change="onAutoStartChange">
|
<a-checkbox v-model="config.app.autoStart.enabled" @change="onAutoStartChange">
|
||||||
本应用开机自启
|
本应用开机自启
|
||||||
</a-checkbox>
|
</a-checkbox>
|
||||||
<a-button class="md-mr-10" icon="profile" @click="openLog()">日志</a-button>
|
<a-button class="md-mr-10" icon="profile" @click="openLog()">
|
||||||
|
日志
|
||||||
|
</a-button>
|
||||||
<div class="form-help">
|
<div class="form-help">
|
||||||
windows下建议开启开机自启。<a @click="openExternal('https://github.com/docmirror/dev-sidecar/blob/master/doc/recover.md')">更多说明参考</a>
|
windows下建议开启开机自启。<a @click="openExternal('https://github.com/docmirror/dev-sidecar/blob/master/doc/recover.md')">更多说明参考</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,62 +1,93 @@
|
||||||
.footer-bar{
|
.footer-bar {
|
||||||
padding:10px;
|
padding: 10px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
border-top:#eee 1px solid;
|
border-top: #eee 1px solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex-l-r{
|
.flex-l-r {
|
||||||
align-content: center;
|
align-content: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
&>a{
|
& > a {
|
||||||
align-content: center;
|
align-content: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.md-mr-5{margin-right: 5px;}
|
.md-mr-5 {
|
||||||
.md-mr-10{margin-right: 10px;}
|
margin-right: 5px;
|
||||||
.md-mr-15{margin-right: 15px;}
|
}
|
||||||
.md-mr-20{margin-right: 20px;}
|
.md-mr-10 {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.md-mr-15 {
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
.md-mr-20 {
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.md-mt-5{margin-top: 5px;}
|
.md-mt-5 {
|
||||||
.md-mt-10{margin-top: 10px;}
|
margin-top: 5px;
|
||||||
.md-mt-15{margin-top: 15px;}
|
}
|
||||||
.md-mt-20{margin-top: 20px;}
|
.md-mt-10 {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.md-mt-15 {
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
.md-mt-20 {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.md-ml-5 {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
.md-ml-10 {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
.md-ml-15 {
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
|
.md-ml-20 {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.md-ml-5{margin-left: 5px;}
|
.md-mb-5 {
|
||||||
.md-ml-10{margin-left: 10px;}
|
margin-bottom: 5px;
|
||||||
.md-ml-15{margin-left: 15px;}
|
}
|
||||||
.md-ml-20{margin-left: 20px;}
|
.md-mb-10 {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.md-mb-15 {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
.md-mb-20 {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.md-mb-5{margin-bottom: 5px;}
|
ol {
|
||||||
.md-mb-10{margin-bottom: 10px;}
|
|
||||||
.md-mb-15{margin-bottom: 15px;}
|
|
||||||
.md-mb-20{margin-bottom: 20px;}
|
|
||||||
|
|
||||||
ol{
|
|
||||||
margin-block-start: 0em;
|
margin-block-start: 0em;
|
||||||
margin-block-end: 0em;
|
margin-block-end: 0em;
|
||||||
padding-inline-start: 20px;
|
padding-inline-start: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-help{
|
.form-help {
|
||||||
font-size:12px;
|
font-size: 12px;
|
||||||
line-height: 15px;
|
line-height: 15px;
|
||||||
color: #a1a1a1;
|
color: #a1a1a1;
|
||||||
|
|
||||||
i{
|
i {
|
||||||
font-family: "Microsoft YaHei", serif;
|
font-family: 'Microsoft YaHei', serif;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
padding: 0 .4em;
|
padding: 0 0.4em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,13 +97,13 @@ code {
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
color: #888;
|
color: #888;
|
||||||
background-color: #f1f1f1;
|
background-color: #f1f1f1;
|
||||||
margin-left: .2em;
|
margin-left: 0.2em;
|
||||||
margin-right: .2em;
|
margin-right: 0.2em;
|
||||||
padding: .2em .4em;
|
padding: 0.2em 0.4em;
|
||||||
white-space: break-spaces;
|
white-space: break-spaces;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ace_search_form .ace_searchbtn{
|
.ace_search_form .ace_searchbtn {
|
||||||
width: auto;
|
width: auto;
|
||||||
min-width: 27px;
|
min-width: 27px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,28 @@
|
||||||
/* 暗色主题 */
|
/* 暗色主题 */
|
||||||
$dark-logo: url("../../../../public/logo/logo-lang-light.svg");
|
$dark-logo: url('../../../../public/logo/logo-lang-light.svg');
|
||||||
$dark-bg: #1e1f22; //背景
|
$dark-bg: #1e1f22; //背景
|
||||||
$dark-bg-highlight: #333; //高亮块:背景
|
$dark-bg-highlight: #333; //高亮块:背景
|
||||||
$dark-text: #ddd; //字体颜色
|
$dark-text: #ddd; //字体颜色
|
||||||
$dark-bd: #333; //边框和分隔线
|
$dark-bd: #333; //边框和分隔线
|
||||||
$dark-btn: #444; //按钮:边框和背景颜色
|
$dark-btn: #444; //按钮:边框和背景颜色
|
||||||
$dark-input: #777; //输入框:背景色
|
$dark-input: #777; //输入框:背景色
|
||||||
.theme-dark{
|
.theme-dark {
|
||||||
hr {
|
hr {
|
||||||
border-color: $dark-bd;
|
border-color: $dark-bd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 背景色和字体颜色 */
|
/* 背景色和字体颜色 */
|
||||||
.ds_layout, .ant-layout,
|
.ds_layout,
|
||||||
.ds-container, .ds-container .container-header,
|
.ant-layout,
|
||||||
.ant-layout-footer{
|
.ds-container,
|
||||||
|
.ds-container .container-header,
|
||||||
|
.ant-layout-footer {
|
||||||
background: $dark-bg;
|
background: $dark-bg;
|
||||||
color: $dark-text;
|
color: $dark-text;
|
||||||
}
|
}
|
||||||
div, span, label {
|
div,
|
||||||
|
span,
|
||||||
|
label {
|
||||||
color: $dark-text;
|
color: $dark-text;
|
||||||
}
|
}
|
||||||
.form-help {
|
.form-help {
|
||||||
|
@ -31,7 +35,7 @@ $dark-input: #777; //输入框:背景色
|
||||||
|
|
||||||
/* 高亮块:背景色和字体颜色 */
|
/* 高亮块:背景色和字体颜色 */
|
||||||
/* 警告类型 */
|
/* 警告类型 */
|
||||||
.ant-alert-warning{
|
.ant-alert-warning {
|
||||||
background: $dark-bg-highlight;
|
background: $dark-bg-highlight;
|
||||||
border-color: $dark-bg-highlight;
|
border-color: $dark-bg-highlight;
|
||||||
color: $dark-text;
|
color: $dark-text;
|
||||||
|
@ -41,7 +45,7 @@ $dark-input: #777; //输入框:背景色
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* 消息类型 */
|
/* 消息类型 */
|
||||||
.ant-alert-info{
|
.ant-alert-info {
|
||||||
background: $dark-bg-highlight;
|
background: $dark-bg-highlight;
|
||||||
border-color: $dark-bg-highlight;
|
border-color: $dark-bg-highlight;
|
||||||
color: $dark-text;
|
color: $dark-text;
|
||||||
|
@ -55,7 +59,7 @@ $dark-input: #777; //输入框:背景色
|
||||||
.footer-bar,
|
.footer-bar,
|
||||||
.ant-layout-footer,
|
.ant-layout-footer,
|
||||||
.ant-tabs .ant-tabs-left-bar,
|
.ant-tabs .ant-tabs-left-bar,
|
||||||
.ant-tabs .ant-tabs-left-content{
|
.ant-tabs .ant-tabs-left-content {
|
||||||
border-color: $dark-bd;
|
border-color: $dark-bd;
|
||||||
}
|
}
|
||||||
.ant-radio-button-wrapper:not(:first-child)::before {
|
.ant-radio-button-wrapper:not(:first-child)::before {
|
||||||
|
@ -67,138 +71,146 @@ $dark-input: #777; //输入框:背景色
|
||||||
|
|
||||||
/* 左侧 */
|
/* 左侧 */
|
||||||
/** 背景色 **/
|
/** 背景色 **/
|
||||||
.ant-layout-sider{
|
.ant-layout-sider {
|
||||||
background: $dark-bg;
|
background: $dark-bg;
|
||||||
}
|
}
|
||||||
/** Logo **/
|
/** Logo **/
|
||||||
.logo{
|
.logo {
|
||||||
background-image: $dark-logo; /* logo使用亮色的 */
|
background-image: $dark-logo; /* logo使用亮色的 */
|
||||||
}
|
}
|
||||||
/** 菜单 **/
|
/** 菜单 **/
|
||||||
.ant-menu{
|
.ant-menu {
|
||||||
background: $dark-bg;
|
background: $dark-bg;
|
||||||
color: $dark-text;
|
color: $dark-text;
|
||||||
}
|
}
|
||||||
/* 菜单选中时,或鼠标移到菜单上时的样式 */
|
/* 菜单选中时,或鼠标移到菜单上时的样式 */
|
||||||
.ant-menu-item:hover,
|
.ant-menu-item:hover,
|
||||||
.ant-menu-submenu .ant-menu-submenu-title:hover,
|
.ant-menu-submenu .ant-menu-submenu-title:hover,
|
||||||
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected{
|
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
|
||||||
background: $dark-bg-highlight;
|
background: $dark-bg-highlight;
|
||||||
color: #1890ff;
|
color: #1890ff;
|
||||||
span{ color: #1890ff; }
|
span {
|
||||||
|
color: #1890ff;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 输入框、下拉框 */
|
/* 输入框、下拉框 */
|
||||||
.ant-input,
|
.ant-input,
|
||||||
.ant-input-number-input, .ant-input-number,
|
.ant-input-number-input,
|
||||||
|
.ant-input-number,
|
||||||
.ant-select-selection,
|
.ant-select-selection,
|
||||||
.ant-input-group-addon{
|
.ant-input-group-addon {
|
||||||
background: $dark-input;
|
background: $dark-input;
|
||||||
border-color: #aaa;
|
border-color: #aaa;
|
||||||
color: $dark-text;
|
color: $dark-text;
|
||||||
&:hover, &:focus{
|
&:hover,
|
||||||
|
&:focus {
|
||||||
border-color: #fff;
|
border-color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 卡片消息:IP测速 */
|
/* 卡片消息:IP测速 */
|
||||||
.ant-card{
|
.ant-card {
|
||||||
background: $dark-input;
|
background: $dark-input;
|
||||||
border-color: $dark-input;
|
border-color: $dark-input;
|
||||||
.ant-card-head{
|
.ant-card-head {
|
||||||
border-bottom-color: #929292;
|
border-bottom-color: #929292;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 标签:未启用 */
|
/* 标签:未启用 */
|
||||||
.ant-tag-red{
|
.ant-tag-red {
|
||||||
background: #4f4749;
|
background: #4f4749;
|
||||||
border-color: #4f4749;
|
border-color: #4f4749;
|
||||||
color: #bf8285;
|
color: #bf8285;
|
||||||
}
|
}
|
||||||
/* 标签:已启用 */
|
/* 标签:已启用 */
|
||||||
.ant-tag-green{
|
.ant-tag-green {
|
||||||
background: #505f5f;
|
background: #505f5f;
|
||||||
border-color: #505f5f;
|
border-color: #505f5f;
|
||||||
color: #90cb9f;
|
color: #90cb9f;
|
||||||
}
|
}
|
||||||
/* 标签:警告 */
|
/* 标签:警告 */
|
||||||
.ant-tag-orange{
|
.ant-tag-orange {
|
||||||
background: #5a5750;
|
background: #5a5750;
|
||||||
border-color: #5a5750;
|
border-color: #5a5750;
|
||||||
color: #cfa572;
|
color: #cfa572;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 按钮 */
|
/* 按钮 */
|
||||||
.ant-btn:not(.ant-btn-danger, .ant-btn-primary){
|
.ant-btn:not(.ant-btn-danger, .ant-btn-primary) {
|
||||||
background: $dark-btn;
|
background: $dark-btn;
|
||||||
border-color: $dark-btn;
|
border-color: $dark-btn;
|
||||||
color: $dark-text;
|
color: $dark-text;
|
||||||
&:hover{
|
&:hover {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 单选框:开关式 */
|
/* 单选框:开关式 */
|
||||||
.ant-switch:not(.ant-switch-checked){
|
.ant-switch:not(.ant-switch-checked) {
|
||||||
background: $dark-btn;
|
background: $dark-btn;
|
||||||
border-color: $dark-btn;
|
border-color: $dark-btn;
|
||||||
&:hover{
|
&:hover {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* 单选框:按钮式 */
|
/* 单选框:按钮式 */
|
||||||
.ant-radio-button-wrapper{
|
.ant-radio-button-wrapper {
|
||||||
background: $dark-btn;
|
background: $dark-btn;
|
||||||
border-color: $dark-btn;
|
border-color: $dark-btn;
|
||||||
color: $dark-text;
|
color: $dark-text;
|
||||||
&:hover{
|
&:hover {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* JSON编辑器:应用于拦截设置 */
|
/* JSON编辑器:应用于拦截设置 */
|
||||||
.jsoneditor-vue{
|
.jsoneditor-vue {
|
||||||
/*整个编辑框:背景色和边框*/
|
/*整个编辑框:背景色和边框*/
|
||||||
div.jsoneditor{
|
div.jsoneditor {
|
||||||
background: $dark-bg-highlight;
|
background: $dark-bg-highlight;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
/* 头部菜单栏:边框 */
|
/* 头部菜单栏:边框 */
|
||||||
div.jsoneditor-menu{
|
div.jsoneditor-menu {
|
||||||
background: $dark-bg-highlight;
|
background: $dark-bg-highlight;
|
||||||
border-color: $dark-bg-highlight;
|
border-color: $dark-bg-highlight;
|
||||||
}
|
}
|
||||||
/* 内容区域左边:行号 */
|
/* 内容区域左边:行号 */
|
||||||
.ace_gutter{
|
.ace_gutter {
|
||||||
background: #444;
|
background: #444;
|
||||||
.ace_gutter-cell { color: #aaa; }
|
.ace_gutter-cell {
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* 内容区域右边:JSON内容 */
|
/* 内容区域右边:JSON内容 */
|
||||||
.ace_scroller{
|
.ace_scroller {
|
||||||
background: #555;
|
background: #555;
|
||||||
}
|
}
|
||||||
/* key的颜色 */
|
/* key的颜色 */
|
||||||
.ace_variable, .ace_text-layer{
|
.ace_variable,
|
||||||
|
.ace_text-layer {
|
||||||
color: #eee;
|
color: #eee;
|
||||||
}
|
}
|
||||||
/* 字符串值的颜色 */
|
/* 字符串值的颜色 */
|
||||||
.ace_string, .ace_cjk{
|
.ace_string,
|
||||||
|
.ace_cjk {
|
||||||
color: #a6eaa6;
|
color: #a6eaa6;
|
||||||
}
|
}
|
||||||
.ace_constant{
|
.ace_constant {
|
||||||
/* 数字的颜色 */
|
/* 数字的颜色 */
|
||||||
&.ace_numeric{
|
&.ace_numeric {
|
||||||
color: #ec9999;
|
color: #ec9999;
|
||||||
}
|
}
|
||||||
/* 布尔值的颜色 */
|
/* 布尔值的颜色 */
|
||||||
&.ace_language{
|
&.ace_language {
|
||||||
color: #f4c995;
|
color: #f4c995;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* 当前行高亮样式 */
|
/* 当前行高亮样式 */
|
||||||
.ace_gutter-active-line,
|
.ace_gutter-active-line,
|
||||||
.ace_marker-layer .ace_active-line{
|
.ace_marker-layer .ace_active-line {
|
||||||
background: #838774;
|
background: #838774;
|
||||||
}
|
}
|
||||||
/* 选中行高亮样式 */
|
/* 选中行高亮样式 */
|
||||||
|
@ -213,7 +225,9 @@ $dark-input: #777; //输入框:背景色
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* 搜索框 */
|
/* 搜索框 */
|
||||||
.ace_button, button, .ace_search_field {
|
.ace_button,
|
||||||
|
button,
|
||||||
|
.ace_search_field {
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
/* 搜索结果 */
|
/* 搜索结果 */
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
const path = require('path')
|
const path = require('node:path')
|
||||||
const webpack = require('webpack')
|
const webpack = require('webpack')
|
||||||
|
|
||||||
const publishUrl = process.env.VUE_APP_PUBLISH_URL
|
const publishUrl = process.env.VUE_APP_PUBLISH_URL
|
||||||
const publishProvider = process.env.VUE_APP_PUBLISH_PROVIDER
|
const publishProvider = process.env.VUE_APP_PUBLISH_PROVIDER
|
||||||
console.log('Publish url:', publishUrl)
|
console.log('Publish url:', publishUrl)
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {import('@vue/cli-service').ProjectOptions}
|
|
||||||
*/
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
pages: {
|
pages: {
|
||||||
index: {
|
index: {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
const log = require('./utils/util.log')
|
|
||||||
let JSON5 = require('json5')
|
let JSON5 = require('json5')
|
||||||
|
const log = require('./utils/util.log')
|
||||||
|
|
||||||
if (JSON5.default) {
|
if (JSON5.default) {
|
||||||
JSON5 = JSON5.default
|
JSON5 = JSON5.default
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const { promisify } = require('util')
|
const { promisify } = require('node:util')
|
||||||
const doh = require('dns-over-http')
|
const doh = require('dns-over-http')
|
||||||
const log = require('../../utils/util.log')
|
const log = require('../../utils/util.log')
|
||||||
const matchUtil = require('../../utils/util.match')
|
const matchUtil = require('../../utils/util.match')
|
||||||
|
|
|
@ -14,7 +14,7 @@ module.exports = class DNSOverIpAddress extends BaseDNS {
|
||||||
}
|
}
|
||||||
const ret = res.data
|
const ret = res.data
|
||||||
|
|
||||||
const regexp = /<tr><th>IP Address<\/th><td><ul class="comma-separated"><li>([^<]*)<\/li><\/ul><\/td><\/tr>/gm
|
const regexp = /<tr><th>IP Address<\/th><td><ul class="comma-separated"><li>([^<]*)<\/li><\/ul><\/td><\/tr>/g
|
||||||
const matched = regexp.exec(ret)
|
const matched = regexp.exec(ret)
|
||||||
let ip = null
|
let ip = null
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const url = require('url')
|
const url = require('node:url')
|
||||||
const lodash = require('lodash')
|
const lodash = require('lodash')
|
||||||
|
|
||||||
// 替换占位符
|
// 替换占位符
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const fs = require('fs')
|
const fs = require('node:fs')
|
||||||
const path = require('path')
|
const path = require('node:path')
|
||||||
const log = require('../../utils/util.log')
|
const log = require('../../utils/util.log')
|
||||||
|
|
||||||
let scripts
|
let scripts
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const path = require('path')
|
const path = require('node:path')
|
||||||
|
|
||||||
const config = exports
|
const config = exports
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const url = require('url')
|
const url = require('node:url')
|
||||||
const tunnelAgent = require('tunnel-agent')
|
const tunnelAgent = require('tunnel-agent')
|
||||||
const log = require('../../../utils/util.log')
|
const log = require('../../../utils/util.log')
|
||||||
const matchUtil = require('../../../utils/util.match')
|
const matchUtil = require('../../../utils/util.match')
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
*
|
*
|
||||||
* @author WangLiang
|
* @author WangLiang
|
||||||
*/
|
*/
|
||||||
const fs = require('fs')
|
const fs = require('node:fs')
|
||||||
const path = require('path')
|
const path = require('node:path')
|
||||||
const jsonApi = require('../../../json')
|
const jsonApi = require('../../../json')
|
||||||
const log = require('../../../utils/util.log')
|
const log = require('../../../utils/util.log')
|
||||||
const matchUtil = require('../../../utils/util.match')
|
const matchUtil = require('../../../utils/util.match')
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const zlib = require('zlib')
|
const zlib = require('node:zlib')
|
||||||
const through = require('through2')
|
const through = require('through2')
|
||||||
const log = require('../../../utils/util.log')
|
const log = require('../../../utils/util.log')
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const { Buffer } = require('buffer')
|
const { Buffer } = require('node:buffer')
|
||||||
const fs = require('fs')
|
const fs = require('node:fs')
|
||||||
const path = require('path')
|
const path = require('node:path')
|
||||||
const url = require('url')
|
const url = require('node:url')
|
||||||
const lodash = require('lodash')
|
const lodash = require('lodash')
|
||||||
const request = require('request')
|
const request = require('request')
|
||||||
const log = require('../../../utils/util.log')
|
const log = require('../../../utils/util.log')
|
||||||
|
@ -49,7 +49,7 @@ function loadPacLastModifiedTime (pacTxt) {
|
||||||
if (matched && matched.length > 0) {
|
if (matched && matched.length > 0) {
|
||||||
try {
|
try {
|
||||||
return new Date(matched[0])
|
return new Date(matched[0])
|
||||||
} catch (ignore) {
|
} catch {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ function savePacFile (pacTxt) {
|
||||||
// 尝试解析和修改 pac.txt 文件时间
|
// 尝试解析和修改 pac.txt 文件时间
|
||||||
const lastModifiedTime = loadPacLastModifiedTime(pacTxt)
|
const lastModifiedTime = loadPacLastModifiedTime(pacTxt)
|
||||||
if (lastModifiedTime) {
|
if (lastModifiedTime) {
|
||||||
fs.stat(pacFilePath, (err, stats) => {
|
fs.stat(pacFilePath, (err, _stats) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
log.error('修改 pac.txt 文件时间失败:', err)
|
log.error('修改 pac.txt 文件时间失败:', err)
|
||||||
return
|
return
|
||||||
|
@ -113,13 +113,11 @@ async function downloadPacAsync (pacConfig) {
|
||||||
|
|
||||||
// 尝试解析Base64(注:https://gitlab.com/gfwlist/gfwlist/raw/master/gfwlist.txt 下载下来的是Base64格式)
|
// 尝试解析Base64(注:https://gitlab.com/gfwlist/gfwlist/raw/master/gfwlist.txt 下载下来的是Base64格式)
|
||||||
let pacTxt = body
|
let pacTxt = body
|
||||||
try {
|
|
||||||
if (!pacTxt.includes('!---------------------EOF')) {
|
if (!pacTxt.includes('!---------------------EOF')) {
|
||||||
|
try {
|
||||||
pacTxt = Buffer.from(pacTxt, 'base64').toString('utf8')
|
pacTxt = Buffer.from(pacTxt, 'base64').toString('utf8')
|
||||||
// log.debug('解析 base64 后的 pax:', pacTxt)
|
// log.debug('解析 base64 后的 pax:', pacTxt)
|
||||||
}
|
} catch {
|
||||||
} catch (e) {
|
|
||||||
if (!pacTxt.includes('!---------------------EOF')) {
|
|
||||||
log.error(`远程 pac.txt 文件内容即不是base64格式,也不是要求的格式,url: ${remotePacFileUrl},body: ${body}`)
|
log.error(`远程 pac.txt 文件内容即不是base64格式,也不是要求的格式,url: ${remotePacFileUrl},body: ${body}`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -153,11 +151,11 @@ function createOverwallMiddleware (overWallConfig) {
|
||||||
}
|
}
|
||||||
const overWallTargetMap = matchUtil.domainMapRegexply(overWallConfig.targets)
|
const overWallTargetMap = matchUtil.domainMapRegexply(overWallConfig.targets)
|
||||||
return {
|
return {
|
||||||
sslConnectInterceptor: (req, cltSocket, head) => {
|
sslConnectInterceptor: (req, _cltSocket, _head) => {
|
||||||
const hostname = req.url.split(':')[0]
|
const hostname = req.url.split(':')[0]
|
||||||
return matched(hostname, overWallTargetMap)
|
return matched(hostname, overWallTargetMap)
|
||||||
},
|
},
|
||||||
requestIntercept (context, req, res, ssl, next) {
|
requestIntercept (context, req, res, _ssl, _next) {
|
||||||
const { rOptions, log, RequestCounter } = context
|
const { rOptions, log, RequestCounter } = context
|
||||||
if (rOptions.protocol === 'http:') {
|
if (rOptions.protocol === 'http:') {
|
||||||
return
|
return
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const fs = require('fs')
|
const fs = require('node:fs')
|
||||||
const path = require('path')
|
const path = require('node:path')
|
||||||
const log = require('../../../../utils/util.log')
|
const log = require('../../../../utils/util.log')
|
||||||
|
|
||||||
function createPacClient (pacFilePath) {
|
function createPacClient (pacFilePath) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const net = require('net')
|
const net = require('node:net')
|
||||||
const url = require('url')
|
const url = require('node:url')
|
||||||
const jsonApi = require('../../../json')
|
const jsonApi = require('../../../json')
|
||||||
const log = require('../../../utils/util.log')
|
const log = require('../../../utils/util.log')
|
||||||
const DnsUtil = require('../../dns/index')
|
const DnsUtil = require('../../dns/index')
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const fs = require('fs')
|
const fs = require('node:fs')
|
||||||
const forge = require('node-forge')
|
const forge = require('node-forge')
|
||||||
const log = require('../../../utils/util.log')
|
const log = require('../../../utils/util.log')
|
||||||
const FakeServersCenter = require('../tls/FakeServersCenter')
|
const FakeServersCenter = require('../tls/FakeServersCenter')
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const http = require('http')
|
const http = require('node:http')
|
||||||
const https = require('https')
|
const https = require('node:https')
|
||||||
const jsonApi = require('../../../json')
|
const jsonApi = require('../../../json')
|
||||||
const log = require('../../../utils/util.log')
|
const log = require('../../../utils/util.log')
|
||||||
const RequestCounter = require('../../choice/RequestCounter')
|
const RequestCounter = require('../../choice/RequestCounter')
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const http = require('http')
|
const http = require('node:http')
|
||||||
const https = require('https')
|
const https = require('node:https')
|
||||||
const log = require('../../../utils/util.log')
|
const log = require('../../../utils/util.log')
|
||||||
const util = require('../common/util')
|
const util = require('../common/util')
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const defaultDns = require('dns')
|
const defaultDns = require('node:dns')
|
||||||
const log = require('../../../utils/util.log')
|
const log = require('../../../utils/util.log')
|
||||||
const speedTest = require('../../speed')
|
const speedTest = require('../../speed')
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const http = require('http')
|
const http = require('node:http')
|
||||||
const log = require('../../../utils/util.log')
|
const log = require('../../../utils/util.log')
|
||||||
const speedTest = require('../../speed/index.js')
|
const speedTest = require('../../speed/index.js')
|
||||||
const config = require('../common/config')
|
const config = require('../common/config')
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
const http = require('http')
|
const http = require('node:http')
|
||||||
const https = require('https')
|
const https = require('node:https')
|
||||||
const forge = require('node-forge')
|
const forge = require('node-forge')
|
||||||
|
const tls = require('node:tls')
|
||||||
const CertAndKeyContainer = require('./CertAndKeyContainer')
|
const CertAndKeyContainer = require('./CertAndKeyContainer')
|
||||||
const tlsUtils = require('./tlsUtils')
|
const tlsUtils = require('./tlsUtils')
|
||||||
|
|
||||||
const pki = forge.pki
|
|
||||||
// const colors = require('colors')
|
|
||||||
const tls = require('tls')
|
|
||||||
const log = require('../../../utils/util.log')
|
const log = require('../../../utils/util.log')
|
||||||
const compatible = require('../compatible/compatible')
|
const compatible = require('../compatible/compatible')
|
||||||
|
|
||||||
|
const pki = forge.pki
|
||||||
|
|
||||||
function arraysHaveSameElements (arr1, arr2) {
|
function arraysHaveSameElements (arr1, arr2) {
|
||||||
if (arr1.length !== arr2.length) {
|
if (arr1.length !== arr2.length) {
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const fs = require('fs')
|
const fs = require('node:fs')
|
||||||
const path = require('path')
|
const path = require('node:path')
|
||||||
const _ = require('lodash')
|
const _ = require('lodash')
|
||||||
const mkdirp = require('mkdirp')
|
const mkdirp = require('mkdirp')
|
||||||
const forge = require('node-forge')
|
const forge = require('node-forge')
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// 1个小时不访问,取消获取
|
// 1个小时不访问,取消获取
|
||||||
const net = require('net')
|
const net = require('node:net')
|
||||||
const _ = require('lodash')
|
const _ = require('lodash')
|
||||||
const log = require('../../utils/util.log.js')
|
const log = require('../../utils/util.log.js')
|
||||||
const config = require('./config.js')
|
const config = require('./config.js')
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const fs = require('fs')
|
const fs = require('node:fs')
|
||||||
const path = require('path')
|
const path = require('node:path')
|
||||||
const lodash = require('lodash')
|
const lodash = require('lodash')
|
||||||
const jsonApi = require('./json')
|
const jsonApi = require('./json')
|
||||||
const dnsUtil = require('./lib/dns')
|
const dnsUtil = require('./lib/dns')
|
||||||
|
@ -210,7 +210,9 @@ module.exports = (serverConfig) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
matchIntercepts.sort((a, b) => { return a.priority - b.priority })
|
matchIntercepts.sort((a, b) => {
|
||||||
|
return a.priority - b.priority
|
||||||
|
})
|
||||||
// for (const interceptor of matchIntercepts) {
|
// for (const interceptor of matchIntercepts) {
|
||||||
// log.info('interceptor:', interceptor.name, 'priority:', interceptor.priority)
|
// log.info('interceptor:', interceptor.name, 'priority:', interceptor.priority)
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const http = require('http')
|
const http = require('node:http')
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
headers: {
|
headers: {
|
||||||
|
|
Loading…
Reference in New Issue