dfinity / http-proxy

Proof of concept implementation of the IC HTTP Gateway Protocol that enables end-to-end secure connections with dApps being served from the internet computer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ICP HTTP Proxy

This application is currently only a proof of concept implementation and should be used at your own risk.

Overview

An implementation of the ICP HTTP Gateway Protocol that enables end-to-end secure connections with dApps being served from the Internet Computer.

Motivation and Goals

  • Connect to the ICP network without the need for any trusted intermediaries.

  • Verify HTTP responses received from the ICP network for authenticity.

  • Resist censorship by bypassing traditional DNS infrastructure.

  • Enable resolution of crypto domains (not implemented yet).

Key Features

  • Translate between ICP API calls and HTTP Asset Requests.

  • Terminate TLS connections locally with a self-generated root certificate authority.

  • Detect IC domains from principals and custom domain DNS records.

  • Bypass remote HTTP gateway denylists.

Supported Platforms

  • Windows

  • MacOSX

  • Debian

Other platforms can also be supported by adding the generated root certificate to the device's trusted store and adding the proxy HTTP server to the active network interface configuration.

Installation

To install the ICP HTTP Proxy, you can follow these steps:

  1. Choose the appropriate installation package for your operating system:

  2. Download the installation package for your operating system.

  3. Run the downloaded package to start the installation process.

  4. Follow the on-screen instructions to complete the installation.

  5. Once the installation is complete, you can start using the ICP HTTP Proxy.

Install MacOS Install Windows Install Debian

Contributing

External code contributions are not currently being accepted to this repository.

Setup

The package manager of this monorepo is yarn and the applications are built for nodejs. The usage of nvm is recommended to keep the node version in sync.

Setting up dependencies

The following steps can be used to set up the proxy for local development and to package it to your system architecture.

This will set up yarn with the latest stable release.

corepack enable
corepack prepare yarn@3.5.0 --activate

Yarn can also be enabled through npm.

npm install --global yarn
yarn set version 3.5.0

All dependencies can be installed with a single install command from the root of the monorepo.

yarn install

A recursive build is triggered for all of the monorepo packages.

yarn build

Produces the required binaries and installation bundles for the supported platforms.

yarn pkg

The proxy graphical interface is started and added to the operating system menu bar.

yarn start

Packages

This monorepo has multiple locally maintained packages in the root package.json configuration.

Package Links Description
core README The core package contains a set of core features shared among other packages of this monorepo.
daemon README A background process that receives tasks to execute against the operating system and monitors the status of the proxy server instance.
server README The proxy server implementation the IC HTTP Gateway protocol, terminating TLS and resolving dApp domains.
ui README Electron app responsible for the graphical interface.

About

Proof of concept implementation of the IC HTTP Gateway Protocol that enables end-to-end secure connections with dApps being served from the internet computer.

License:Apache License 2.0


Languages

Language:TypeScript 92.9%Language:JavaScript 6.7%Language:PowerShell 0.4%