From a96da488375688260ac5057c0406dd10e07eab19 Mon Sep 17 00:00:00 2001 From: Alex Yu Date: Fri, 17 May 2019 18:10:00 +0300 Subject: [PATCH] .org-files are converted to .md --- cmd/apps/chat/{README.org => README.md} | 32 +++++++----- cmd/apps/therealproxy-client/README.md | 11 ++++ cmd/apps/therealproxy-client/README.org | 8 --- .../therealproxy-client.go | 4 ++ .../therealproxy/{README.org => README.md} | 38 ++++++++------ cmd/apps/therealssh-client/README.md | 8 +++ cmd/apps/therealssh-client/README.org | 6 --- cmd/apps/therealssh/{README.org => README.md} | 52 +++++++++++-------- cmd/therealssh-cli/README.md | 6 +++ cmd/therealssh-cli/README.org | 5 -- 10 files changed, 99 insertions(+), 71 deletions(-) rename cmd/apps/chat/{README.org => README.md} (55%) create mode 100644 cmd/apps/therealproxy-client/README.md delete mode 100644 cmd/apps/therealproxy-client/README.org rename cmd/apps/therealproxy/{README.org => README.md} (56%) create mode 100644 cmd/apps/therealssh-client/README.md delete mode 100644 cmd/apps/therealssh-client/README.org rename cmd/apps/therealssh/{README.org => README.md} (54%) create mode 100644 cmd/therealssh-cli/README.md delete mode 100644 cmd/therealssh-cli/README.org diff --git a/cmd/apps/chat/README.org b/cmd/apps/chat/README.md similarity index 55% rename from cmd/apps/chat/README.org rename to cmd/apps/chat/README.md index 8d202aedda..4293865ac8 100644 --- a/cmd/apps/chat/README.org +++ b/cmd/apps/chat/README.md @@ -1,15 +1,18 @@ -* Skywire Chat app +# Skywire Chat app -Chat implements basic text messaging between skywire nodes. Messaging -UI is exposed via web interface. Chat only supports one WEB client -user at a time. +Chat implements basic text messaging between skywire nodes. -** Local setup +Messaging UI is exposed via web interface. + +Chat only supports one WEB client user at a time. + +## Local setup Create 2 node config files: -~skywire1.json~ -#+BEGIN_SRC js +`skywire1.json` + +```json "apps": [ { "app": "chat", @@ -18,10 +21,11 @@ Create 2 node config files: "port": 1 } ] -#+END_SRC +``` + +`skywire2.json` -~skywire2.json~ -#+BEGIN_SRC js +```json "apps": [ { "app": "chat", @@ -31,14 +35,14 @@ Create 2 node config files: "args": ["-addr", ":8001"] } ] -#+END_SRC +``` Compile binaries and start 2 nodes: -#+BEGIN_SRC bash +```bash $ go build -o apps/chat.v1.0 ./cmd/apps/chat $ ./skywire-node skywire1.json $ ./skywire-node skywire2.json -#+END_SRC +``` -Chat interface will be available on ports ~8000~ and ~8001~. +Chat interface will be available on ports `8000` and `8001`. diff --git a/cmd/apps/therealproxy-client/README.md b/cmd/apps/therealproxy-client/README.md new file mode 100644 index 0000000000..568b1a6ec4 --- /dev/null +++ b/cmd/apps/therealproxy-client/README.md @@ -0,0 +1,11 @@ +# Skywire SOCKS5 proxy client app + +`therealproxy-client` app implements client for the SOCKS5 app. + +It opens persistent `skywire` connection to the configured remote node +and local TCP port, all incoming TCP traffics is forwarded to the +~skywire~ connection. + +Any conventional SOCKS5 client should be able to connect to the proxy client. + +Please check docs for `therealproxy` app for further instructions. diff --git a/cmd/apps/therealproxy-client/README.org b/cmd/apps/therealproxy-client/README.org deleted file mode 100644 index 04e056cde9..0000000000 --- a/cmd/apps/therealproxy-client/README.org +++ /dev/null @@ -1,8 +0,0 @@ -* Skywire SOCKS5 proxy client app - -~therealproxy-client~ app implements client for the SOCKS5 app. It -opens persistent ~skywire~ connection to the configured remote node -and local TCP port, all incoming TCP traffics is forwarded to the -~skywire~ connection. Any conventional SOCKS5 client should be able to -connect to the proxy client. Please check docs for ~therealproxy~ app -for further instructions. diff --git a/cmd/apps/therealproxy-client/therealproxy-client.go b/cmd/apps/therealproxy-client/therealproxy-client.go index 698990b546..1b561b7d0d 100644 --- a/cmd/apps/therealproxy-client/therealproxy-client.go +++ b/cmd/apps/therealproxy-client/therealproxy-client.go @@ -40,10 +40,14 @@ func main() { log.Fatal("Failed to dial to a server: ", err) } + log.Printf("Connected to %v\n", pk) + client, err := therealproxy.NewClient(conn) if err != nil { log.Fatal("Failed to create a new client: ", err) } + log.Printf("Serving %v\n", addr) + log.Fatal(client.ListenAndServe(*addr)) } diff --git a/cmd/apps/therealproxy/README.org b/cmd/apps/therealproxy/README.md similarity index 56% rename from cmd/apps/therealproxy/README.org rename to cmd/apps/therealproxy/README.md index bab1799b6c..a9c8023ff1 100644 --- a/cmd/apps/therealproxy/README.org +++ b/cmd/apps/therealproxy/README.md @@ -1,15 +1,20 @@ -* Skywire SOCKS5 proxy app +# Skywire SOCKS5 proxy app -~therealproxy~ app implements SOCKS5 functionality over skywire -net. Any conventional SOCKS5 client should be able to connect to the -proxy client. Currently the server supports authentication with a user and passcode pair that are set in the configuration file. If none are provided, the server does not require authentication. +`therealproxy` app implements SOCKS5 functionality over skywire +net. +Any conventional SOCKS5 client should be able to connect to the +proxy client. +Currently the server supports authentication with a user and passcode pair +that are set in the configuration file. +If none are provided, the server does not require authentication. -** Local setup +## Local setup Create 2 node config files: -~skywire1.json~ -#+BEGIN_SRC js +- `skywire1.json` + +```json "apps": [ { "app": "therealproxy", @@ -19,10 +24,11 @@ Create 2 node config files: "args": ["-passcode", "123456"] } ] -#+END_SRC +``` + +- `skywire2.json` -~skywire2.json~ -#+BEGIN_SRC js +```json "apps": [ { "app": "therealproxy-client", @@ -32,19 +38,19 @@ Create 2 node config files: "args": ["-srv", "024ec47420176680816e0406250e7156465e4531f5b26057c9f6297bb0303558c7"] } ] -#+END_SRC +``` Compile binaries and start 2 nodes: -#+BEGIN_SRC bash +```sh $ go build -o apps/therealproxy.v1.0 ./cmd/apps/therealproxy $ go build -o apps/therealproxy-client.v1.0 ./cmd/apps/therealproxy-client $ ./skywire-node skywire1.json $ ./skywire-node skywire2.json -#+END_SRC +``` -You should be able to connect to a secondary node via ~curl~: +You should be able to connect to a secondary node via `curl`: -#+BEGIN_SRC bash +```sh $ curl -v -x socks5://123456:@localhost:1080 https://api.ipify.org -#+END_SRC +``` diff --git a/cmd/apps/therealssh-client/README.md b/cmd/apps/therealssh-client/README.md new file mode 100644 index 0000000000..f98717cfec --- /dev/null +++ b/cmd/apps/therealssh-client/README.md @@ -0,0 +1,8 @@ +# Skywire SSH client app + +`therealssh-client` app implements client for the SSH app. + +It starts RCP interface for `therealssh-cli` and handles incoming requests to +the remote node via `skywire` connection. + +Please check docs for `therealssh` app for further instructions. diff --git a/cmd/apps/therealssh-client/README.org b/cmd/apps/therealssh-client/README.org deleted file mode 100644 index 551e74dd58..0000000000 --- a/cmd/apps/therealssh-client/README.org +++ /dev/null @@ -1,6 +0,0 @@ -* Skywire SSH client app - -~therealssh-client~ app implements client for the SSH app. It starts -RCP interface for ~therealssh-cli~ and handles incoming requests to -the remote node via ~skywire~ connection. Please check docs for -~therealssh~ app for further instructions. diff --git a/cmd/apps/therealssh/README.org b/cmd/apps/therealssh/README.md similarity index 54% rename from cmd/apps/therealssh/README.org rename to cmd/apps/therealssh/README.md index e47928f69d..149bec1b43 100644 --- a/cmd/apps/therealssh/README.org +++ b/cmd/apps/therealssh/README.md @@ -1,18 +1,25 @@ -* Skywire SSH app +# Skywire SSH app -~therealssh~ app implements SSH functionality over skywire -net. ~therealssh-cli~ is used to initiate communication via client RPC -exposed by ~therealssh~ app. ~therealssh~ app implements common SSH -operations: starting remote shell and executing commands -remotely. PubKey whitelisting is performed by adding public key to the -authentication file (~$HOME/.therealssh/authorized_keys~ by default). +`therealssh` app implements SSH functionality over skywirenet. + +`therealssh-cli` is used to initiate communication via client RPC +exposed by `therealssh` app. + +`therealssh` app implements common SSH operations: + +- starting remote shell +- and executing commands remotely + +PubKey whitelisting is performed by adding public key to the +authentication file (`$HOME/.therealssh/authorized_keys` by default). ** Local setup Create 2 node config files: -~skywire1.json~ -#+BEGIN_SRC js +`skywire1.json` + +```json "apps": [ { "app": "therealssh", @@ -21,10 +28,11 @@ Create 2 node config files: "port": 2 } ] -#+END_SRC +``` + +`skywire2.json` -~skywire2.json~ -#+BEGIN_SRC js +```json "apps": [ { "app": "therealssh-client", @@ -33,30 +41,30 @@ Create 2 node config files: "port": 22 } ] -#+END_SRC +``` Compile binaries and start 2 nodes: -#+BEGIN_SRC bash +```bash $ go build -o apps/therealssh.v1.0 ./cmd/apps/therealssh $ go build -o apps/therealssh-client.v1.0 ./cmd/apps/therealssh-client $ go build ./cmd/therealssh-cli $ ./skywire-node skywire1.json $ ./skywire-node skywire2.json -#+END_SRC +``` Add public key of the second node to the auth file: -#+BEGIN_SRC bash -$ mkdir ~/.therealssh -$ echo "0348c941c5015a05c455ff238af2e57fb8f914c399aab604e9abb5b32b91a4c1fe" > ~/.therealssh/authorized_keys -#+END_SRC +```bash +$ mkdir `/.therealssh +$ echo "0348c941c5015a05c455ff238af2e57fb8f914c399aab604e9abb5b32b91a4c1fe" > `/.therealssh/authorized_keys +``` Connect to the first node using CLI: -#+BEGIN_SRC bash +```bash $ ./therealssh-cli 024ec47420176680816e0406250e7156465e4531f5b26057c9f6297bb0303558c7 -#+END_SRC +``` -This should get you to the local folder of the ~therealssh~ app, which +This should get you to the $HOME folder of the user(you in this case), which will indicate that you are seeing remote PTY session. diff --git a/cmd/therealssh-cli/README.md b/cmd/therealssh-cli/README.md new file mode 100644 index 0000000000..72350f3282 --- /dev/null +++ b/cmd/therealssh-cli/README.md @@ -0,0 +1,6 @@ +# CLI for SSH app + +`therealssh-cli` implements PTY related operations for SSH app. + +It connects to SSH client's RPC server, configures terminal for raw pty +data and handles pty data exchange. diff --git a/cmd/therealssh-cli/README.org b/cmd/therealssh-cli/README.org deleted file mode 100644 index 2f6c110f64..0000000000 --- a/cmd/therealssh-cli/README.org +++ /dev/null @@ -1,5 +0,0 @@ -* CLI for SSH app - -~therealssh-cli~ implements PTY related operations for SSH app. It -connects to SSH client's RPC server, configures terminal for raw pty -data and handles pty data exchange.