mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-03-06 05:06:07 -05:00
update config and instructions to run haveno-ts with envoy proxy
This commit is contained in:
parent
84543b84de
commit
57cdcff458
@ -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
|
||||
|
||||
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user