UNPKG

surgio

Version:

Generating rules for Surge, Clash, Quantumult like a PRO

41 lines (40 loc) 1.51 kB
import { ShadowsocksNodeConfig, SsdProviderConfig, SubscriptionUserinfo } from '../types'; import Provider from './Provider'; import { DefaultProviderRequestHeaders, GetNodeListFunction, GetNodeListV2Function, GetSubscriptionUserInfoFunction } from './types'; export default class SsdProvider extends Provider { #private; readonly udpRelay?: boolean; constructor(name: string, config: SsdProviderConfig); get url(): string; getSubscriptionUserInfo: GetSubscriptionUserInfoFunction; getNodeList: GetNodeListFunction; getNodeListV2: GetNodeListV2Function; } export declare const getSsdSubscription: (url: string, requestHeaders: DefaultProviderRequestHeaders, cacheKey: string, udpRelay?: boolean) => Promise<{ readonly nodeList: Array<ShadowsocksNodeConfig>; readonly subscriptionUserInfo?: SubscriptionUserinfo; }>; export declare const parseSsdConfig: (globalConfig: SsdSubscription, server: SsdServer, udpRelay?: boolean) => ShadowsocksNodeConfig | undefined; export interface SsdSubscription { airport: string; port: number; encryption: string; password: string; servers: ReadonlyArray<SsdServer>; plugin?: string; plugin_options?: string; traffic_used?: number; traffic_total?: number; expiry?: string; } export interface SsdServer { server: string; port?: number; encryption?: string; password?: string; plugin?: string; plugin_options?: string; id?: number; remarks?: string; ratio?: number; }