helpers.d.ts 829 B

1234567891011121314151617
  1. /// <reference types="node" />
  2. import { SocksClientOptions, SocksClientChainOptions } from '../client/socksclient';
  3. /**
  4. * Validates the provided SocksClientOptions
  5. * @param options { SocksClientOptions }
  6. * @param acceptedCommands { string[] } A list of accepted SocksProxy commands.
  7. */
  8. declare function validateSocksClientOptions(options: SocksClientOptions, acceptedCommands?: string[]): void;
  9. /**
  10. * Validates the SocksClientChainOptions
  11. * @param options { SocksClientChainOptions }
  12. */
  13. declare function validateSocksClientChainOptions(options: SocksClientChainOptions): void;
  14. export { validateSocksClientOptions, validateSocksClientChainOptions };
  15. export declare function ipv4ToInt32(ip: string): number;
  16. export declare function int32ToIpv4(int32: number): string;
  17. export declare function ipToBuffer(ip: string): Buffer;