An open API service indexing awesome lists of open source software.

https://github.com/stacksjs/localtunnels

πŸš‡ A simple and smart tunneling alternative. Without or with self-hosting.
https://github.com/stacksjs/localtunnels

dev-tool expose local-development localtunnel ngrok tunnel

Last synced: about 2 months ago
JSON representation

πŸš‡ A simple and smart tunneling alternative. Without or with self-hosting.

Awesome Lists containing this project

README

          

Social Card of this repo

[![npm version][npm-version-src]][npm-version-href]
[![GitHub Actions][github-actions-src]][github-actions-href]
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

# localtunnels

> A zero-config local tunnel that's simple, lightweight, and secure.

## Features

- Simple, lightweight local tunnel
- Security built-in, including HTTPS
- IAC, self-hostable _(via AWS)_
- Custom subdomains
- CLI & Library

## Install

```sh
bun install -d localtunnels
```

## Get Started

There are two ways of using this local tunnel: _as a library or as a CLI._

### Library

Given the npm package is installed:

```ts
import type { LocalTunnelConfig } from 'localtunnels'
import { startLocalTunnel } from 'localtunnels'

const config: LocalTunnelConfig = {
from: 'localhost:5173',
domain: 'stacksjs.dev', // optional, defaults to the stacksjs.dev domain
subdomain: 'test', // optional, uses a random subdomain by default
verbose: true, // optional, defaults to false
}

startLocalTunnel(config)
```

You may als use a configuration file:

```ts
// tunnel.config.{ts,js}
import type { LocalTunnelConfig } from '@stacksjs/localtunnels'

const config: LocalTunnelConfig = {
from: 'localhost:5173',
domain: 'stacksjs.dev', // optional, defaults to the stacksjs.dev domain
subdomain: 'test', // optional, uses a random subdomain by default
verbose: true, // optional, defaults to false
}

export default config
```

_Then run:_

```sh
./localtunnels start
```

### CLI

```sh
localtunnels start --from localhost:5173 --subdomain test --verbose
localtunnels --help
localtunnels --version
```

To learn more, head over to the [documentation](https://localtunnels.sh/).

## Testing

```sh
bun test
```

## Changelog

Please see our [releases](https://github.com/stacksjs/localtunnels/releases) page for more information on what has changed recently.

## Contributing

Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.

## Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

[Discussions on GitHub](https://github.com/stacksjs/stacks/discussions)

For casual chit-chat with others using this package:

[Join the Stacks Discord Server](https://discord.gg/stacksjs)

## Postcardware

β€œSoftware that is free, but hopes for a postcard.” We love receiving postcards from around the world showing where `localtunnels` is being used! We showcase them on our website too.

Our address: Stacks.js, 12665 Village Ln #2306, Playa Vista, CA 90094, United States 🌎

## Sponsors

We would like to extend our thanks to the following sponsors for funding Stacks development. If you are interested in becoming a sponsor, please reach out to us.

- [JetBrains](https://www.jetbrains.com/)
- [The Solana Foundation](https://solana.com/)

## Credits

- [Chris Breuer](https://github.com/chrisbbreuer)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.

Made with πŸ’™

[npm-version-src]: https://img.shields.io/npm/v/localtunnels?style=flat-square
[npm-version-href]: https://npmjs.com/package/localtunnels
[github-actions-src]: https://img.shields.io/github/actions/workflow/status/stacksjs/localtunnels/ci.yml?style=flat-square&branch=main
[github-actions-href]: https://github.com/stacksjs/localtunnels/actions?query=workflow%3Aci