-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add gateway to proxy requests via http service
- Loading branch information
Showing
6 changed files
with
376 additions
and
23 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
# dephy-pproxy | ||
|
||
dephy-pproxy is a http proxy over litep2p. | ||
|
||
## Usage | ||
Run the server: | ||
```shell | ||
cargo run -- --proxy-addr 127.0.0.1:8000 | ||
``` | ||
|
||
Run the client: | ||
```shell | ||
cargo run -- --server-addr 127.0.0.1:6666 --commander-server-addr 127.0.0.1:7777 --proxy-gateway-addr 127.0.0.1:8080 | ||
``` | ||
|
||
Add server peer to client: | ||
```shell | ||
grpcurl -plaintext -import-path ./proto -proto command_v1.proto -d '{"address": "<The litep2p multiaddr>"}' '127.0.0.1:7777' command.v1.CommandService/AddPeer | ||
``` | ||
|
||
Access server via the gateway address: | ||
```shell | ||
curl -H 'peerid: <peerid provided by AddPeer>' 127.0.0.1:8080 | ||
``` |
Oops, something went wrong.