UNPKG

@localzet/xtls-sdk

Version:

TypeScript SDK for XRAY/AURA Core

49 lines 2.07 kB
import { BinaryReader, BinaryWriter } from '@bufbuild/protobuf/wire'; import { Network } from '../../common/net/network'; import { ServerEndpoint } from '../../common/protocol/server_spec'; import { User } from '../../common/protocol/user'; export declare const protobufPackage = "xray.proxy.shadowsocks"; export declare enum CipherType { UNKNOWN = 0, AES_128_GCM = 5, AES_256_GCM = 6, CHACHA20_POLY1305 = 7, XCHACHA20_POLY1305 = 8, NONE = 9, UNRECOGNIZED = -1 } export declare function cipherTypeFromJSON(object: any): CipherType; export declare function cipherTypeToJSON(object: CipherType): string; export interface Account { $type: 'xray.proxy.shadowsocks.Account'; password: string; cipherType: CipherType; ivCheck: boolean; } export interface ServerConfig { $type: 'xray.proxy.shadowsocks.ServerConfig'; users: User[]; network: Network[]; } export interface ClientConfig { $type: 'xray.proxy.shadowsocks.ClientConfig'; server: ServerEndpoint[]; } export declare const Account: MessageFns<Account, 'xray.proxy.shadowsocks.Account'>; export declare const ServerConfig: MessageFns<ServerConfig, 'xray.proxy.shadowsocks.ServerConfig'>; export declare const ClientConfig: MessageFns<ClientConfig, 'xray.proxy.shadowsocks.ClientConfig'>; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { [K in Exclude<keyof T, '$type'>]?: DeepPartial<T[K]>; } : Partial<T>; export interface MessageFns<T, V extends string> { readonly $type: V; encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create(base?: DeepPartial<T>): T; fromPartial(object: DeepPartial<T>): T; } export {}; //# sourceMappingURL=config.d.ts.map