Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add installation section #33

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 48 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,87 +1,105 @@
[![GitHub license](https://img.shields.io/badge/license-Apache%202.0-blue.svg?style=for-the-badge)](LICENSE)
[![Install MacOS](https://img.shields.io/badge/install-MacOSX-blue.svg?style=for-the-badge&logo=apple)](https://github.com/dfinity/http-proxy/releases/download/0.0.6-alpha/ic-http-proxy-mac-universal-0.0.6-alpha.dmg)
[![Install Windows](https://img.shields.io/badge/install-Windows-blue.svg?style=for-the-badge&logo=windows)](https://github.com/dfinity/http-proxy/releases/download/0.0.6-alpha/ic-http-proxy-win-x64-0.0.6-alpha.exe)
[![Install Debian](https://img.shields.io/badge/install-Debian-blue.svg?style=for-the-badge&logo=debian)](https://github.com/dfinity/http-proxy/releases/download/0.0.6-alpha/ic-http-proxy-linux-arm64-0.0.6-alpha.deb)
# ICP HTTP Proxy

# IC 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 [IC HTTP Gateway Protocol](https://internetcomputer.org/docs/current/references/ic-interface-spec/#http-gateway) that enables end-to-end secure connections with dApps being served from the [Internet Computer](https://internetcomputer.org/).
An implementation of the [ICP HTTP Gateway Protocol](https://internetcomputer.org/docs/current/references/ic-interface-spec/#http-gateway) that enables end-to-end secure connections with dApps being served from the [Internet Computer](https://internetcomputer.org/).

### Motivation and Goals

* Local alternative that implements the HTTP Gateway Protocol
- Connect to the ICP network without the need for any trusted intermediaries.

* Perform response verification
- Verify HTTP responses received from the ICP network for authenticity.

* Censorship resistance
- Resist censorship by bypassing traditional DNS infrastructure.

* Enable crypto domains
- Enable resolution of crypto domains (not implemented yet).

### Key Features

* Translates between IC API calls and HTTP Asset Requests
- Translate between ICP API calls and HTTP Asset Requests.

* Terminates TLS connection locally with self Root Authority
- Terminate TLS connections locally with a self-generated root certificate authority.

* Detects IC domains from principals and custom domain DNS records
- Detect IC domains from principals and custom domain DNS records.

* Bypasses remote gateway denylists

* Resolves crypto domains
- Bypass remote HTTP gateway denylists.

### Supported Platforms

* Windows
- 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.

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

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

Other platforms can also be supported by adding the generated root certificate to the device trusted store and adding the proxy HTTP server to the active network interface configuration.
5. Once the installation is complete, you can start using the ICP HTTP Proxy.

[![Install MacOS](https://img.shields.io/badge/install-MacOSX-blue.svg?style=for-the-badge&logo=apple)](https://github.com/dfinity/http-proxy/releases/download/0.0.6-alpha/ic-http-proxy-mac-universal-0.0.6-alpha.dmg)
[![Install Windows](https://img.shields.io/badge/install-Windows-blue.svg?style=for-the-badge&logo=windows)](https://github.com/dfinity/http-proxy/releases/download/0.0.6-alpha/ic-http-proxy-win-x64-0.0.6-alpha.exe)
[![Install Debian](https://img.shields.io/badge/install-Debian-blue.svg?style=for-the-badge&logo=debian)](https://github.com/dfinity/http-proxy/releases/download/0.0.6-alpha/ic-http-proxy-linux-arm64-0.0.6-alpha.deb)

## Contributing

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

## Setup

The package manager of this monorepo is [yarn](https://yarnpkg.com/) and the applications are built for [nodejs](https://nodejs.org/en). The usage of [nvm](https://github.com/nvm-sh/nvm) is recommended to keep the node version in sync.

### Setting up dependencies

The following steps can be used to setup the proxy for local development and to package it to your system architecture.
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.

This will setup yarn with the latest stable release.
```bash
corepack enable
corepack prepare [email protected] --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.

```bash
yarn install
```

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

```bash
yarn build
```

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

```bash
yarn pkg
```

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

```bash
yarn start
```
Expand All @@ -90,9 +108,9 @@ yarn start

This monorepo has multiple locally maintained packages in the root [package.json](package.json) configuration.

| Package | Links | Description |
|---|---|---|
| `core` | [![README](https://img.shields.io/badge/-README-blue?style=flat-square)](https://github.com/dfinity/http-proxy/tree/main/packages/core) | The `core` package contains a set of core features shared among other packages of this monorepo. |
| `daemon` | [![README](https://img.shields.io/badge/-README-blue?style=flat-square)](https://github.com/dfinity/http-proxy/tree/main/packages/daemon) | A background process that receives tasks to execute against the operating system and monitors the status of the proxy server instance. |
| `server` | [![README](https://img.shields.io/badge/-README-blue?style=flat-square)](https://github.com/dfinity/http-proxy/tree/main/packages/server) | The proxy server implementation the IC HTTP Gateway protocol, terminating TLS and resolving dApp domains. |
| `ui` | [![README](https://img.shields.io/badge/-README-blue?style=flat-square)](https://github.com/dfinity/http-proxy/tree/main/packages/ui) | Electron app responsible for the graphical interface. |
| Package | Links | Description |
| -------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `core` | [![README](https://img.shields.io/badge/-README-blue?style=flat-square)](https://github.com/dfinity/http-proxy/tree/main/packages/core) | The `core` package contains a set of core features shared among other packages of this monorepo. |
| `daemon` | [![README](https://img.shields.io/badge/-README-blue?style=flat-square)](https://github.com/dfinity/http-proxy/tree/main/packages/daemon) | A background process that receives tasks to execute against the operating system and monitors the status of the proxy server instance. |
| `server` | [![README](https://img.shields.io/badge/-README-blue?style=flat-square)](https://github.com/dfinity/http-proxy/tree/main/packages/server) | The proxy server implementation the IC HTTP Gateway protocol, terminating TLS and resolving dApp domains. |
| `ui` | [![README](https://img.shields.io/badge/-README-blue?style=flat-square)](https://github.com/dfinity/http-proxy/tree/main/packages/ui) | Electron app responsible for the graphical interface. |
Loading