diff --git a/src/containers/Proxies/components/Group/style.scss b/src/containers/Proxies/components/Group/style.scss index 7ad0e4c..fd944bf 100644 --- a/src/containers/Proxies/components/Group/style.scss +++ b/src/containers/Proxies/components/Group/style.scss @@ -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; diff --git a/src/models/Proxy.ts b/src/models/Proxy.ts index b13e145..d150255 100644 --- a/src/models/Proxy.ts +++ b/src/models/Proxy.ts @@ -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 - } diff --git a/src/stores/ConfigStore.ts b/src/stores/ConfigStore.ts index 8f452cd..b6a646e 100644 --- a/src/stores/ConfigStore.ts +++ b/src/stores/ConfigStore.ts @@ -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))