tsproxy
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

tsproxy is Typescript http and socks proxy server with authentication

Install

# Globally via npm
npm install -g tsproxy

# As a dependency in your npm package:
npm install --save tsproxy

Usage

$ tsproxy --help

  Usage: tsproxy [options] <url>

  Examples:
    tsproxy http                           - run http proxy on 0.0.0.0 host with 8080 port
    tsproxy socks                          - run socks proxy on 0.0.0.0 host with 1080 port
    tsproxy http://127.0.0.0:8888          - run http proxy
    tsproxy socks://user@pass:0.0.0.0:4444 - run socks proxy with authentication

  Arguments:
    url            url to listen or http/socks word

  Options:
    -v, --verbose  verbosity that can be increased (ex: -vvvv)
    -h, --help     display help for command

Running on-demand

Using npx you can run the script without installing it first:

npx tsproxy http://0.0.0.0:8888

Library

import { HttpProxyServer, SocksProxyServer } from 'tsproxy';

const server = new HttpProxyServer({
    auth: {
        username: 'bob',
        password: 'pass',
    },
    verbose: true,
});

(async () => {
    await server.listen();
})();

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.40latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.40
1.0.31
1.0.20

Package Sidebar

Install

npm i tsproxy

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

110 kB

Total Files

30

Last publish

Collaborators

  • ilya7u