npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@hap-server/remote-access

v0.1.0

Published

Secure remote access to hap-server and Homebridge web interfaces.

Downloads

7

Readme

hap-server Remote Access

This repository contains:

  • The tunnel server library,
  • The plugin for hap-server and Homebridge Config UI to connect to the tunnel server and
  • A command line program to register with the tunnel server.

See docs/protocol.md for more information about the tunnel protocol.

Installing with hap-server

npm install --global @hap-server/remote-access

Installing with Homebridge

As Homebridge doesn't support loading scoped packages as plugins you need to install an additional package to load it.

npm install --global @hap-server/remote-access homebridge-remote-access

Registration

TODO

  1. Create an account on the tunnel server

    You will be asked to enter an email address when registering. You may need to prove you have access to emails sent to this address.

    hapserver-tunnel-setup register > cert-key.pem
    hapserver-tunnel-setup register hapserver-tunnel.fancy.org.uk#pk=... > cert-key.pem

    This will generate a CSR and wait for the server to generate a certificate. At this point the server may ask for additional verification (e.g. validating an email address).

    Once the server has generated a certificate it will be saved to cert-key.pem with the private key. Move this somewhere that hap-server/Homebridge will be able to read. The registration command will also generate a URL with the certificate.

    When configuring hap-server/Homebridge or registering a hostname you can use either:

    • A URL with cert and key parameters:

      hapserver-tunnel.fancy.org.uk#pk={hex encoded server record signing key}&cert={base64 encoded PEM encoded client certificate}&key={base64 encoded PEM encoded client private key}
    • Or, a URL with cf (and optional pkf) parameters:

      hapserver-tunnel.fancy.org.uk#pk={hex encoded server record signing key}&cf={path to PEM encoded client certificate and private key (cert-key.pem)}
  2. Register a hostname

    Replace $URL with the URL from the previous command.

    hapserver-tunnel-setup "$URL" add-hostname example.hapserver-tunnel.fancy.org.uk

    hap-server or your Homebridge server will be accessible at https://example.hapserver-tunnel.fancy.org.uk once hap-server/Homebridge is configured.

    The domains you can use depends on the tunnel server you're using. To list the domains you can use run the list-domains command:

    hapserver-tunnel-setup "$URL" list-domains

hap-server configuration

Add this to your configuration file with the tunnel server address and hostname from registration. The tunnel server address includes authentication data.

plugins:
    @hap-server/remote-access:
        server: hapserver-tunnel.fancy.org.uk#pk=...&cf=.../path/to/cert-key.pem
        hostname: example.hapserver-tunnel.fancy.org.uk

        # All certbot options are optional except `certbot_agree_tos` which must be set to `true`
        # If `certbot` can't be found with the PATH environment variable `certbot_path` must be set
        # certbot_path: /usr/local/bin/certbot
        # certbot_data_path: /path/to/store/certbot/data
        # certbot_acme_server: https://acme-v02.api.letsencrypt.org/directory
        certbot_agree_tos: true
        # certbot_email_address: [email protected]

Homebridge configuration

Add this to your configuration file with the tunnel server address and hostname from registration. The tunnel server address includes authentication data.

Replace 8080 with the web interface port if you have changed this or aren't using Homebridge Config UI X.

{
    "platforms": [
        {
            "platform": "remote-access.TunnelServiceConfiguration",
            "server": "hapserver-tunnel.fancy.org.uk#pk=...&cf=.../path/to/cert-key.pem",
            "hostname": "example.hapserver-tunnel.fancy.org.uk",
            "proxy": {
                "port": 8080
            },
            "certbot_agree_tos": true
        }
    ]
}

To prevent using Homebridge Config UI X without using the tunnel service set the host option to ::1.

{
    "platforms": [
        {
            "platform": "config",
            ...
            "host": "::1"
        }
    ]
}