/// import { ConnectUser, ProxyMode } from "../types"; import Cipher from "../core/cipher"; export type Headers = { host: string; port: number; }; export declare function isAigo(chunk: Buffer): boolean; export declare function parseConnectHeaders(data: string): Headers; export declare const clientBuild: { buildStep1: () => void; buildStep2: () => void; buildStep3: () => void; }; export declare function buildClientInfo(host: string, port: number): Buffer; /** * 发送生成用户认证的数据 * @param data */ export declare function sendAuth(data: { mode: ProxyMode; username: string; password: string; }): Buffer; export declare const negotiator: { client: { step1(): { data: Buffer; face: number; }; /** 第一步检测,检测握手连接是否可以 */ step1Check(data: Buffer): boolean; step2(options: { username?: string; password?: string; mode?: number; }): Buffer; /** 第二步检验, 检验用户/密码/密钥是否会正常 */ step2Check(data: Buffer): boolean; }; server: { step1(data: Buffer): { data: Buffer; face: number; }; step2Info(data: Buffer): ConnectUser; step2(data: Buffer): { username: string; password: string; args: string[]; data: Buffer; cipher: Cipher; }; }; };