39 lines
1.3 KiB
TypeScript
39 lines
1.3 KiB
TypeScript
/**
|
|
* LOCO Booking — connects to booking-loco.kakao.com:443 over TLS,
|
|
* performs LOCO RSA handshake, sends GETCONF, and returns checkin server info.
|
|
*
|
|
* Flow (based on kiwitalk reference):
|
|
* 1. TLS connect to booking-loco.kakao.com:443
|
|
* 2. LOCO RSA handshake (encrypt AES session key)
|
|
* 3. Send GETCONF command → receive checkin server list
|
|
* 4. Disconnect
|
|
*/
|
|
export interface GetConfRequest {
|
|
os: string;
|
|
MCCMNC: string;
|
|
model: string;
|
|
}
|
|
export interface GetConfResponse {
|
|
/** Checkin host list (v2sl) */
|
|
checkinHosts: string[];
|
|
/** Checkin host list (lsl - preferred) */
|
|
checkinHostsLsl: string[];
|
|
/** Available ports */
|
|
ports: number[];
|
|
/** Full raw response for debugging */
|
|
raw: Record<string, unknown>;
|
|
}
|
|
/**
|
|
* Connect to the booking server via TLS + LOCO protocol,
|
|
* send GETCONF, and return checkin server information.
|
|
*/
|
|
export declare function fetchBookingServer(serverPublicKey: string, req: GetConfRequest): Promise<GetConfResponse>;
|
|
/**
|
|
* Convenience function: booking → pick first checkin host + port.
|
|
* Returns { host, port } ready for checkin connection.
|
|
*/
|
|
export declare function resolveCheckinServer(serverPublicKey: string, req: GetConfRequest, fallbackHost?: string, fallbackPort?: number): Promise<{
|
|
host: string;
|
|
port: number;
|
|
}>;
|
|
//# sourceMappingURL=booking.d.ts.map
|