Skip to content

Commit

Permalink
fix: 修复tts代理不正确问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ikechan8370 committed Oct 16, 2023
1 parent 0e826e5 commit 6c171b3
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions utils/tts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@ import { Config } from './config.js'
import fetch from 'node-fetch'
import _ from 'lodash'
import { wrapTextByLanguage } from './common.js'
let proxy
if (Config.proxy) {
try {
proxy = (await import('https-proxy-agent')).default
} catch (e) {
console.warn('未安装https-proxy-agent,请在插件目录下执行pnpm add https-proxy-agent')
}
}
import { getProxy } from './proxy.js'
let proxy = getProxy()

const newFetch = (url, options = {}) => {
const defaultOptions = Config.proxy
Expand Down

0 comments on commit 6c171b3

Please sign in to comment.