diff --git a/README.md b/README.md index d4789037..40c6908e 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,10 @@ TypeScript library for using Haveno. ## Install -1. Start a Haveno daemon (see [installing.md](https://github.com/haveno-dex/haveno/blob/master/docs/installing.md)). -2. Install haveno-ts in your project: `npm install haveno-ts` +1. Follow [instructions](https://github.com/haveno-dex/haveno/blob/master/docs/installing.md) to build and start a Haveno daemon: `make haveno-daemon-mainnet` +2. Install envoy, for example: `brew install envoy` +3. Start envoy to proxy between http1 and http2: `envoy -c config/envoy.yaml` +4. Install haveno-ts in your project: `npm install haveno-ts` ## Sample code diff --git a/config/envoy.yaml b/config/envoy.yaml index 786018ad..e3e85b2c 100644 --- a/config/envoy.yaml +++ b/config/envoy.yaml @@ -1,15 +1,15 @@ -# envoy configuration to run user1 ui +# envoy configuration for haveno instance admin: access_log_path: /tmp/admin_access.log address: - socket_address: { address: 0.0.0.0, port_value: 9901 } + socket_address: { address: 127.0.0.1, port_value: 9901 } static_resources: listeners: - - name: user1_listener + - name: haveno_listener address: - socket_address: { address: 0.0.0.0, port_value: 8080 } + socket_address: { address: 127.0.0.1, port_value: 8080 } filter_chains: - filters: - name: envoy.filters.network.http_connection_manager @@ -17,6 +17,9 @@ static_resources: "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager codec_type: auto stat_prefix: ingress_http + common_http_protocol_options: + idle_timeout: 0s + max_requests_per_connection: 1 route_config: name: local_route virtual_hosts: @@ -25,7 +28,7 @@ static_resources: routes: - match: { prefix: "/" } route: - cluster: user1_service + cluster: haveno_service timeout: 0s max_stream_duration: grpc_timeout_header_max: 0s @@ -47,7 +50,7 @@ static_resources: typed_config: "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router clusters: - - name: user1_service + - name: haveno_service connect_timeout: 0.25s type: logical_dns http2_protocol_options: {} @@ -59,5 +62,5 @@ static_resources: - endpoint: address: socket_address: - address: host.docker.internal - port_value: 9999 + address: 127.0.0.1 + port_value: 1201 \ No newline at end of file