Skip to content

Commit

Permalink
Merge pull request #358 from ayuryshev/feature/convert-org-to-md
Browse files Browse the repository at this point in the history
Cleanup.  README.org-files are converted to README.md
  • Loading branch information
jdknives authored May 20, 2019
2 parents 627e4c3 + a96da48 commit 04e1d63
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 71 deletions.
32 changes: 18 additions & 14 deletions cmd/apps/chat/README.org → cmd/apps/chat/README.md
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -18,10 +21,11 @@ Create 2 node config files:
"port": 1
}
]
#+END_SRC
```

`skywire2.json`

~skywire2.json~
#+BEGIN_SRC js
```json
"apps": [
{
"app": "chat",
Expand All @@ -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`.
11 changes: 11 additions & 0 deletions cmd/apps/therealproxy-client/README.md
Original file line number Diff line number Diff line change
@@ -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.
8 changes: 0 additions & 8 deletions cmd/apps/therealproxy-client/README.org

This file was deleted.

4 changes: 4 additions & 0 deletions cmd/apps/therealproxy-client/therealproxy-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand All @@ -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
```
8 changes: 8 additions & 0 deletions cmd/apps/therealssh-client/README.md
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 0 additions & 6 deletions cmd/apps/therealssh-client/README.org

This file was deleted.

52 changes: 30 additions & 22 deletions cmd/apps/therealssh/README.org → cmd/apps/therealssh/README.md
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand All @@ -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.
6 changes: 6 additions & 0 deletions cmd/therealssh-cli/README.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 0 additions & 5 deletions cmd/therealssh-cli/README.org

This file was deleted.

0 comments on commit 04e1d63

Please sign in to comment.