By default, the Dshackle looks for config in the following locations:
-
Path specified by optional
--configPath <…>
command line option -
/etc/dshackle/dshackle.yaml
-
./dshackle.yaml
(i.e. in the current working dir)
If none found the application exists with an error.
version: v1
port: 2449
tls:
enabled: true
server:
certificate: "server.crt"
key: "server.p8.key"
client:
require: true
ca: "ca.crt"
cluster:
include: "upstreams.yaml"
It configures following:
-
server is listening with gRCP API on
0.0.0.0:2449
-
TLS is enabled
-
server certificate is located at
server.crt
with the key for it atserver.p8.key
-
the server requires a client authentication by TLS client certificate signed by
ca.crt
certificate -
no JSON RPC is configured
-
upstreams configuration is configured in the file
upstreams.yaml
Name | Example | Description |
---|---|---|
|
Version of the format of the config |
|
|
|
Port to bind gRPC server. |
|
TLS configuration for gRPC. See Authentication for details |
|
|
Proxy configuration |
|
|
Upstreams configuration |
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.
version: v1
port: 2449
proxy:
host: 0.0.0.0
port: 8080
routes:
- id: eth
blockchain: ethereum
cluster:
include: "upstreams.yaml"
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
(andws://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 |
proxy:
port: 8080
tls:
enabled: true
server:
certificate: server.crt
key: server.p8.key
client:
require: true
ca: ca.crt
routes:
- id: eth
blockchain: ethereum
- id: etc
blockchain: ethereum_classic
Name | Example | Description |
---|---|---|
|
|
Host to bind proxy server. |
|
|
Port to bind proxy server. |
|
|
Enable/disable proxy server |
|
TLS configuration for proxy. See Authentication for details |
|
|
List of endpoints to proxy |