mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-03-06 13:16:02 -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
|
## Install
|
||||||
|
|
||||||
1. Start a Haveno daemon (see [installing.md](https://github.com/haveno-dex/haveno/blob/master/docs/installing.md)).
|
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 haveno-ts in your project: `npm install haveno-ts`
|
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
|
## Sample code
|
||||||
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
# envoy configuration to run user1 ui
|
# envoy configuration for haveno instance
|
||||||
|
|
||||||
admin:
|
admin:
|
||||||
access_log_path: /tmp/admin_access.log
|
access_log_path: /tmp/admin_access.log
|
||||||
address:
|
address:
|
||||||
socket_address: { address: 0.0.0.0, port_value: 9901 }
|
socket_address: { address: 127.0.0.1, port_value: 9901 }
|
||||||
|
|
||||||
static_resources:
|
static_resources:
|
||||||
listeners:
|
listeners:
|
||||||
- name: user1_listener
|
- name: haveno_listener
|
||||||
address:
|
address:
|
||||||
socket_address: { address: 0.0.0.0, port_value: 8080 }
|
socket_address: { address: 127.0.0.1, port_value: 8080 }
|
||||||
filter_chains:
|
filter_chains:
|
||||||
- filters:
|
- filters:
|
||||||
- name: envoy.filters.network.http_connection_manager
|
- 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
|
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
|
||||||
codec_type: auto
|
codec_type: auto
|
||||||
stat_prefix: ingress_http
|
stat_prefix: ingress_http
|
||||||
|
common_http_protocol_options:
|
||||||
|
idle_timeout: 0s
|
||||||
|
max_requests_per_connection: 1
|
||||||
route_config:
|
route_config:
|
||||||
name: local_route
|
name: local_route
|
||||||
virtual_hosts:
|
virtual_hosts:
|
||||||
@ -25,7 +28,7 @@ static_resources:
|
|||||||
routes:
|
routes:
|
||||||
- match: { prefix: "/" }
|
- match: { prefix: "/" }
|
||||||
route:
|
route:
|
||||||
cluster: user1_service
|
cluster: haveno_service
|
||||||
timeout: 0s
|
timeout: 0s
|
||||||
max_stream_duration:
|
max_stream_duration:
|
||||||
grpc_timeout_header_max: 0s
|
grpc_timeout_header_max: 0s
|
||||||
@ -47,7 +50,7 @@ static_resources:
|
|||||||
typed_config:
|
typed_config:
|
||||||
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
|
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
|
||||||
clusters:
|
clusters:
|
||||||
- name: user1_service
|
- name: haveno_service
|
||||||
connect_timeout: 0.25s
|
connect_timeout: 0.25s
|
||||||
type: logical_dns
|
type: logical_dns
|
||||||
http2_protocol_options: {}
|
http2_protocol_options: {}
|
||||||
@ -59,5 +62,5 @@ static_resources:
|
|||||||
- endpoint:
|
- endpoint:
|
||||||
address:
|
address:
|
||||||
socket_address:
|
socket_address:
|
||||||
address: host.docker.internal
|
address: 127.0.0.1
|
||||||
port_value: 9999
|
port_value: 1201
|
Loading…
x
Reference in New Issue
Block a user