mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 05:51:56 +08:00
Feat: support load-balance
This commit is contained in:
parent
bf6299a79d
commit
78053e77cf
@ -23,7 +23,7 @@
|
||||
display: block;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
width: 80px;
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
background-color: $color-primary-dark;
|
||||
color: #fff;
|
||||
|
@ -29,7 +29,6 @@ export interface ShadowsocksProxy {
|
||||
obfs?: string
|
||||
|
||||
'obfs-host'?: string
|
||||
|
||||
}
|
||||
|
||||
export const VmessProxyConfigList = [
|
||||
@ -51,7 +50,6 @@ export interface VmessProxy {
|
||||
cipher?: string
|
||||
|
||||
tls?: boolean
|
||||
|
||||
}
|
||||
|
||||
export const Socks5ProxyConfigList = ['name', 'type', 'server', 'port']
|
||||
@ -63,10 +61,9 @@ export interface Socks5Proxy {
|
||||
server?: string
|
||||
|
||||
port?: number
|
||||
|
||||
}
|
||||
|
||||
export type ProxyGroup = SelectProxyGroup & UrlTestProxyGroup & FallbackProxyGroup
|
||||
export type ProxyGroup = SelectProxyGroup & UrlTestProxyGroup & FallbackProxyGroup & LoadBalanceGroup
|
||||
|
||||
export interface SelectProxyGroup {
|
||||
name?: string
|
||||
@ -74,7 +71,14 @@ export interface SelectProxyGroup {
|
||||
type?: 'select'
|
||||
|
||||
proxies?: string[] // proxy names
|
||||
}
|
||||
|
||||
export interface LoadBalanceGroup {
|
||||
name?: string
|
||||
|
||||
type?: 'load-balance'
|
||||
|
||||
proxies?: string[] // proxy names
|
||||
}
|
||||
|
||||
export interface FallbackProxyGroup {
|
||||
@ -87,7 +91,6 @@ export interface FallbackProxyGroup {
|
||||
url?: string
|
||||
|
||||
interval?: number // second
|
||||
|
||||
}
|
||||
|
||||
export interface UrlTestProxyGroup {
|
||||
@ -100,5 +103,4 @@ export interface UrlTestProxyGroup {
|
||||
url?: string
|
||||
|
||||
interval?: number // second
|
||||
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ export class ConfigStore {
|
||||
allowLan: general['allow-lan']
|
||||
}
|
||||
|
||||
const policyGroup = new Set(['Selector', 'URLTest', 'Fallback'])
|
||||
const policyGroup = new Set(['Selector', 'URLTest', 'Fallback', 'LoadBalance'])
|
||||
const unUsedProxy = new Set(['DIRECT', 'REJECT', 'GLOBAL'])
|
||||
const proxies = Object.keys(rawProxies.data.proxies)
|
||||
.filter(key => !unUsedProxy.has(key))
|
||||
|
Loading…
x
Reference in New Issue
Block a user