Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hap-proxy

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hap-proxy

An HAP proxy tool written in Typescript

  • 0.3.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
47
decreased by-59.13%
Maintainers
1
Weekly downloads
 
Created
Source

hap-proxy

hap-proxy is a transparent proxy for the HomeKit Accessory Protocol (HAP). On the one hand it acts as an HomeKit accessory and exposes and HAP server (to which you would connect to) and on the other hand it acts as an HomeKit controller to an existing HomeKit accessory. hap-proxy is compliant with hap v1.1.0 meaning it is also capable of proxying HomeKit Data Streams (v1.0) used for HomeKit Remotes and Secure Video.

hap-proxy is currently work in progress and definitely not finished. Currently the ambition of the project is to have an hap proxy which can be used for research and reverse engineering. The goal is that hap-proxy outputs the communication made between the HomeKit controller (iOS device etc) and the proxied accessory in an format like pcap.

If there is interest I could imagine adding functionality which could be helpful to more people. For example features like integrating one HomeKit accessory into multiple HomeKit homes or adding some kind of plugin based filtering, which could be used to alter behaviour of certified HomeKit accessories or adding custom capabilities programmatically to certified HomeKit accessories. Hit me up if you are interested or have any additional ideas.

Installation

sudo npm install -g hap-proxy

Command Line

When installing hap-proxy globally the command-line program hap-proxy will be added to your system.
Running hap-proxy -h will display the following help menu:

Usage: hap-proxy [options]

Options:
  -V, --version                      output the version number
  -p, --port <port>                  define the proxy port (default: 60141)
  -t, --target-name <instance name>  define the instance name of the device which should be proxied
  -c, --target-pincode <pincode>     define the pincode with dashes of the homekit device to be proxied
  --proxy-pincode <pincode>          define a separate pincode for the proxy server
  -h, --help                         display help for command

When you want to proxy an existing homekit device you must first ensure that the device is unpaired and added to you Wi-Fi.

In order to start up a basic proxy you must supply --target-name and target-pincode.
The first name give the Instance Name of the accessory. The easiest way to get that is to open the Home App, open the pairing menu and copy the name of the desired accessory.

The target pincode is the pincode of the HomeKit accessory. If --proxy-pincode is not defined the proxy server will use the same pincode.

API

Once I reached a point where the API can be considered stable I'm gonna update this section.

Notes

This project is heavily inspired by the code base of HAP-NodeJS (most of the encryption and decryption layers) and hap-client.

FAQs

Package last updated on 08 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc