UNPKG

@remnawave/xtls-sdk

Version:

A Typescript SDK for XRAY (XTLS) Core GRPC Api

54 lines 2.27 kB
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { ServerEndpoint } from "../../common/protocol/server_spec"; export declare const protobufPackage = "xray.proxy.http"; export interface Account { $type: "xray.proxy.http.Account"; username: string; password: string; } /** Config for HTTP proxy server. */ export interface ServerConfig { $type: "xray.proxy.http.ServerConfig"; accounts: { [key: string]: string; }; allowTransparent: boolean; userLevel: number; } export interface ServerConfig_AccountsEntry { $type: "xray.proxy.http.ServerConfig.AccountsEntry"; key: string; value: string; } export interface Header { $type: "xray.proxy.http.Header"; key: string; value: string; } /** ClientConfig is the protobuf config for HTTP proxy client. */ export interface ClientConfig { $type: "xray.proxy.http.ClientConfig"; /** Sever is a list of HTTP server addresses. */ server: ServerEndpoint | undefined; header: Header[]; } export declare const Account: MessageFns<Account, "xray.proxy.http.Account">; export declare const ServerConfig: MessageFns<ServerConfig, "xray.proxy.http.ServerConfig">; export declare const ServerConfig_AccountsEntry: MessageFns<ServerConfig_AccountsEntry, "xray.proxy.http.ServerConfig.AccountsEntry">; export declare const Header: MessageFns<Header, "xray.proxy.http.Header">; export declare const ClientConfig: MessageFns<ClientConfig, "xray.proxy.http.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