mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-17 00:04:50 +03:00
27 lines
652 B
TypeScript
27 lines
652 B
TypeScript
declare module 'socksv5' {
|
|
import type net from 'net';
|
|
|
|
class Auth { }
|
|
|
|
class SocksServer {
|
|
listen: net.Server['listen'];
|
|
useAuth(auth: Auth): void;
|
|
close: net.Server['close'];
|
|
}
|
|
|
|
type Info = {
|
|
srcAddr: string;
|
|
srcPort: number;
|
|
dstAddr: string;
|
|
dstPort: number;
|
|
}
|
|
|
|
function acceptHandler(intercept: true): net.Socket | undefined;
|
|
function acceptHandler(intercept: false): undefined;
|
|
export function createServer(cb: (info: Info, accept: typeof acceptHandler, deny: () => void) => void): SocksServer;
|
|
|
|
export const auth: {
|
|
None: () => Auth
|
|
};
|
|
}
|