Skip to content

Instantly share code, notes, and snippets.

@b12f
Last active March 1, 2018 16:40
Show Gist options
  • Save b12f/cf35187c378fec4251f9585c05eb4f2c to your computer and use it in GitHub Desktop.
Save b12f/cf35187c378fec4251f9585c05eb4f2c to your computer and use it in GitHub Desktop.
tor-request TypeScript d.ts file based on https://www.npmjs.com/package/tor-request#api
import * as request from 'request';
declare module 'tor-request' {
export function request(url: string, options?: request.CoreOptions, cb?: request.RequestCallback): void;
export function setTorAddress(ipaddress: string, port: number): void;
interface ITorControlPort {
password: string;
host: string;
port: number;
send: (commands: string[], done: (err: Error, data: any) => void) => void;
}
export const TorControlPort: ITorControlPort;
export function newTorSession(done: (err: Error) => void): void;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment