All Projects → Akryum → portless

Akryum / portless

Licence: MIT license
Easy local domains with superpowers

Programming Languages

typescript
32286 projects
EJS
674 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to portless

Pyngrok
A Python wrapper for ngrok
Stars: ✭ 159 (+50%)
Mutual labels:  ngrok, localhost
Hiproxy
🛠 hiproxy is a lightweight proxy tool for Front-End developers based on Node.js that supports an NGINX-like configuration. 🔥
Stars: ✭ 629 (+493.4%)
Mutual labels:  https, hosts
Ngrok
Expose your localhost to the web. Node wrapper for ngrok.
Stars: ✭ 1,897 (+1689.62%)
Mutual labels:  ngrok, localhost
Host
Expose your LocalHost with this tool
Stars: ✭ 268 (+152.83%)
Mutual labels:  ngrok, localhost
Fenix
A simple and visual static web server with collaboration features.
Stars: ✭ 1,559 (+1370.75%)
Mutual labels:  https, localhost
Mkcert
A simple zero-config tool to make locally trusted development certificates with any names you'd like.
Stars: ✭ 33,022 (+31052.83%)
Mutual labels:  https, localhost
Localdots
HTTPS domains for localhost. 🏠
Stars: ✭ 486 (+358.49%)
Mutual labels:  https, localhost
Sish
HTTP(S)/WS(S)/TCP Tunnels to localhost using only SSH.
Stars: ✭ 2,087 (+1868.87%)
Mutual labels:  https, ngrok
Serve
Simple http server for localhost development with a flags for enabling gzip and http2
Stars: ✭ 93 (-12.26%)
Mutual labels:  https, localhost
Pric
Simple zero-config tool to create Private Certificate Authority & issue locally-trusted development server certificates with any domain names you'd like. SSL certificates for development purposes.
Stars: ✭ 87 (-17.92%)
Mutual labels:  https, localhost
Https Localhost
HTTPS server running on localhost
Stars: ✭ 122 (+15.09%)
Mutual labels:  https, localhost
docker-nginx-certbot
Automatically create and renew website certificates for free using the Let's Encrypt certificate authority.
Stars: ✭ 367 (+246.23%)
Mutual labels:  https, localhost
pki
Certificate Authority management suite
Stars: ✭ 23 (-78.3%)
Mutual labels:  https
hosts
My hosts file, filled with advertisers and other purveyors of worthless content.
Stars: ✭ 20 (-81.13%)
Mutual labels:  hosts
aiotunnel
HTTP tunnel on top of aiohttp and asyncio
Stars: ✭ 29 (-72.64%)
Mutual labels:  https
starter-NodeJS
Recast.AI official starter-kit for NodeJS
Stars: ✭ 22 (-79.25%)
Mutual labels:  ngrok
docker-symfony
Docker Symfony (PHP-FPM - NGINX - MySQL - MailHog - Redis - RabbitMQ)
Stars: ✭ 32 (-69.81%)
Mutual labels:  ngrok
turk-adlist
Ad servers list to block ads on Turkish websites.
Stars: ✭ 38 (-64.15%)
Mutual labels:  hosts
portsscan
A web client port-scanner written in GO, that supports the WASM/WASI interface for Browser WebAssembly runtime execution.
Stars: ✭ 68 (-35.85%)
Mutual labels:  localhost
dohjs
DNS over HTTPS client for use in the browser
Stars: ✭ 71 (-33.02%)
Mutual labels:  https

portless

Easy local domains with superpowers

  • Create virtual local hosts (with https)
  • Expose public hosts with ngrok
  • Automatic certificates with Let's Encrypt for public hosts
  • Automatic URL rewriting in resources sent over the network
  • Automatic Cookie rewriting
  • Background daemon

Installation

npm i -g @portless/cli

# OR

yarn global add @portless/cli

Configuration

Create a portless.config.js file in your project root:

const pkg = require('./package.json')

module.exports = {
  // Project name
  projectName: pkg.name,

  // Define your domains here
  domains: [
    {
      id: 'app',
      public: 'app.ngrok.acme.com',
      local: 'app.acme.local',
      target: 'localhost:4000',
    },
    {
      id: 'graphql',
      public: 'graphql.ngrok.acme.com',
      local: 'graphql.acme.local',
      target: 'localhost:4100',
    },
  ],

  // Corporate proxy (optional)
  targetProxy: 'http://acme.com/proxy',

  // Enable Let's Encrypt automatic certificates (optional)
  greenlock: {
    configDir: './config/greenlock',
    packageAgent: `${pkg.name}/${pkg.version}`,
    maintainerEmail: '[email protected]',
    // Use Let's Encrypt staging servers
    staging: true,
  },

  // Enable ngrok (optional)
  ngrok: {
    authtoken: '...',
    region: 'eu',
  },
}

Start the daemon (it will auto-start on login):

portless start

Add http://localhost:5656/proxy.pac to your network proxy settings.

Register your project (current folder):

portless add

Refresh your project if you changed the configuration:

portless refresh

Stop and uninstall the daemon:

portless stop

URL rewriting

You application should be setup to use your typical localhost URLs. Portless will take care of modifying them automatically on any resource sent via the network.

For example, if you expose your webpack dev server on http://localhost:8080, with the following domain in the config file:

{
  id: 'webpack',
  public: 'webpack.local.acme.com',
  local: 'webpack.acme.local',
  target: 'localhost:8080'
}

Portless will automatically rewrite the URLs to either webpack.local.acme.com or webpack.acme.local depending on the request host.

Special syntax

You can also use http://graphql.portless (with you domain id and the .portless extension) in your source code:

fetch('http://graphql.portless')

With the following domain configuration:

{
  id: 'graphql',
  public: 'graphql.local.acme.com',
  local: 'graphql.acme.local',
  target: 'localhost:4000'
}

Portless will automatically rewrite it too! If the request is coming from webpack.local.acme.com, it will transform your code to:

fetch('http://graphql.local.acme.com')

And if the request comes from webpack.acme.local, it will rewrite it to:

fetch('http://graphql.acme.local')

HTTPS rewriting

Portless will also make sure all your referenced URLs are either all in http or all in https depending on the request host.

For example, if the request is made from https://webpack.acme.local, it will rewrite your code with an https:

fetch('https://graphql.acme.local')

Sponsors

sponsors logos

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].