mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2026-04-12 03:37:01 +08:00
feat: Node.js 支持使用环境变量 SUB_STORE_BACKEND_DEFAULT_PROXY 设置默认代理; ProxyUtils 增加 download 方法
This commit is contained in:
@@ -9,8 +9,12 @@ import { SETTINGS_KEY } from '@/constants';
|
||||
export default class Gist {
|
||||
constructor({ token, key, syncPlatform }) {
|
||||
const { isStash, isLoon, isShadowRocket, isQX } = ENV();
|
||||
const { defaultProxy: proxy, defaultTimeout: timeout } =
|
||||
$.read(SETTINGS_KEY);
|
||||
const { defaultProxy, defaultTimeout: timeout } = $.read(SETTINGS_KEY);
|
||||
let proxy = defaultProxy;
|
||||
if ($.env.isNode) {
|
||||
proxy =
|
||||
proxy || eval('process.env.SUB_STORE_BACKEND_DEFAULT_PROXY');
|
||||
}
|
||||
|
||||
if (syncPlatform === 'gitlab') {
|
||||
this.headers = {
|
||||
|
||||
Reference in New Issue
Block a user