solution: use port 2449 by default
This commit is contained in:
@@ -17,7 +17,7 @@ Create file `dshackle.yaml` with following content:
|
||||
[source,yaml]
|
||||
----
|
||||
version: v1
|
||||
port: 9001
|
||||
port: 2449
|
||||
tls:
|
||||
enabled: false
|
||||
upstreams:
|
||||
@@ -26,7 +26,7 @@ upstreams:
|
||||
|
||||
This very basic config says that:
|
||||
|
||||
- application should listen on 0.0.0.0:9001
|
||||
- application will listen for connections on 0.0.0.0:2449
|
||||
- TLS security should be disabled (_never use in production!_)
|
||||
- read upstreams configuration from file `upstreams.yaml` in current directory
|
||||
|
||||
@@ -71,13 +71,13 @@ export INFURA_USER=...
|
||||
.Run Dshackle
|
||||
[source,bash]
|
||||
----
|
||||
docker run -p 9001:9001 -v $(pwd):/config -w /config -e "INFURA_USER=$INFURA_USER" emeraldpay/dshackle
|
||||
docker run -p 2449:2449 -v $(pwd):/config -w /config -e "INFURA_USER=$INFURA_USER" emeraldpay/dshackle
|
||||
----
|
||||
|
||||
.Connect and listen for new blocks on Ethereum Mainnet
|
||||
[source,bash]
|
||||
----
|
||||
grpcurl -import-path ./proto/ -proto blockchain.proto -d "{\"type\": 100}" -plaintext 127.0.0.1:9001 io.emeraldpay.api.Blockchain/SubscribeHead
|
||||
grpcurl -import-path ./proto/ -proto blockchain.proto -d "{\"type\": 100}" -plaintext 127.0.0.1:2449 io.emeraldpay.api.Blockchain/SubscribeHead
|
||||
----
|
||||
|
||||
.Output would be like
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[source,yaml]
|
||||
----
|
||||
version: v1
|
||||
port: 9001
|
||||
port: 2449
|
||||
tls:
|
||||
enabled: true
|
||||
server:
|
||||
@@ -18,7 +18,7 @@ upstreams:
|
||||
|
||||
Configures following:
|
||||
|
||||
- server is listening on `0.0.0.0:9001`
|
||||
- server is listening on `0.0.0.0:2449`
|
||||
- TLS is enabled
|
||||
- server certificate in located at `server.crt` with key for it at `server.p8.key`
|
||||
- server requires a client authentication by TLS client certificate signed by `ca.crt` certificate
|
||||
|
||||
@@ -6,7 +6,7 @@ Prepare configuration files `dshackle.yaml` and `upstreams.yaml` in the current
|
||||
|
||||
[source,bash]
|
||||
----
|
||||
docker run -p 9001:9001 -v $(pwd):/config -w /config emeraldpay/dshackle
|
||||
docker run -p 2449:2449 -v $(pwd):/config -w /config emeraldpay/dshackle
|
||||
----
|
||||
|
||||
=== Install & Run manually
|
||||
|
||||
@@ -40,7 +40,7 @@ Copy those files to directory with Dshackle and update configuration.
|
||||
[source,yaml]
|
||||
----
|
||||
version: v1
|
||||
port: 9001
|
||||
port: 2449
|
||||
tls:
|
||||
enabled: true
|
||||
server:
|
||||
@@ -51,7 +51,7 @@ tls:
|
||||
.Verify that server uses the certificate
|
||||
[source,bash]
|
||||
----
|
||||
openssl s_client -alpn h2 -connect 127.0.0.1:9001 -CAfile out/ca.myhost.dev.crt
|
||||
openssl s_client -alpn h2 -connect 127.0.0.1:2449 -CAfile out/ca.myhost.dev.crt
|
||||
----
|
||||
|
||||
With the configuration above the server listen using TLS and the server identity can be verified by a client against public
|
||||
@@ -93,7 +93,7 @@ Copy `client-ca.myhost.dev.crt` to directory with first Dshackle server.
|
||||
[source,yaml]
|
||||
----
|
||||
version: v1
|
||||
port: 9001
|
||||
port: 2449
|
||||
tls:
|
||||
enabled: true
|
||||
server:
|
||||
@@ -107,7 +107,7 @@ tls:
|
||||
.Verify connection with client certificate
|
||||
[source,bash]
|
||||
----
|
||||
openssl s_client -alpn h2 -connect 127.0.0.1:9001 -CAfile out/ca.myhost.dev.crt -cert out/client_1.crt -key out/client_1.key
|
||||
openssl s_client -alpn h2 -connect 127.0.0.1:2449 -CAfile out/ca.myhost.dev.crt -cert out/client_1.crt -key out/client_1.key
|
||||
----
|
||||
|
||||
Now you need to setup connection from another Dshackle server. I.e. the server we configured above is going be an
|
||||
@@ -119,12 +119,12 @@ Setup another Dshackle server on the same machine:
|
||||
[source,yaml]
|
||||
----
|
||||
version: v1
|
||||
port: 9002
|
||||
port: 3449
|
||||
tls:
|
||||
enabled: false
|
||||
----
|
||||
|
||||
At this case we run another server on port 9002 in unsecure mode. But to connect to an upstream is still uses a TLS
|
||||
At this case we run another server on port 3449 in unsecure mode. But to connect to an upstream is still uses a TLS
|
||||
certificate as described below
|
||||
|
||||
[source,yaml]
|
||||
@@ -137,12 +137,12 @@ upstreams:
|
||||
connection:
|
||||
grpc:
|
||||
host: 127.0.0.1
|
||||
port: 9001
|
||||
port: 2449
|
||||
tls:
|
||||
ca: ca.myhost.dev.crt
|
||||
certificate: client_1.crt
|
||||
key: client_1.p8.key
|
||||
----
|
||||
|
||||
Now if you run second server it will connect to first server ("upstream") running on port 9001, will verify upstream
|
||||
Now if you run second server it will connect to first server ("upstream") running on port 2449, will verify upstream
|
||||
with certificate `ca.myhost.dev.crt` and authenticate itself by using pair of `client_1.crt` and `client_1.p8.key`
|
||||
Reference in New Issue
Block a user