Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7012040fec | |||
| dd6e01b91d | |||
| f19a637a4b | |||
| fff378d99c | |||
| 0fde4467e8 | |||
| f2e8ce241b | |||
| 6644fed425 | |||
| cd7ab8999f | |||
| ecbe7f40c3 | |||
| ff808dc462 | |||
| 4d7922f112 | |||
| bd1547cd0b |
+75
-19
@@ -8,7 +8,8 @@ import { isEmpty, isEqual } from 'lodash'
|
||||
import {
|
||||
APP_RUN_MODE,
|
||||
AUTO_SYNC_TRACKER_INTERVAL,
|
||||
AUTO_CHECK_UPDATE_INTERVAL
|
||||
AUTO_CHECK_UPDATE_INTERVAL,
|
||||
PROXY_SCOPES
|
||||
} from '@shared/constants'
|
||||
import { checkIsNeedRun } from '@shared/utils'
|
||||
import {
|
||||
@@ -61,22 +62,22 @@ export default class Application extends EventEmitter {
|
||||
|
||||
this.initEngineClient()
|
||||
|
||||
this.initTouchBarManager()
|
||||
|
||||
this.initThemeManager()
|
||||
|
||||
this.initTrayManager()
|
||||
|
||||
this.initTouchBarManager()
|
||||
|
||||
this.initDockManager()
|
||||
|
||||
this.initAutoLaunchManager()
|
||||
|
||||
this.initEnergyManager()
|
||||
|
||||
this.initUpdaterManager()
|
||||
|
||||
this.initProtocolManager()
|
||||
|
||||
this.initUpdaterManager()
|
||||
|
||||
this.handleCommands()
|
||||
|
||||
this.handleEvents()
|
||||
@@ -288,6 +289,49 @@ export default class Application extends EventEmitter {
|
||||
})
|
||||
}
|
||||
|
||||
watchProxyChange () {
|
||||
const { userConfig } = this.configManager
|
||||
const key = 'proxy'
|
||||
this.configListeners[key] = userConfig.onDidChange(key, async (newValue, oldValue) => {
|
||||
logger.info(`[Motrix] detected ${key} value change event:`, newValue, oldValue)
|
||||
this.updateManager.setupProxy(newValue)
|
||||
|
||||
const { enable, server, bypass, scope = [] } = newValue
|
||||
const system = enable && server && scope.includes(PROXY_SCOPES.DOWNLOAD)
|
||||
? {
|
||||
'all-proxy': server,
|
||||
'no-proxy': bypass
|
||||
}
|
||||
: {}
|
||||
this.configManager.setSystemConfig(system)
|
||||
this.engineClient.call('changeGlobalOption', system)
|
||||
})
|
||||
}
|
||||
|
||||
watchLocaleChange () {
|
||||
const { userConfig } = this.configManager
|
||||
const key = 'locale'
|
||||
this.configListeners[key] = userConfig.onDidChange(key, async (newValue, oldValue) => {
|
||||
logger.info(`[Motrix] detected ${key} value change event:`, newValue, oldValue)
|
||||
this.localeManager.changeLanguageByLocale(newValue)
|
||||
.then(() => {
|
||||
this.menuManager.handleLocaleChange(newValue)
|
||||
this.trayManager.handleLocaleChange(newValue)
|
||||
})
|
||||
this.sendCommandToAll('application:update-locale', { locale: newValue })
|
||||
})
|
||||
}
|
||||
|
||||
watchThemeChange () {
|
||||
const { userConfig } = this.configManager
|
||||
const key = 'theme'
|
||||
this.configListeners[key] = userConfig.onDidChange(key, async (newValue, oldValue) => {
|
||||
logger.info(`[Motrix] detected ${key} value change event:`, newValue, oldValue)
|
||||
this.themeManager.updateSystemTheme(newValue)
|
||||
this.sendCommandToAll('application:update-theme', { theme: newValue })
|
||||
})
|
||||
}
|
||||
|
||||
watchShowProgressBarChange () {
|
||||
const { userConfig } = this.configManager
|
||||
const key = 'show-progress-bar'
|
||||
@@ -395,22 +439,13 @@ export default class Application extends EventEmitter {
|
||||
this.upnp.closeClient()
|
||||
}
|
||||
|
||||
autoSyncTracker () {
|
||||
const enable = this.configManager.getUserConfig('auto-sync-tracker')
|
||||
const lastTime = this.configManager.getUserConfig('last-sync-tracker-time')
|
||||
const result = checkIsNeedRun(enable, lastTime, AUTO_SYNC_TRACKER_INTERVAL)
|
||||
logger.info('[Motrix] auto sync tracker checkIsNeedRun:', result)
|
||||
if (!result) {
|
||||
return
|
||||
}
|
||||
|
||||
const source = this.configManager.getUserConfig('tracker-source')
|
||||
syncTrackers (source, proxy) {
|
||||
if (isEmpty(source)) {
|
||||
return
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
fetchBtTrackerFromSource(source).then((data) => {
|
||||
fetchBtTrackerFromSource(source, proxy).then((data) => {
|
||||
logger.warn('[Motrix] auto sync tracker data:', data)
|
||||
if (!data || data.length === 0) {
|
||||
return
|
||||
@@ -432,6 +467,21 @@ export default class Application extends EventEmitter {
|
||||
}, 500)
|
||||
}
|
||||
|
||||
autoSyncTrackers () {
|
||||
const enable = this.configManager.getUserConfig('auto-sync-tracker')
|
||||
const lastTime = this.configManager.getUserConfig('last-sync-tracker-time')
|
||||
const result = checkIsNeedRun(enable, lastTime, AUTO_SYNC_TRACKER_INTERVAL)
|
||||
logger.info('[Motrix] auto sync tracker checkIsNeedRun:', result)
|
||||
if (!result) {
|
||||
return
|
||||
}
|
||||
|
||||
const source = this.configManager.getUserConfig('tracker-source')
|
||||
const proxy = this.configManager.getUserConfig('proxy', { enable: false })
|
||||
|
||||
this.syncTrackers(source, proxy)
|
||||
}
|
||||
|
||||
autoResumeTask () {
|
||||
const enabled = this.configManager.getUserConfig('resume-all-when-app-launched')
|
||||
if (!enabled) {
|
||||
@@ -633,9 +683,12 @@ export default class Application extends EventEmitter {
|
||||
}
|
||||
|
||||
const enabled = this.configManager.getUserConfig('auto-check-update')
|
||||
const proxy = this.configManager.getSystemConfig('all-proxy')
|
||||
const lastTime = this.configManager.getUserConfig('last-check-update-time')
|
||||
const autoCheck = checkIsNeedRun(enabled, lastTime, AUTO_CHECK_UPDATE_INTERVAL)
|
||||
this.updateManager = new UpdateManager({
|
||||
autoCheck: checkIsNeedRun(enabled, lastTime, AUTO_CHECK_UPDATE_INTERVAL)
|
||||
autoCheck,
|
||||
proxy
|
||||
})
|
||||
this.handleUpdaterEvents()
|
||||
}
|
||||
@@ -743,7 +796,7 @@ export default class Application extends EventEmitter {
|
||||
|
||||
this.on('application:reset-session', () => this.resetSession())
|
||||
|
||||
this.on('application:reset', () => {
|
||||
this.on('application:factory-reset', () => {
|
||||
this.offConfigListeners()
|
||||
this.configManager.reset()
|
||||
this.relaunch()
|
||||
@@ -870,7 +923,7 @@ export default class Application extends EventEmitter {
|
||||
|
||||
handleEvents () {
|
||||
this.once('application:initialized', () => {
|
||||
this.autoSyncTracker()
|
||||
this.autoSyncTrackers()
|
||||
|
||||
this.autoResumeTask()
|
||||
|
||||
@@ -884,6 +937,9 @@ export default class Application extends EventEmitter {
|
||||
this.watchProtocolsChange()
|
||||
this.watchRunModeChange()
|
||||
this.watchShowProgressBarChange()
|
||||
this.watchProxyChange()
|
||||
this.watchLocaleChange()
|
||||
this.watchThemeChange()
|
||||
|
||||
this.on('download-status-change', (downloading) => {
|
||||
this.trayManager.handleDownloadStatusChange(downloading)
|
||||
|
||||
@@ -16,7 +16,9 @@ import {
|
||||
IP_VERSION,
|
||||
LOGIN_SETTING_OPTIONS,
|
||||
NGOSANG_TRACKERS_BEST_IP_URL_CDN,
|
||||
NGOSANG_TRACKERS_BEST_URL_CDN
|
||||
NGOSANG_TRACKERS_BEST_URL_CDN,
|
||||
PROXY_SCOPES,
|
||||
PROXY_SCOPE_OPTIONS
|
||||
} from '@shared/constants'
|
||||
import { CHROME_UA } from '@shared/ua'
|
||||
import { separateConfig } from '@shared/utils'
|
||||
@@ -31,8 +33,8 @@ export default class ConfigManager {
|
||||
}
|
||||
|
||||
init () {
|
||||
this.initSystemConfig()
|
||||
this.initUserConfig()
|
||||
this.initSystemConfig()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -74,8 +76,8 @@ export default class ConfigManager {
|
||||
'pause': true,
|
||||
'rpc-listen-port': ENGINE_RPC_PORT,
|
||||
'rpc-secret': EMPTY_STRING,
|
||||
'seed-ratio': 1,
|
||||
'seed-time': 60,
|
||||
'seed-ratio': 2,
|
||||
'seed-time': 2880,
|
||||
'split': getMaxConnectionPerServer(),
|
||||
'user-agent': CHROME_UA
|
||||
}
|
||||
@@ -98,7 +100,6 @@ export default class ConfigManager {
|
||||
// },
|
||||
/* eslint-disable quote-props */
|
||||
defaults: {
|
||||
'all-proxy-backup': EMPTY_STRING,
|
||||
'auto-check-update': is.macOS(),
|
||||
'auto-hide-window': false,
|
||||
'auto-sync-tracker': true,
|
||||
@@ -117,6 +118,12 @@ export default class ConfigManager {
|
||||
'no-confirm-before-delete-task': false,
|
||||
'open-at-login': false,
|
||||
'protocols': { 'magnet': true, 'thunder': false },
|
||||
'proxy': {
|
||||
'enable': false,
|
||||
'server': EMPTY_STRING,
|
||||
'bypass': EMPTY_STRING,
|
||||
'scope': PROXY_SCOPE_OPTIONS
|
||||
},
|
||||
'resume-all-when-app-launched': false,
|
||||
'run-mode': APP_RUN_MODE.STANDARD,
|
||||
'show-progress-bar': true,
|
||||
@@ -129,7 +136,6 @@ export default class ConfigManager {
|
||||
'tray-theme': APP_THEME.AUTO,
|
||||
'tray-speedometer': is.macOS(),
|
||||
'update-channel': 'latest',
|
||||
'use-proxy': false,
|
||||
'window-state': {}
|
||||
}
|
||||
/* eslint-enable quote-props */
|
||||
@@ -140,13 +146,18 @@ export default class ConfigManager {
|
||||
fixSystemConfig () {
|
||||
// Remove aria2c unrecognized options
|
||||
const { others } = separateConfig(this.systemConfig.store)
|
||||
if (!others) {
|
||||
return
|
||||
if (others && Object.keys(others).length > 0) {
|
||||
Object.keys(others).forEach(key => {
|
||||
this.systemConfig.delete(key)
|
||||
})
|
||||
}
|
||||
|
||||
Object.keys(others).forEach(key => {
|
||||
this.systemConfig.delete(key)
|
||||
})
|
||||
const proxy = this.getUserConfig('proxy', { enable: false })
|
||||
const { enable, server, bypass, scope = [] } = proxy
|
||||
if (enable && server && scope.includes(PROXY_SCOPES.DOWNLOAD)) {
|
||||
this.setSystemConfig('all-proxy', server)
|
||||
this.setSystemConfig('no-proxy', bypass)
|
||||
}
|
||||
|
||||
// Fix spawn ENAMETOOLONG on Windows
|
||||
const tracker = reduceTrackerString(this.systemConfig.get('bt-tracker'))
|
||||
|
||||
@@ -4,6 +4,7 @@ import { dialog } from 'electron'
|
||||
import is from 'electron-is'
|
||||
import { autoUpdater } from 'electron-updater'
|
||||
|
||||
import { PROXY_SCOPES } from '@shared/constants'
|
||||
import logger from './Logger'
|
||||
import { getI18n } from '../ui/Locale'
|
||||
|
||||
@@ -22,6 +23,9 @@ export default class UpdateManager extends EventEmitter {
|
||||
this.updater.autoDownload = false
|
||||
this.updater.autoInstallOnAppQuit = false
|
||||
this.updater.logger = logger
|
||||
logger.info('[Motrix] setup proxy:', this.options.proxy)
|
||||
this.setupProxy(this.options.proxy)
|
||||
|
||||
this.autoCheckData = {
|
||||
checkEnable: this.options.autoCheck,
|
||||
userCheck: false
|
||||
@@ -29,6 +33,31 @@ export default class UpdateManager extends EventEmitter {
|
||||
this.init()
|
||||
}
|
||||
|
||||
setupProxy (proxy) {
|
||||
const { enable, server, scope = [] } = proxy
|
||||
if (!enable || !server || !scope.includes(PROXY_SCOPES.UPDATE_APP)) {
|
||||
this.updater.netSession.setProxy({
|
||||
proxyRules: undefined
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const url = new URL(server)
|
||||
const { username, password, protocol = 'http:', host, port } = url
|
||||
const proxyRules = `${protocol}//${host}`
|
||||
|
||||
logger.info(`[Motrix] setup proxy: ${proxyRules}`, username, password, protocol, host, port)
|
||||
this.updater.netSession.setProxy({
|
||||
proxyRules
|
||||
})
|
||||
|
||||
if (server.includes('@')) {
|
||||
this.updater.signals.login((_authInfo, callback) => {
|
||||
callback(username, password)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
init () {
|
||||
// Event: error
|
||||
// Event: checking-for-update
|
||||
|
||||
@@ -49,15 +49,15 @@
|
||||
:label-width="formLabelWidth"
|
||||
>
|
||||
<el-switch
|
||||
v-model="form.useProxy"
|
||||
:active-text="$t('preferences.use-proxy')"
|
||||
@change="onUseProxyChange"
|
||||
v-model="form.proxy.enable"
|
||||
:active-text="$t('preferences.enable-proxy')"
|
||||
@change="onProxyEnableChange"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label-width="formLabelWidth"
|
||||
v-if="form.useProxy"
|
||||
v-if="form.proxy.enable"
|
||||
style="margin-top: -16px;"
|
||||
>
|
||||
<el-col
|
||||
@@ -69,8 +69,8 @@
|
||||
>
|
||||
<el-input
|
||||
placeholder="[http://][USER:PASSWORD@]HOST[:PORT]"
|
||||
@change="onAllProxyBackupChange"
|
||||
v-model="form.allProxyBackup">
|
||||
@change="onProxyServerChange"
|
||||
v-model="form.proxy.server">
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col
|
||||
@@ -84,9 +84,30 @@
|
||||
type="textarea"
|
||||
rows="2"
|
||||
auto-complete="off"
|
||||
:placeholder="`${$t('preferences.no-proxy-input-tips')}`"
|
||||
v-model="form.noProxy">
|
||||
@change="handleProxyBypassChange"
|
||||
:placeholder="`${$t('preferences.proxy-bypass-input-tips')}`"
|
||||
v-model="form.proxy.bypass">
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col
|
||||
class="form-item-sub"
|
||||
:xs="24"
|
||||
:sm="24"
|
||||
:md="20"
|
||||
:lg="20"
|
||||
>
|
||||
<el-select
|
||||
class="proxy-scope"
|
||||
v-model="form.proxy.scope"
|
||||
multiple
|
||||
>
|
||||
<el-option
|
||||
v-for="item in proxyScopeOptions"
|
||||
:key="item"
|
||||
:label="$t(`preferences.proxy-scope-${item}`)"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
<div class="el-form-item__info" style="margin-top: 8px;">
|
||||
<a target="_blank" href="https://github.com/agalwood/Motrix/wiki/Proxy" rel="noopener noreferrer">
|
||||
{{ $t('preferences.proxy-tips') }}
|
||||
@@ -432,10 +453,10 @@
|
||||
EMPTY_STRING,
|
||||
ENGINE_RPC_PORT,
|
||||
LOG_LEVELS,
|
||||
trackerSourceOptions
|
||||
TRACKER_SOURCE_OPTIONS,
|
||||
PROXY_SCOPE_OPTIONS
|
||||
} from '@shared/constants'
|
||||
import {
|
||||
backupConfig,
|
||||
buildRpcUrl,
|
||||
calcFormLabelWidth,
|
||||
changedConfig,
|
||||
@@ -454,8 +475,6 @@
|
||||
|
||||
const initForm = (config) => {
|
||||
const {
|
||||
allProxy,
|
||||
allProxyBackup,
|
||||
autoCheckUpdate,
|
||||
autoSyncTracker,
|
||||
btTracker,
|
||||
@@ -466,8 +485,8 @@
|
||||
lastSyncTrackerTime,
|
||||
listenPort,
|
||||
logLevel,
|
||||
noProxy,
|
||||
protocols,
|
||||
proxy,
|
||||
rpcListenPort,
|
||||
rpcSecret,
|
||||
trackerSource,
|
||||
@@ -475,8 +494,6 @@
|
||||
userAgent
|
||||
} = config
|
||||
const result = {
|
||||
allProxy,
|
||||
allProxyBackup,
|
||||
autoCheckUpdate,
|
||||
autoSyncTracker,
|
||||
btTracker: convertCommaToLine(btTracker),
|
||||
@@ -487,7 +504,7 @@
|
||||
lastSyncTrackerTime,
|
||||
listenPort,
|
||||
logLevel,
|
||||
noProxy: convertCommaToLine(noProxy),
|
||||
proxy: cloneDeep(proxy),
|
||||
protocols: { ...protocols },
|
||||
rpcListenPort,
|
||||
rpcSecret,
|
||||
@@ -515,8 +532,9 @@
|
||||
formLabelWidth: calcFormLabelWidth(locale),
|
||||
formOriginal,
|
||||
hideRpcSecret: true,
|
||||
proxyScopeOptions: PROXY_SCOPE_OPTIONS,
|
||||
rules: {},
|
||||
trackerSourceOptions,
|
||||
trackerSourceOptions: TRACKER_SOURCE_OPTIONS,
|
||||
trackerSyncing: false
|
||||
}
|
||||
},
|
||||
@@ -577,8 +595,6 @@
|
||||
handleLocaleChange (locale) {
|
||||
const lng = getLanguage(locale)
|
||||
getLocaleManager().changeLanguage(lng)
|
||||
this.$electron.ipcRenderer.send('command',
|
||||
'application:change-locale', lng)
|
||||
},
|
||||
onCheckUpdateClick () {
|
||||
this.$electron.ipcRenderer.send('command', 'application:check-for-updates')
|
||||
@@ -610,11 +626,29 @@
|
||||
[protocol]: enabled
|
||||
}
|
||||
},
|
||||
onUseProxyChange (flag) {
|
||||
this.form.allProxy = flag ? this.form.allProxyBackup : ''
|
||||
onProxyEnableChange (enable) {
|
||||
this.form.proxy = {
|
||||
...this.form.proxy,
|
||||
enable
|
||||
}
|
||||
},
|
||||
onAllProxyBackupChange (value) {
|
||||
this.form.allProxy = value
|
||||
onProxyServerChange (server) {
|
||||
this.form.proxy = {
|
||||
...this.form.proxy,
|
||||
server
|
||||
}
|
||||
},
|
||||
handleProxyBypassChange (bypass) {
|
||||
this.form.proxy = {
|
||||
...this.form.proxy,
|
||||
bypass: convertLineToComma(bypass)
|
||||
}
|
||||
},
|
||||
onProxyScopeChange (scope) {
|
||||
this.form.proxy = {
|
||||
...this.form.proxy,
|
||||
scope: [...scope]
|
||||
}
|
||||
},
|
||||
changeUA (type) {
|
||||
const ua = userAgentMap[type]
|
||||
@@ -676,7 +710,7 @@
|
||||
cancelId: 1
|
||||
}).then(({ response }) => {
|
||||
if (response === 0) {
|
||||
this.$electron.ipcRenderer.send('command', 'application:reset')
|
||||
this.$electron.ipcRenderer.send('command', 'application:factory-reset')
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -685,10 +719,6 @@
|
||||
.then((config) => {
|
||||
this.form = initForm(config)
|
||||
this.formOriginal = cloneDeep(this.form)
|
||||
if (changedConfig.basic.theme !== undefined) {
|
||||
this.$electron.ipcRenderer.send('command',
|
||||
'application:change-theme', changedConfig.basic.theme)
|
||||
}
|
||||
})
|
||||
},
|
||||
submitForm (formName) {
|
||||
@@ -704,10 +734,9 @@
|
||||
}
|
||||
|
||||
const {
|
||||
btAutoDownloadContent,
|
||||
autoHideWindow,
|
||||
btAutoDownloadContent,
|
||||
btTracker,
|
||||
noProxy,
|
||||
rpcListenPort
|
||||
} = data
|
||||
|
||||
@@ -721,10 +750,6 @@
|
||||
data.btTracker = reduceTrackerString(convertLineToComma(btTracker))
|
||||
}
|
||||
|
||||
if (noProxy) {
|
||||
data.noProxy = convertLineToComma(noProxy)
|
||||
}
|
||||
|
||||
if (rpcListenPort === EMPTY_STRING) {
|
||||
data.rpcListenPort = this.rpcDefaultPort
|
||||
}
|
||||
@@ -776,17 +801,8 @@
|
||||
cancelId: 1
|
||||
}).then(({ response }) => {
|
||||
if (response === 0) {
|
||||
if (changedConfig.basic.theme !== undefined) {
|
||||
this.$electron.ipcRenderer.send('command',
|
||||
'application:change-theme',
|
||||
backupConfig.theme)
|
||||
}
|
||||
if (changedConfig.basic.locale !== undefined) {
|
||||
this.handleLocaleChange(backupConfig.locale)
|
||||
}
|
||||
changedConfig.basic = {}
|
||||
changedConfig.advanced = {}
|
||||
backupConfig.theme = undefined
|
||||
next()
|
||||
}
|
||||
})
|
||||
@@ -797,6 +813,9 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.proxy-scope {
|
||||
width: 100%;
|
||||
}
|
||||
.bt-tracker {
|
||||
position: relative;
|
||||
.sync-tracker-btn {
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
<el-col class="form-item-sub" :span="16">
|
||||
<el-select
|
||||
v-model="form.locale"
|
||||
@change="handleLocaleChange"
|
||||
:placeholder="$t('preferences.change-language')">
|
||||
<el-option
|
||||
v-for="item in locales"
|
||||
@@ -144,8 +143,7 @@
|
||||
<el-select
|
||||
style="width: 100px;"
|
||||
v-model="uploadUnit"
|
||||
@change="handleUploadChange"
|
||||
:placeholder="$t('preferences.speed-units')">
|
||||
@change="handleUploadChange">
|
||||
<el-option
|
||||
v-for="item in speedUnits"
|
||||
:key="item.value"
|
||||
@@ -167,8 +165,7 @@
|
||||
<el-select
|
||||
style="width: 100px;"
|
||||
v-model="downloadUnit"
|
||||
@change="handleDownloadChange"
|
||||
:placeholder="$t('preferences.speed-units')">
|
||||
@change="handleDownloadChange">
|
||||
<el-option
|
||||
v-for="item in speedUnits"
|
||||
:key="item.value"
|
||||
@@ -308,7 +305,6 @@
|
||||
import { availableLanguages, getLanguage } from '@shared/locales'
|
||||
import { getLocaleManager } from '@/components/Locale'
|
||||
import {
|
||||
backupConfig,
|
||||
calcFormLabelWidth,
|
||||
changedConfig,
|
||||
checkIsNeedRestart,
|
||||
@@ -319,7 +315,8 @@
|
||||
import {
|
||||
APP_RUN_MODE,
|
||||
EMPTY_STRING,
|
||||
ENGINE_MAX_CONCURRENT_DOWNLOADS
|
||||
ENGINE_MAX_CONCURRENT_DOWNLOADS,
|
||||
ENGINE_RPC_PORT
|
||||
} from '@shared/constants'
|
||||
import { reduceTrackerString } from '@shared/utils/tracker'
|
||||
|
||||
@@ -406,13 +403,6 @@
|
||||
let form = {}
|
||||
form = initForm(extend(form, formOriginal, changedConfig.basic))
|
||||
|
||||
if (backupConfig.theme === undefined) {
|
||||
backupConfig.theme = formOriginal.theme
|
||||
} else {
|
||||
formOriginal.theme = backupConfig.theme
|
||||
}
|
||||
backupConfig.locale = formOriginal.locale
|
||||
|
||||
return {
|
||||
form,
|
||||
formLabelWidth: calcFormLabelWidth(locale),
|
||||
@@ -526,6 +516,9 @@
|
||||
showHideAppMenuOption () {
|
||||
return is.windows() || is.linux()
|
||||
},
|
||||
rpcDefaultPort () {
|
||||
return ENGINE_RPC_PORT
|
||||
},
|
||||
...mapState('preference', {
|
||||
config: state => state.config
|
||||
})
|
||||
@@ -534,22 +527,18 @@
|
||||
handleLocaleChange (locale) {
|
||||
const lng = getLanguage(locale)
|
||||
getLocaleManager().changeLanguage(lng)
|
||||
this.$electron.ipcRenderer.send('command',
|
||||
'application:change-locale', lng)
|
||||
},
|
||||
handleThemeChange (theme) {
|
||||
this.form.theme = theme
|
||||
this.$electron.ipcRenderer.send('command',
|
||||
'application:change-theme', theme)
|
||||
},
|
||||
handleDownloadChange (value) {
|
||||
const speedLimit = parseInt(this.form.maxOverallDownloadLimit)
|
||||
const speedLimit = parseInt(this.form.maxOverallDownloadLimit, 10)
|
||||
this.downloadUnit = value
|
||||
const limit = speedLimit > 0 ? `${speedLimit}${value}` : 0
|
||||
this.form.maxOverallDownloadLimit = limit
|
||||
},
|
||||
handleUploadChange (value) {
|
||||
const speedLimit = parseInt(this.form.maxOverallUploadLimit)
|
||||
const speedLimit = parseInt(this.form.maxOverallUploadLimit, 10)
|
||||
this.uploadUnit = value
|
||||
const limit = speedLimit > 0 ? `${speedLimit}${value}` : 0
|
||||
this.form.maxOverallUploadLimit = limit
|
||||
@@ -588,10 +577,9 @@
|
||||
}
|
||||
|
||||
const {
|
||||
btAutoDownloadContent,
|
||||
autoHideWindow,
|
||||
btAutoDownloadContent,
|
||||
btTracker,
|
||||
noProxy,
|
||||
rpcListenPort
|
||||
} = data
|
||||
|
||||
@@ -605,10 +593,6 @@
|
||||
data.btTracker = reduceTrackerString(convertLineToComma(btTracker))
|
||||
}
|
||||
|
||||
if (noProxy) {
|
||||
data.noProxy = convertLineToComma(noProxy)
|
||||
}
|
||||
|
||||
if (rpcListenPort === EMPTY_STRING) {
|
||||
data.rpcListenPort = this.rpcDefaultPort
|
||||
}
|
||||
@@ -641,8 +625,6 @@
|
||||
})
|
||||
},
|
||||
resetForm (formName) {
|
||||
this.$refs.themeSwitcher.currentValue = backupConfig.theme
|
||||
this.handleLocaleChange(this.formOriginal.locale)
|
||||
this.syncFormConfig()
|
||||
}
|
||||
},
|
||||
@@ -662,17 +644,8 @@
|
||||
cancelId: 1
|
||||
}).then(({ response }) => {
|
||||
if (response === 0) {
|
||||
if (changedConfig.basic.theme !== undefined) {
|
||||
this.$electron.ipcRenderer.send('command',
|
||||
'application:change-theme',
|
||||
backupConfig.theme)
|
||||
}
|
||||
if (changedConfig.basic.locale !== undefined) {
|
||||
this.handleLocaleChange(this.formOriginal.locale)
|
||||
}
|
||||
changedConfig.basic = {}
|
||||
changedConfig.advanced = {}
|
||||
backupConfig.theme = undefined
|
||||
next()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
import EngineClient from '@/components/Native/EngineClient'
|
||||
import Ipc from '@/components/Native/Ipc'
|
||||
import TitleBar from '@/components/Native/TitleBar'
|
||||
import { getLanguage } from '@shared/locales'
|
||||
import { getLocaleManager } from '@/components/Locale'
|
||||
|
||||
export default {
|
||||
name: 'motrix-app',
|
||||
@@ -78,13 +80,17 @@
|
||||
this.updateRootClassName()
|
||||
},
|
||||
watch: {
|
||||
themeClass (val, oldVal) {
|
||||
locale (val) {
|
||||
const lng = getLanguage(val)
|
||||
getLocaleManager().changeLanguage(lng)
|
||||
},
|
||||
themeClass () {
|
||||
this.updateRootClassName()
|
||||
},
|
||||
i18nClass (val, oldVal) {
|
||||
i18nClass () {
|
||||
this.updateRootClassName()
|
||||
},
|
||||
directionClass (val, oldVal) {
|
||||
directionClass () {
|
||||
this.updateRootClassName()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,12 @@ const updateSystemTheme = (payload = {}) => {
|
||||
|
||||
const updateTheme = (payload = {}) => {
|
||||
const { theme } = payload
|
||||
store.dispatch('preference/updateThemeConfig', theme)
|
||||
store.dispatch('preference/updateAppTheme', theme)
|
||||
}
|
||||
|
||||
const updateLocale = (payload = {}) => {
|
||||
const { locale } = payload
|
||||
store.dispatch('preference/updateAppLocale', locale)
|
||||
}
|
||||
|
||||
const updateTrayFocused = (payload = {}) => {
|
||||
@@ -192,4 +197,5 @@ commands.register('application:show-task-detail', showTaskDetail)
|
||||
commands.register('application:update-preference-config', fetchPreference)
|
||||
commands.register('application:update-system-theme', updateSystemTheme)
|
||||
commands.register('application:update-theme', updateTheme)
|
||||
commands.register('application:update-locale', updateLocale)
|
||||
commands.register('application:update-tray-focused', updateTrayFocused)
|
||||
|
||||
@@ -114,14 +114,19 @@ const actions = {
|
||||
favoriteDirectories: favorite
|
||||
})
|
||||
},
|
||||
updateThemeConfig ({ dispatch }, theme) {
|
||||
updateAppTheme ({ dispatch }, theme) {
|
||||
dispatch('updatePreference', { theme })
|
||||
},
|
||||
updateAppLocale ({ dispatch }, locale) {
|
||||
dispatch('updatePreference', { locale })
|
||||
},
|
||||
updatePreference ({ commit }, config) {
|
||||
commit('UPDATE_PREFERENCE_DATA', config)
|
||||
},
|
||||
fetchBtTracker (_, trackerSource = []) {
|
||||
return fetchBtTrackerFromSource(trackerSource)
|
||||
const { proxy = { enable: false } } = state.config
|
||||
console.log('fetchBtTracker', trackerSource, proxy)
|
||||
return fetchBtTrackerFromSource(trackerSource, proxy)
|
||||
},
|
||||
toggleEngineMode () {
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const userKeys = [
|
||||
'all-proxy-backup',
|
||||
'auto-check-update',
|
||||
'auto-hide-window',
|
||||
'auto-sync-tracker',
|
||||
@@ -20,14 +19,14 @@ const userKeys = [
|
||||
'no-confirm-before-delete-task',
|
||||
'open-at-login',
|
||||
'protocols',
|
||||
'proxy',
|
||||
'resume-all-when-app-launched',
|
||||
'run-mode',
|
||||
'show-progress-bar',
|
||||
'task-notification',
|
||||
'theme',
|
||||
'tracker-source',
|
||||
'tray-speedometer',
|
||||
'use-proxy'
|
||||
'tray-speedometer'
|
||||
]
|
||||
|
||||
const systemKeys = [
|
||||
|
||||
+21
-9
@@ -70,10 +70,10 @@ export const NGOSANG_TRACKERS_BEST_IP_URL = 'https://raw.githubusercontent.com/n
|
||||
export const NGOSANG_TRACKERS_ALL_URL = 'https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt'
|
||||
export const NGOSANG_TRACKERS_ALL_IP_URL = 'https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all_ip.txt'
|
||||
|
||||
export const NGOSANG_TRACKERS_BEST_URL_CDN = 'https://fastly.jsdelivr.net/gh/ngosang/trackerslist/trackers_best.txt'
|
||||
export const NGOSANG_TRACKERS_BEST_IP_URL_CDN = 'https://fastly.jsdelivr.net/gh/ngosang/trackerslist/trackers_best_ip.txt'
|
||||
export const NGOSANG_TRACKERS_ALL_URL_CDN = 'https://fastly.jsdelivr.net/gh/ngosang/trackerslist/trackers_all.txt'
|
||||
export const NGOSANG_TRACKERS_ALL_IP_URL_CDN = 'https://fastly.jsdelivr.net/gh/ngosang/trackerslist/trackers_all_ip.txt'
|
||||
export const NGOSANG_TRACKERS_BEST_URL_CDN = 'https://cdn.jsdelivr.net/gh/ngosang/trackerslist/trackers_best.txt'
|
||||
export const NGOSANG_TRACKERS_BEST_IP_URL_CDN = 'https://cdn.jsdelivr.net/gh/ngosang/trackerslist/trackers_best_ip.txt'
|
||||
export const NGOSANG_TRACKERS_ALL_URL_CDN = 'https://cdn.jsdelivr.net/gh/ngosang/trackerslist/trackers_all.txt'
|
||||
export const NGOSANG_TRACKERS_ALL_IP_URL_CDN = 'https://cdn.jsdelivr.net/gh/ngosang/trackerslist/trackers_all_ip.txt'
|
||||
|
||||
/**
|
||||
* @see https://github.com/XIU2/TrackersListCollection
|
||||
@@ -82,14 +82,14 @@ export const XIU2_TRACKERS_BEST_URL = 'https://raw.githubusercontent.com/XIU2/Tr
|
||||
export const XIU2_TRACKERS_ALL_URL = 'https://raw.githubusercontent.com/XIU2/TrackersListCollection/master/all.txt'
|
||||
export const XIU2_TRACKERS_HTTP_URL = 'https://raw.githubusercontent.com/XIU2/TrackersListCollection/master/http.txt'
|
||||
|
||||
export const XIU2_TRACKERS_BEST_URL_CDN = 'https://fastly.jsdelivr.net/gh/XIU2/TrackersListCollection/best.txt'
|
||||
export const XIU2_TRACKERS_ALL_URL_CDN = 'https://fastly.jsdelivr.net/gh/XIU2/TrackersListCollection/all.txt'
|
||||
export const XIU2_TRACKERS_HTTP_URL_CDN = 'https://fastly.jsdelivr.net/gh/XIU2/TrackersListCollection/http.txt'
|
||||
export const XIU2_TRACKERS_BEST_URL_CDN = 'https://cdn.jsdelivr.net/gh/XIU2/TrackersListCollection/best.txt'
|
||||
export const XIU2_TRACKERS_ALL_URL_CDN = 'https://cdn.jsdelivr.net/gh/XIU2/TrackersListCollection/all.txt'
|
||||
export const XIU2_TRACKERS_HTTP_URL_CDN = 'https://cdn.jsdelivr.net/gh/XIU2/TrackersListCollection/http.txt'
|
||||
|
||||
// For bt-exclude-tracker
|
||||
export const XIU2_TRACKERS_BLACK_URL = 'https://fastly.jsdelivr.net/gh/XIU2/TrackersListCollection/blacklist.txt'
|
||||
export const XIU2_TRACKERS_BLACK_URL = 'https://cdn.jsdelivr.net/gh/XIU2/TrackersListCollection/blacklist.txt'
|
||||
|
||||
export const trackerSourceOptions = [
|
||||
export const TRACKER_SOURCE_OPTIONS = [
|
||||
{
|
||||
label: 'ngosang/trackerslist',
|
||||
options: [
|
||||
@@ -172,6 +172,18 @@ export const trackerSourceOptions = [
|
||||
}
|
||||
]
|
||||
|
||||
export const PROXY_SCOPES = {
|
||||
DOWNLOAD: 'download',
|
||||
UPDATE_APP: 'update-app',
|
||||
UPDATE_TRACKERS: 'update-trackers'
|
||||
}
|
||||
|
||||
export const PROXY_SCOPE_OPTIONS = [
|
||||
PROXY_SCOPES.DOWNLOAD,
|
||||
PROXY_SCOPES.UPDATE_APP,
|
||||
PROXY_SCOPES.UPDATE_TRACKERS
|
||||
]
|
||||
|
||||
export const NONE_SELECTED_FILES = 'none'
|
||||
export const SELECTED_ALL_FILES = 'all'
|
||||
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'تغيير اللغة',
|
||||
'hide-app-menu': 'إخفاء قائمة التطبيقات (Windows و Linux فقط)',
|
||||
'proxy': 'الخادم الوسيط',
|
||||
'use-proxy': 'تفعيل الخادم الوسيط',
|
||||
'no-proxy-input-tips': 'تخطي إعدادات الخادم الوسيط لهذه المضيفات والمجالات، واحدة لكل سطر',
|
||||
'enable-proxy': 'تفعيل الخادم الوسيط',
|
||||
'proxy-bypass-input-tips': 'تخطي إعدادات الخادم الوسيط لهذه المضيفات والمجالات، واحدة لكل سطر',
|
||||
'proxy-scope-download': 'تنزيل',
|
||||
'proxy-scope-update-app': 'تحديث التطبيق',
|
||||
'proxy-scope-update-trackers': 'تحديث المتتبعات',
|
||||
'proxy-tips': 'عرض دليل الخادم الوسيط',
|
||||
'bt-tracker': 'خوادم التعقب',
|
||||
'bt-tracker-input-tips': 'خوادم التعقب، واحدة لكل سطر',
|
||||
@@ -87,6 +90,5 @@ export default {
|
||||
'auto-check-update': 'تحقق تلقائيًا من التحديث',
|
||||
'last-check-update-time': 'آخر مرة تم التحقق من وجود تحديثات',
|
||||
'not-saved': 'التفضيلات غير محفوظة',
|
||||
'not-saved-confirm': 'ستفقد التفضيلات التي تم تغييرها ، هل أنت متأكد من المغادرة؟',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'ستفقد التفضيلات التي تم تغييرها ، هل أنت متأكد من المغادرة؟'
|
||||
}
|
||||
|
||||
@@ -47,8 +47,11 @@ export default {
|
||||
'change-language': 'промяна на езика',
|
||||
'hide-app-menu': 'Скриване на менюто на приложението (само за Windows и Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'използване на Proxy',
|
||||
'no-proxy-input-tips': 'заобикаляне на настройките на прокси за тези хостове и домейни, един по един на ред',
|
||||
'enable-proxy': 'използване на Proxy',
|
||||
'proxy-bypass-input-tips': 'заобикаляне на настройките на прокси за тези хостове и домейни, един по един на ред',
|
||||
'proxy-scope-download': 'Изтегляне',
|
||||
'proxy-scope-update-app': 'Актуализиране на приложението',
|
||||
'proxy-scope-update-trackers': 'Актуализиране на трекери',
|
||||
'proxy-tips': 'преглед на ръководството за прокси',
|
||||
'bt-tracker':'Tracker сървър',
|
||||
'bt-tracker-input-tips': 'Tracker сървър, един на ред',
|
||||
@@ -83,6 +86,5 @@ export default {
|
||||
'auto-check-update':'автоматична проверка на актуализациите',
|
||||
'last-check-update-time': 'последната актуализация е проверена',
|
||||
'not-saved': 'Предпочитанията не са запазени',
|
||||
'not-saved-confirm': 'Променените предпочитания ще бъдат загубени, сигурни ли сте, че ще напуснете?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Променените предпочитания ще бъдат загубени, сигурни ли сте, че ще напуснете?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Cambiar idioma',
|
||||
'hide-app-menu': 'Ocultar el menú (només Windows i Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Activar proxy',
|
||||
'no-proxy-input-tips': 'Eviteu la configuració del servidor intermediari per a aquests amfitrions i dominis, un per línia',
|
||||
'enable-proxy': 'Activar proxy',
|
||||
'proxy-bypass-input-tips': 'Eviteu la configuració del servidor intermediari per a aquests amfitrions i dominis, un per línia',
|
||||
'proxy-scope-download': 'Descàrrega',
|
||||
'proxy-scope-update-app': 'Actualització de l\'aplicació',
|
||||
'proxy-scope-update-trackers': 'Actualitza els rastrejadors',
|
||||
'proxy-tips': 'Consulteu el manual del servidor intermediari',
|
||||
'bt-tracker': 'Seguir servidors',
|
||||
'bt-tracker-input-tips': 'Seguir servidors, un per línia',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Revisar actualitzacions automàticament',
|
||||
'last-check-update-time': 'Última revisió d\'actualitzacions',
|
||||
'not-saved': 'Preferències no desades',
|
||||
'not-saved-confirm': 'Les preferències modificades es perdran, esteu segur que marxareu?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Les preferències modificades es perdran, esteu segur que marxareu?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Sprache ändern',
|
||||
'hide-app-menu': 'App Menü ausblenden (nur auf Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Proxy aktivieren',
|
||||
'no-proxy-input-tips': 'Proxy-Einstellungen für diese Hosts und Domänen umgehen, eine pro Zeile',
|
||||
'enable-proxy': 'Proxy aktivieren',
|
||||
'proxy-bypass-input-tips': 'Proxy-Einstellungen für diese Hosts und Domänen umgehen, eine pro Zeile',
|
||||
'proxy-scope-download': 'Herunterladen',
|
||||
'proxy-scope-update-app': 'Anwendung aktualisieren',
|
||||
'proxy-scope-update-trackers': 'Tracker aktualisieren',
|
||||
'proxy-tips': 'Proxy-Handbuch anzeigen',
|
||||
'bt-tracker': 'Tracker-Server',
|
||||
'bt-tracker-input-tips': 'Tracker-Server, einer pro Zeile',
|
||||
@@ -87,6 +90,5 @@ export default {
|
||||
'auto-check-update': 'Automatisch auf Updates prüfen',
|
||||
'last-check-update-time': 'letzte kontrolle update - zeit',
|
||||
'not-saved': 'Einstellungen nicht gespeichert',
|
||||
'not-saved-confirm': 'Die geänderten Einstellungen gehen verloren. Möchten Sie wirklich gehen?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Die geänderten Einstellungen gehen verloren. Möchten Sie wirklich gehen?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Αλλαγή Γλώσσας',
|
||||
'hide-app-menu': 'Κρύψε το μενού της εφαρμογής (μόνο για Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Χρησιμοίησε Proxy',
|
||||
'no-proxy-input-tips': 'Μη χρησιμοποιήσεις ρυθμίσεις proxy για αυτούς τους Hosts και τα Domains, ένα ανά γραμμή',
|
||||
'enable-proxy': 'Χρησιμοίησε Proxy',
|
||||
'proxy-bypass-input-tips': 'Μη χρησιμοποιήσεις ρυθμίσεις proxy για αυτούς τους Hosts και τα Domains, ένα ανά γραμμή',
|
||||
'proxy-scope-download': 'Λήψη',
|
||||
'proxy-scope-update-app': 'Ενημέρωση εφαρμογής',
|
||||
'proxy-scope-update-trackers': 'Ενημέρωση Trackers',
|
||||
'proxy-tips': 'Εμφάνιση εγχειριδίου Proxy',
|
||||
'bt-tracker': 'Tracker Servers',
|
||||
'bt-tracker-input-tips': 'Tracker servers, ένα ανά γραμμή',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Αυτόματος έλεγχος για ενημερώσεις',
|
||||
'last-check-update-time': 'Τελευταία φορά που έγινε έλεγχος για Ενημερώσεις',
|
||||
'not-saved': 'Οι προτιμήσεις δεν αποθηκεύτηκαν',
|
||||
'not-saved-confirm': 'Οι αλλαγμένες προτιμήσεις θα χαθούν, είστε σίγουροι ότι θα φύγετε;',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Οι αλλαγμένες προτιμήσεις θα χαθούν, είστε σίγουροι ότι θα φύγετε;'
|
||||
}
|
||||
|
||||
@@ -43,13 +43,16 @@ export default {
|
||||
'run-mode-tray': 'Tray Application',
|
||||
'run-mode-hide-tray': 'Hide Tray Application',
|
||||
'tray-speedometer': 'Show the real-time speed in the menu bar tray',
|
||||
'show-progress-bar': 'Show download prgress bar',
|
||||
'show-progress-bar': 'Show download progress bar',
|
||||
'language': 'Language',
|
||||
'change-language': 'Change language',
|
||||
'hide-app-menu': 'Hide App Menu (Windows & Linux Only)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Enable Proxy',
|
||||
'no-proxy-input-tips': 'Bypass proxy settings for these Hosts and Domains, one per line',
|
||||
'enable-proxy': 'Enable Proxy',
|
||||
'proxy-bypass-input-tips': 'Bypass proxy settings for these Hosts and Domains, one per line',
|
||||
'proxy-scope-download': 'Download',
|
||||
'proxy-scope-update-app': 'Update Application',
|
||||
'proxy-scope-update-trackers': 'Update Trackers',
|
||||
'proxy-tips': 'View Proxy Manual',
|
||||
'bt-tracker': 'Tracker Servers',
|
||||
'bt-tracker-input-tips': 'Tracker servers, one per line',
|
||||
@@ -87,6 +90,5 @@ export default {
|
||||
'auto-check-update': 'Automatically check for updates',
|
||||
'last-check-update-time': 'Last checked for an update',
|
||||
'not-saved': 'Preferences not saved',
|
||||
'not-saved-confirm': 'The modified preferences will be lost, are you sure you want to leave?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'The modified preferences will be lost, are you sure you want to leave?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Cambiar Idioma',
|
||||
'hide-app-menu': 'Ocultar el menú (Solo Windows y Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Activar Proxy',
|
||||
'no-proxy-input-tips': 'Omitir la configuración del proxy para estos hosts y dominios, uno por línea',
|
||||
'enable-proxy': 'Activar Proxy',
|
||||
'proxy-bypass-input-tips': 'Omitir la configuración del proxy para estos hosts y dominios, uno por línea',
|
||||
'proxy-scope-download': 'Descargar',
|
||||
'proxy-scope-update-app': 'Actualizar aplicación',
|
||||
'proxy-scope-update-trackers': 'Actualizar Trackers',
|
||||
'proxy-tips': 'Ver manual para Proxy',
|
||||
'bt-tracker': 'Servidores de rastreadores',
|
||||
'bt-tracker-input-tips': 'Servidores de rastreadores, uno por línea',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Revisar automáticamente por actualizaciones',
|
||||
'last-check-update-time': 'Última revisión de actualizaciones',
|
||||
'not-saved': 'Preferencias no guardadas',
|
||||
'not-saved-confirm': 'Las preferencias cambiadas se perderán, ¿está seguro de irse?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Las preferencias cambiadas se perderán, ¿está seguro de irse?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'تغییر زبان',
|
||||
'hide-app-menu': 'پنهان کردن منوی برنامه (تنها در ویندوز و لینوکس)',
|
||||
'proxy': 'پیشکار',
|
||||
'use-proxy': 'فعال کردن پیشکار',
|
||||
'no-proxy-input-tips': 'تنظیمات پیشکار را برای این میزبانها و دامنهها استفاده نکن، یکی در هر خط',
|
||||
'enable-proxy': 'فعال کردن پیشکار',
|
||||
'proxy-bypass-input-tips': 'تنظیمات پیشکار را برای این میزبانها و دامنهها استفاده نکن، یکی در هر خط',
|
||||
'proxy-scope-download': 'دانلود',
|
||||
'proxy-scope-update-app': 'بهروزرسانی برنامه',
|
||||
'proxy-scope-update-trackers': 'بهروزرسانی پیگیرها',
|
||||
'proxy-tips': 'مشاهده راهنمای پیشکار',
|
||||
'bt-tracker': 'سرورهای ردیاب',
|
||||
'bt-tracker-input-tips': 'سرورهای ردیاب، یکی در هر خط',
|
||||
@@ -87,6 +90,5 @@ export default {
|
||||
'auto-check-update': 'به صورت خودکار برای بهروز رسانی بررسی کن',
|
||||
'last-check-update-time': 'آخرین زمان بررسی برای بهروز رسانی',
|
||||
'not-saved': 'تنظیمات برگزیده ذخیره نشد',
|
||||
'not-saved-confirm': 'تنظیمات برگزیده تغییر یافته از بین خواهند رفت، آیا مطمئن هستید که می روید؟',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'تنظیمات برگزیده تغییر یافته از بین خواهند رفت، آیا مطمئن هستید که می روید؟'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Changer la langue',
|
||||
'hide-app-menu': 'Cacher le menu de l\'application (Windows & Linux uniquement)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Activer le Proxy',
|
||||
'no-proxy-input-tips': 'Contourner les paramètres de proxy pour ces hôtes et domaines, un par ligne',
|
||||
'enable-proxy': 'Activer le Proxy',
|
||||
'proxy-bypass-input-tips': 'Contourner les paramètres de proxy pour ces hôtes et domaines, un par ligne',
|
||||
'proxy-scope-download': 'Télécharger',
|
||||
'proxy-scope-update-app': 'Mettre à jour l\'application',
|
||||
'proxy-scope-update-trackers': 'Mettre à jour les trackers',
|
||||
'proxy-tips': 'Afficher le manuel du proxy',
|
||||
'bt-tracker': 'Serveurs Tracker',
|
||||
'bt-tracker-input-tips': 'Serveur de suivi, un par ligne',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Mise à jour automatique',
|
||||
'last-check-update-time': 'dernier contrôle la mise à jour du temps',
|
||||
'not-saved': 'Préférences non enregistrées',
|
||||
'not-saved-confirm': 'Les préférences modifiées seront perdues, êtes-vous sûr de partir ?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Les préférences modifiées seront perdues, êtes-vous sûr de partir ?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Nyelv váltas',
|
||||
'hide-app-menu': 'Alkalmazás csik elrejtése (csak Windows és Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Proxy engedélyezése',
|
||||
'no-proxy-input-tips': 'Proxy beálitassok elvetése ezek url és domain-nél (/sor)',
|
||||
'enable-proxy': 'Proxy engedélyezése',
|
||||
'proxy-bypass-input-tips': 'Proxy beálitassok elvetése ezek url és domain-nél (/sor)',
|
||||
'proxy-scope-download': 'Letöltés',
|
||||
'proxy-scope-update-app': 'Alkalmazás frissítése',
|
||||
'proxy-scope-update-trackers': 'Nyomkövetők frissítése',
|
||||
'proxy-tips': 'Proxy kéziköny megnyitasa',
|
||||
'bt-tracker': 'Lekövetö szerverek',
|
||||
'bt-tracker-input-tips': 'Lekövetö szerverek (/sor)',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Automatikus keresen frissitéseket',
|
||||
'last-check-update-time': 'Legutolsó frissités:',
|
||||
'not-saved': 'A beállítások nincsenek mentve',
|
||||
'not-saved-confirm': 'A megváltozott beállítások elvesznek. Biztosan kilép?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'A megváltozott beállítások elvesznek. Biztosan kilép?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Ubah Bahasa',
|
||||
'hide-app-menu': 'Sembunyikan Menu Aplikasi (hanya: Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Aktifkan Proxy',
|
||||
'no-proxy-input-tips': 'Abaikan pengaturan proxy untuk Host dan Domain ini, satu per baris',
|
||||
'enable-proxy': 'Aktifkan Proxy',
|
||||
'proxy-bypass-input-tips': 'Abaikan pengaturan proxy untuk Host dan Domain ini, satu per baris',
|
||||
'proxy-scope-download': 'Unduh',
|
||||
'proxy-scope-update-app': 'Perbarui Aplikasi',
|
||||
'proxy-scope-update-trackers': 'Perbarui Pelacak',
|
||||
'proxy-tips': 'Lihat Manual Proxy',
|
||||
'bt-tracker': 'Server Pelacak',
|
||||
'bt-tracker-input-tips': 'Server pelacak, satu per baris',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Secara otomatis memeriksa pembaruan',
|
||||
'last-check-update-time': 'Terakhir Kali Memeriksa Pembaruan',
|
||||
'not-saved': 'Preferensi tidak disimpan',
|
||||
'not-saved-confirm': 'Preferensi yang dimodifikasi akan hilang, apakah Anda yakin untuk keluar?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Preferensi yang dimodifikasi akan hilang, apakah Anda yakin untuk keluar?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Cambia lingua',
|
||||
'hide-app-menu': 'Nascondi dal menu delle app (Solo Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Usa Proxy',
|
||||
'no-proxy-input-tips': 'Non usare proxy per questi Host e Domini, uno per linea',
|
||||
'enable-proxy': 'Usa Proxy',
|
||||
'proxy-bypass-input-tips': 'Non usare proxy per questi Host e Domini, uno per linea',
|
||||
'proxy-scope-download': 'Scarica',
|
||||
'proxy-scope-update-app': 'Aggiorna applicazione',
|
||||
'proxy-scope-update-trackers': 'Aggiorna tracker',
|
||||
'proxy-tips': 'Guida all\'uso dei proxy (In Inglese)',
|
||||
'bt-tracker': 'Server di monitoraggio',
|
||||
'bt-tracker-input-tips': 'Tracker servers, uno per linea',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Verifica automaticamente la disponibilità di aggiornamenti',
|
||||
'last-check-update-time': 'Ultima volta quando gli aggiornamenti sono stati verificati',
|
||||
'not-saved': 'Preferenze non salvate',
|
||||
'not-saved-confirm': 'Le preferenze modificate andranno perse, sei sicuro di uscire?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Le preferenze modificate andranno perse, sei sicuro di uscire?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': '言語を切り替え',
|
||||
'hide-app-menu': 'メニューバーを隠す(Windows と Linux のみサポート)',
|
||||
'proxy': 'プロキシ',
|
||||
'use-proxy': 'プロキシを使う',
|
||||
'no-proxy-input-tips': 'これらのホストおよびドメインのプロキシ設定を1行に1つずつバイパスします',
|
||||
'enable-proxy': 'プロキシを使う',
|
||||
'proxy-bypass-input-tips': 'これらのホストおよびドメインのプロキシ設定を1行に1つずつバイパスします',
|
||||
'proxy-scope-download': 'ダウンロード',
|
||||
'proxy-scope-update-app': 'アプリケーションの更新',
|
||||
'proxy-scope-update-trackers': 'トラッカーを更新する',
|
||||
'proxy-tips': 'プロキシマニュアルを表示',
|
||||
'bt-tracker': 'トラッカーサーバー',
|
||||
'bt-tracker-input-tips': 'トラッカーサーバ、一行に一つ',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': '更新を自動で確認する',
|
||||
'last-check-update-time': '前回更新確認時間',
|
||||
'not-saved': '設定が保存されていません',
|
||||
'not-saved-confirm': '変更された設定は失われます、よろしいですか?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': '変更された設定は失われます、よろしいですか?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': '언어 변경',
|
||||
'hide-app-menu': '앱 메뉴 숨기기 (Windows 및 Linux)',
|
||||
'proxy': '프록시',
|
||||
'use-proxy': '프록시 사용',
|
||||
'no-proxy-input-tips': '프록시 설정을 우회할 호스트 및 도메인 (한 줄에 하나)',
|
||||
'enable-proxy': '프록시 사용',
|
||||
'proxy-bypass-input-tips': '프록시 설정을 우회할 호스트 및 도메인 (한 줄에 하나)',
|
||||
'proxy-scope-download': '다운로드',
|
||||
'proxy-scope-update-app': '애플리케이션 업데이트',
|
||||
'proxy-scope-update-trackers': '추적기 업데이트',
|
||||
'proxy-tips': '프록시 매뉴얼 보기',
|
||||
'bt-tracker': '트래커 서버',
|
||||
'bt-tracker-input-tips': '트래커 서버 (한 줄에 하나)',
|
||||
@@ -87,6 +90,5 @@ export default {
|
||||
'auto-check-update': '자동으로 업데이트 확인',
|
||||
'last-check-update-time': '마지막 업데이트 확인 시간',
|
||||
'not-saved': '설정이 저장되지 않았습니다',
|
||||
'not-saved-confirm': '수정된 설정이 손실됩니다. 나가시겠습니까?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': '수정된 설정이 손실됩니다. 나가시겠습니까?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Skifte språk',
|
||||
'hide-app-menu': 'Skjul appmeny (kun Windows og Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Aktiver proxy',
|
||||
'no-proxy-input-tips': 'Omgå proxy-innstillinger for disse vertene og domenene, en per linje',
|
||||
'enable-proxy': 'Aktiver proxy',
|
||||
'proxy-bypass-input-tips': 'Omgå proxy-innstillinger for disse vertene og domenene, en per linje',
|
||||
'proxy-scope-download': 'Nedlasting',
|
||||
'proxy-scope-update-app': 'Oppdater applikasjonen',
|
||||
'proxy-scope-update-trackers': 'Oppdater sporingskapsler',
|
||||
'proxy-tips': 'Se Proxy Manual',
|
||||
'bt-tracker': 'Tracker-servere',
|
||||
'bt-tracker-input-tips': 'Tracker-servere, en per linje',
|
||||
@@ -87,6 +90,5 @@ export default {
|
||||
'auto-check-update': 'Sjekk automatisk for oppdatering',
|
||||
'last-check-update-time': 'Siste gang sjekket for oppdatering',
|
||||
'not-saved': 'Preferansene er ikke lagret',
|
||||
'not-saved-confirm': 'De endrede preferansene vil gå tapt, er du sikker på at du vil forlate?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'De endrede preferansene vil gå tapt, er du sikker på at du vil forlate?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Taal veranderen',
|
||||
'hide-app-menu': 'App menu verbergen (alleen Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Proxy aanzetten',
|
||||
'no-proxy-input-tips': 'Proxy instellingen omzeilen voor deze hosts en domeinen (één per regel)',
|
||||
'enable-proxy': 'Proxy aanzetten',
|
||||
'proxy-bypass-input-tips': 'Proxy instellingen omzeilen voor deze hosts en domeinen (één per regel)',
|
||||
'proxy-scope-download': 'Downloaden',
|
||||
'proxy-scope-update-app': 'Toepassing bijwerken',
|
||||
'proxy-scope-update-trackers': 'Trackers bijwerken',
|
||||
'proxy-tips': 'Proxy handleiding bekijken',
|
||||
'bt-tracker': 'Tracker Servers',
|
||||
'bt-tracker-input-tips': 'Tracker Servers, één per regel',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Zmień język',
|
||||
'hide-app-menu': 'Schowaj menu aplikacji (Tylko Windows i Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Włącz Proxy',
|
||||
'no-proxy-input-tips': 'Omiń ustawiania proxy dla tych hostów i domen, jeden na linię',
|
||||
'enable-proxy': 'Włącz Proxy',
|
||||
'proxy-bypass-input-tips': 'Omiń ustawiania proxy dla tych hostów i domen, jeden na linię',
|
||||
'proxy-scope-download': 'Pobierz',
|
||||
'proxy-scope-update-app': 'Aktualizacja aplikacji',
|
||||
'proxy-scope-update-trackers': 'Aktualizacja trackera',
|
||||
'proxy-tips': 'Pokaż instrukcję proxy',
|
||||
'bt-tracker': 'Trackery',
|
||||
'bt-tracker-input-tips': 'Trackery, jeden na linię',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Automatycznie sprawdzaj aktualizacje',
|
||||
'last-check-update-time': 'Ostatni raz kiedy sprawdzono aktualizację',
|
||||
'not-saved': 'Preferencje nie zostały zapisane',
|
||||
'not-saved-confirm': 'Zmienione preferencje zostaną utracone, czy na pewno chcesz wyjść?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Zmienione preferencje zostaną utracone, czy na pewno chcesz wyjść?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Mudar o Idioma',
|
||||
'hide-app-menu': 'Ocultar o Menu do App (Windows & Linux apenas)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Habilitar Proxy',
|
||||
'no-proxy-input-tips': 'Ignorar configurações de proxy para esses hosts e domínios, um por linha',
|
||||
'enable-proxy': 'Habilitar Proxy',
|
||||
'proxy-bypass-input-tips': 'Ignorar configurações de proxy para esses hosts e domínios, um por linha',
|
||||
'proxy-scope-download': 'Download',
|
||||
'proxy-scope-update-app': 'Atualizar Aplicativo',
|
||||
'proxy-scope-update-trackers': 'Atualizar rastreadores',
|
||||
'proxy-tips': 'Exibir manual do proxy',
|
||||
'bt-tracker': 'Rastreadores',
|
||||
'bt-tracker-input-tips': 'servidor rastreador, um por linha',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'A verificação automática de atualizações',
|
||||
'last-check-update-time': 'última verificação do tempo de atualização',
|
||||
'not-saved': 'Preferências não salvas',
|
||||
'not-saved-confirm': 'As preferências modificadas serão perdidas. Tem certeza de que deseja sair?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'As preferências modificadas serão perdidas. Tem certeza de que deseja sair?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Schimbă limba',
|
||||
'hide-app-menu': 'Ascundeți meniul aplicației (numai Windows și Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Activați Proxy',
|
||||
'no-proxy-input-tips': 'Ignorați setările proxy pentru aceste gazde și domenii, câte una pe fiecare linie',
|
||||
'enable-proxy': 'Activați Proxy',
|
||||
'proxy-bypass-input-tips': 'Ignorați setările proxy pentru aceste gazde și domenii, câte una pe fiecare linie',
|
||||
'proxy-scope-download': 'Descărcare',
|
||||
'proxy-scope-update-app': 'Actualizare aplicație',
|
||||
'proxy-scope-update-trackers': 'Actualizare Trackere',
|
||||
'proxy-tips': 'Vizualizați manualul proxy',
|
||||
'bt-tracker': 'Severe tracker (Torrent Tracker)',
|
||||
'bt-tracker-input-tips': 'Severe tracker, câte unul pe fiecare linie',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Verificați automat dacă sunt disponibile actualizări',
|
||||
'last-check-update-time': 'Ultima dată când au fost verificate actualizările disponibile',
|
||||
'not-saved': 'Preferințele nu au fost salvate',
|
||||
'not-saved-confirm': 'Preferințele modificate se vor pierde, sunteți sigur că plecați?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Preferințele modificate se vor pierde, sunteți sigur că plecați?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Сменить язык',
|
||||
'hide-app-menu': 'Скрыть меню приложения (только для Windows и Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Использовать Proxy',
|
||||
'no-proxy-input-tips': 'Обойти настройки прокси для этих хостов и доменов, по одному в строке',
|
||||
'enable-proxy': 'Использовать Proxy',
|
||||
'proxy-bypass-input-tips': 'Обойти настройки прокси для этих хостов и доменов, по одному в строке',
|
||||
'proxy-scope-download': 'Скачать',
|
||||
'proxy-scope-update-app': 'Обновить приложение',
|
||||
'proxy-scope-update-trackers': 'Обновить трекеры',
|
||||
'proxy-tips': 'Посмотреть руководство по прокси',
|
||||
'bt-tracker': 'Tracker Сервер',
|
||||
'bt-tracker-input-tips': 'Tracker сервера, один в строку',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Автоматически проверять обновления',
|
||||
'last-check-update-time': 'Последняя проверка на обновления прошла в',
|
||||
'not-saved': 'Настройки не сохранены',
|
||||
'not-saved-confirm': 'Измененные настройки будут потеряны, вы обязательно уйдете?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Измененные настройки будут потеряны, вы обязательно уйдете?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'เปลี่ยนภาษา',
|
||||
'hide-app-menu': 'ซ่อนเมนูแอป (Windows & Linux เท่านั้น)',
|
||||
'proxy': 'พร็อกซี่',
|
||||
'use-proxy': 'เปิดใช้งานพร็อกซี่',
|
||||
'no-proxy-input-tips': 'ข้ามการตั้งค่าพร็อกซีสำหรับโฮสต์และโดเมนเหล่านี้ หนึ่งรายการต่อบรรทัด',
|
||||
'enable-proxy': 'เปิดใช้งานพร็อกซี่',
|
||||
'proxy-bypass-input-tips': 'ข้ามการตั้งค่าพร็อกซีสำหรับโฮสต์และโดเมนเหล่านี้ หนึ่งรายการต่อบรรทัด',
|
||||
'proxy-scope-download': 'ดาวน์โหลด',
|
||||
'proxy-scope-update-app': 'อัปเดตแอปพลิเคชัน',
|
||||
'proxy-scope-update-trackers': 'อัปเดตแทร็กเกอร์',
|
||||
'proxy-tips': 'ดูคู่มือพร็อกซี',
|
||||
'bt-tracker': 'เซิร์ฟเวอร์ติดตาม',
|
||||
'bt-tracker-input-tips': 'เซิร์ฟเวอร์ตัวติดตาม หนึ่งตัวต่อบรรทัด',
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Dil değiştir',
|
||||
'hide-app-menu': 'Uygulama menüsünü göster (Windows & Linux için)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Proxy etkinleştir',
|
||||
'no-proxy-input-tips': 'Her bir satırda bir tane olacak şekilde bu Ana Bilgisayarlar ve Alanlar için proxy ayarlarını atlayın',
|
||||
'enable-proxy': 'Proxy etkinleştir',
|
||||
'proxy-bypass-input-tips': 'Her bir satırda bir tane olacak şekilde bu Ana Bilgisayarlar ve Alanlar için proxy ayarlarını atlayın',
|
||||
'proxy-scope-download': 'İndirme',
|
||||
'proxy-scope-update-app': 'Uygulamayı Güncelle',
|
||||
'proxy-scope-update-trackers': 'İzleyicileri Güncelle',
|
||||
'proxy-tips': 'Proxy Kılavuzunu Görüntüle',
|
||||
'bt-tracker': 'İzleyici Sunucular',
|
||||
'bt-tracker-input-tips': 'İzleyici sunucusu, her satıra bir tane',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Otomatik Kontrol Güncellemesi',
|
||||
'last-check-update-time': 'Son Kontrol Güncelleme Saati',
|
||||
'not-saved': 'Tercihler kaydedilmedi',
|
||||
'not-saved-confirm': 'Değiştirilen tercihler kaybolacak, ayrılacağınızdan emin misiniz?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Değiştirilen tercihler kaybolacak, ayrılacağınızdan emin misiniz?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Змінити мову',
|
||||
'hide-app-menu': 'Сховати меню додатка (Тільки для Windows та Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Застосувати Proxy',
|
||||
'no-proxy-input-tips': 'Обхід налаштувань проксі для цих хостів та доменів, по одному на рядок',
|
||||
'enable-proxy': 'Застосувати Proxy',
|
||||
'proxy-bypass-input-tips': 'Обхід налаштувань проксі для цих хостів та доменів, по одному на рядок',
|
||||
'proxy-scope-download': 'Завантажити',
|
||||
'proxy-scope-update-app': 'Оновити додаток',
|
||||
'proxy-scope-update-trackers': 'Оновити трекери',
|
||||
'proxy-tips': 'Перегляньте посібник з проксі',
|
||||
'bt-tracker': 'Tracker Сервер',
|
||||
'bt-tracker-input-tips': 'Tracker сервера, один в рядок',
|
||||
@@ -85,6 +88,5 @@ export default {
|
||||
'auto-check-update': 'Автоматично перевіряти оновлення',
|
||||
'last-check-update-time': 'В останнє оновлення перевірялось',
|
||||
'not-saved': 'Налаштування не збережено',
|
||||
'not-saved-confirm': 'Змінені параметри буде втрачено. Ви впевнені, що залишите?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Змінені параметри буде втрачено. Ви впевнені, що залишите?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': 'Thay đổi Ngôn ngữ',
|
||||
'hide-app-menu': 'Ẩn thanh Menu (Chỉ Windows & Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': 'Bật Proxy',
|
||||
'no-proxy-input-tips': 'Bỏ qua cài đặt proxy cho các Máy chủ và tên miền này, mỗi cái một dòng',
|
||||
'enable-proxy': 'Bật Proxy',
|
||||
'proxy-bypass-input-tips': 'Bỏ qua cài đặt proxy cho các Máy chủ và tên miền này, mỗi cái một dòng',
|
||||
'proxy-scope-download': 'Tải về',
|
||||
'proxy-scope-update-app': 'Cập nhật ứng dụng',
|
||||
'proxy-scope-update-trackers': 'Cập nhật theo dõi',
|
||||
'proxy-tips': 'Xem Proxy Thủ Công',
|
||||
'bt-tracker': 'Máy Chủ Tracker',
|
||||
'bt-tracker-input-tips': 'Máy chủ theo dõi, mỗi thông tin trên một dòng',
|
||||
@@ -86,6 +89,5 @@ export default {
|
||||
'auto-check-update': 'Tự động kiểm tra cập nhật',
|
||||
'last-check-update-time': 'Kiểm tra cập nhật lần cuối',
|
||||
'not-saved': 'Tùy chọn chưa được lưu',
|
||||
'not-saved-confirm': 'Các tùy chọn đã sửa đổi sẽ bị mất, bạn có chắc chắn thoát không?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': 'Các tùy chọn đã sửa đổi sẽ bị mất, bạn có chắc chắn thoát không?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': '切换语言',
|
||||
'hide-app-menu': '隐藏菜单栏(仅支持 Windows 和 Linux)',
|
||||
'proxy': '代理',
|
||||
'use-proxy': '使用代理服务器',
|
||||
'no-proxy-input-tips': '忽略这些主机与域的代理设置,一行一个',
|
||||
'enable-proxy': '使用代理服务器',
|
||||
'proxy-bypass-input-tips': '忽略这些主机与域的代理设置,一行一个',
|
||||
'proxy-scope-download': '下载',
|
||||
'proxy-scope-update-app': '更新应用程序',
|
||||
'proxy-scope-update-trackers': '更新 Tracker 列表',
|
||||
'proxy-tips': '查看代理配置说明',
|
||||
'bt-tracker': 'Tracker 服务器',
|
||||
'bt-tracker-input-tips': 'Tracker 服务器,一行一个',
|
||||
@@ -89,6 +92,5 @@ export default {
|
||||
'follow-metalink': '自动开始下载磁力链接、种子内的文件',
|
||||
'follow-torrent': '种子下载完后自动下载种子内容',
|
||||
'not-saved': '设置未保存',
|
||||
'not-saved-confirm': '已修改的设置将会丢失,确定要离开吗?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': '已修改的设置将会丢失,确定要离开吗?'
|
||||
}
|
||||
|
||||
@@ -48,8 +48,11 @@ export default {
|
||||
'change-language': '更改語言',
|
||||
'hide-app-menu': '隱藏選單列(僅支援 Windows 和 Linux)',
|
||||
'proxy': 'Proxy',
|
||||
'use-proxy': '使用 Proxy',
|
||||
'no-proxy-input-tips': '忽略這些主機與網域的 Proxy 設定,一列一個',
|
||||
'enable-proxy': '使用 Proxy',
|
||||
'proxy-bypass-input-tips': '忽略這些主機與網域的 Proxy 設定,一列一個',
|
||||
'proxy-scope-download': '下載',
|
||||
'proxy-scope-update-app': '更新應用程式',
|
||||
'proxy-scope-update-trackers': '更新 Tracker 列表',
|
||||
'proxy-tips': '查看 Proxy 配置手冊',
|
||||
'bt-tracker': 'Tracker 伺服器',
|
||||
'bt-tracker-input-tips': 'Tracker 伺服器,一列一個',
|
||||
@@ -87,6 +90,5 @@ export default {
|
||||
'auto-check-update': '自動檢查更新',
|
||||
'last-check-update-time': '上次檢查更新時間',
|
||||
'not-saved': '設定未儲存',
|
||||
'not-saved-confirm': '已修改的設定將會丟失,確定要離開嗎?',
|
||||
'speed-units': "Change Units"
|
||||
'not-saved-confirm': '已修改的設定將會丟失,確定要離開嗎?'
|
||||
}
|
||||
|
||||
@@ -1,15 +1,55 @@
|
||||
import { isEmpty } from 'lodash'
|
||||
import axios from 'axios'
|
||||
import { MAX_BT_TRACKER_LENGTH } from '@shared/constants'
|
||||
import { MAX_BT_TRACKER_LENGTH, ONE_SECOND, PROXY_SCOPES } from '@shared/constants'
|
||||
|
||||
export const fetchBtTrackerFromSource = async (source) => {
|
||||
export const convertToAxiosProxy = (proxyServer = '') => {
|
||||
if (!proxyServer) {
|
||||
return
|
||||
}
|
||||
|
||||
const url = new URL(proxyServer)
|
||||
const { username, password, protocol = 'http:', hostname, port } = url
|
||||
|
||||
let result = {
|
||||
protocol: protocol.replace(':', ''),
|
||||
host: hostname,
|
||||
port
|
||||
}
|
||||
|
||||
const auth = username || password
|
||||
? {
|
||||
username,
|
||||
password
|
||||
}
|
||||
: undefined
|
||||
|
||||
if (auth) {
|
||||
result = {
|
||||
...result,
|
||||
auth
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
export const fetchBtTrackerFromSource = async (source, proxyConfig = {}) => {
|
||||
if (isEmpty(source)) {
|
||||
return []
|
||||
}
|
||||
|
||||
const now = Date.now()
|
||||
const promises = source.map((url) => {
|
||||
return axios.get(`${url}?t=${now}`).then((value) => value.data)
|
||||
const { enable, server, scope = [] } = proxyConfig
|
||||
const proxy = enable && server && scope.includes(PROXY_SCOPES.UPDATE_TRACKERS)
|
||||
? convertToAxiosProxy(server)
|
||||
: undefined
|
||||
|
||||
// Axios's config.proxy is Node.js only
|
||||
const promises = source.map(async (url) => {
|
||||
return axios.get(`${url}?t=${now}`, {
|
||||
timeout: 30 * ONE_SECOND,
|
||||
proxy
|
||||
}).then((value) => value.data)
|
||||
})
|
||||
|
||||
const results = await Promise.allSettled(promises)
|
||||
|
||||
Reference in New Issue
Block a user