solution: docs for WebSocket support
This commit is contained in:
@@ -62,6 +62,10 @@ a| `upstreams`
|
||||
|
||||
=== Enabling JSON RPC proxy
|
||||
|
||||
In addition to the gRPC protocol, Dshackle provides access compatible with Bitcoin and Ethereum JSON RPC.
|
||||
The same server can be accessible as an HTTP JSON RPC and WebSocket JSON RPC.
|
||||
For Ethereum, besides the standard RPC calls, it provides RPC subscriptions with `eth_subscribe` method.
|
||||
|
||||
.Example proxy:
|
||||
[source,yaml]
|
||||
----
|
||||
@@ -82,7 +86,9 @@ cluster:
|
||||
With that configuration Dshackle starts a JSON RPC proxy:
|
||||
|
||||
- JSON RPC server is listening on `0.0.0.0:8080`
|
||||
- `http://0.0.0.0:8080/eth` provides access to Ethereum API routed to an available upstream
|
||||
- `http://0.0.0.0:8080/eth` (and `ws://0.0.0.0:8080/eth`) provides access to Ethereum API routed to an available upstream
|
||||
|
||||
NOTE: Same URL should be used to access both HTTP RPC and WebSocket RPC
|
||||
|
||||
.Full configuration:
|
||||
[source,yaml]
|
||||
|
||||
@@ -50,6 +50,7 @@ cache:
|
||||
proxy:
|
||||
host: 0.0.0.0
|
||||
port: 8080
|
||||
websocket: true
|
||||
tls:
|
||||
enabled: true
|
||||
server:
|
||||
@@ -373,20 +374,26 @@ proxy:
|
||||
|
||||
| `host`
|
||||
| `127.0.0.0`
|
||||
| Host to bind gRPC server
|
||||
| Host to bind HTTP server
|
||||
|
||||
| `port`
|
||||
| `2449`
|
||||
| Port to bind gRPC server
|
||||
| `8080`
|
||||
| Port to bind HTT server
|
||||
|
||||
| `websocket`
|
||||
| `true`
|
||||
| Enable WebSocket Proxy
|
||||
|
||||
| `tls`
|
||||
|
|
||||
| Setup TLS configuration for the Proxy server. See <<tls>> section
|
||||
| Setup TLS configuration for the Proxy server.
|
||||
See <<tls>> section
|
||||
|
||||
| `routes`
|
||||
|
|
||||
a| Routing paths for Proxy.The proxy will handle requests as `https://${HOST}:${PORT}/${ROUTE_ID}` (or `http://` if TLS is not enabled)
|
||||
a| Routing paths for Proxy.
|
||||
The proxy will handle requests as `https://${HOST}:${PORT}/${ROUTE_ID}` (or `http://` if TLS is not enabled).
|
||||
For WebSocket it's `wss` / `ws`, accordingly.
|
||||
|===
|
||||
|
||||
.Route config
|
||||
@@ -663,14 +670,14 @@ rpc:
|
||||
----
|
||||
|
||||
| `ws.url`
|
||||
| Websocket URL to connect to.
|
||||
| WebSocket URL to connect to.
|
||||
Optional, but optimizes performance if it's available.
|
||||
|
||||
| `ws.origin`
|
||||
| HTTP `Origin` if required by Websocket remote server.
|
||||
| HTTP `Origin` if required by WebSocket remote server.
|
||||
|
||||
| `ws.basic-auth` + ...
|
||||
| Websocket Basic Auth configuration, if required by the remote server
|
||||
| WebSocket Basic Auth configuration, if required by the remote server
|
||||
|
||||
| `ws.frameSize`
|
||||
| WebSocket frame size limit.
|
||||
|
||||
Reference in New Issue
Block a user