Skip to content

Commit

Permalink
therealssh -> SSH, therealproxy->socksproxy
Browse files Browse the repository at this point in the history
  • Loading branch information
ayuryshev committed May 30, 2019
1 parent 4d5d98c commit bc24216
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 46 deletions.
32 changes: 16 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ clean: ## Clean project: remove created binaries and apps
-rm -rf ./apps
-rm -f ./skywire-node ./skywire-cli ./setup-node ./manager-node ./thereallssh-cli

install: ## Install `skywire-node`, `skywire-cli`, `manager-node`, `therealssh-cli`
install: ## Install `skywire-node`, `skywire-cli`, `manager-node`, `SSH-cli`
${OPTS} go install ./cmd/skywire-node ./cmd/skywire-cli ./cmd/setup-node ./cmd/manager-node ./cmd/therealssh-cli

rerun: stop
Expand Down Expand Up @@ -95,31 +95,31 @@ dep: ## Sorts dependencies
host-apps: ## Build app
${OPTS} go build -race -o ./apps/skychat.v1.0 ./cmd/apps/skychat
${OPTS} go build -race -o ./apps/helloworld.v1.0 ./cmd/apps/helloworld
${OPTS} go build -race -o ./apps/therealproxy.v1.0 ./cmd/apps/therealproxy
${OPTS} go build -race -o ./apps/therealproxy-client.v1.0 ./cmd/apps/therealproxy-client
${OPTS} go build -race -o ./apps/therealssh.v1.0 ./cmd/apps/therealssh
${OPTS} go build -race -o ./apps/therealssh-client.v1.0 ./cmd/apps/therealssh-client
${OPTS} go build -race -o ./apps/socksproxy.v1.0 ./cmd/apps/therealproxy
${OPTS} go build -race -o ./apps/socksproxy-client.v1.0 ./cmd/apps/therealproxy-client
${OPTS} go build -race -o ./apps/SSH.v1.0 ./cmd/apps/therealssh
${OPTS} go build -race -o ./apps/SSH-client.v1.0 ./cmd/apps/therealssh-client

# Bin
bin: ## Build `skywire-node`, `skywire-cli`, `manager-node`, `therealssh-cli`
bin: ## Build `skywire-node`, `skywire-cli`, `manager-node`, `SSH-cli`
${OPTS} go build -race -o ./skywire-node ./cmd/skywire-node
${OPTS} go build -race -o ./skywire-cli ./cmd/skywire-cli
${OPTS} go build -race -o ./setup-node ./cmd/setup-node
${OPTS} go build -race -o ./manager-node ./cmd/manager-node
${OPTS} go build -race -o ./therealssh-cli ./cmd/therealssh-cli
${OPTS} go build -race -o ./SSH-cli ./cmd/therealssh-cli

release: ## Build skywire-node`, skywire-cli, manager-node, therealssh-cli and apps without -race flag
${OPTS} go build -o ./skywire-node ./cmd/skywire-node
${OPTS} go build -o ./skywire-cli ./cmd/skywire-cli
${OPTS} go build -o ./setup-node ./cmd/setup-node
${OPTS} go build -o ./manager-node ./cmd/manager-node
${OPTS} go build -o ./therealssh-cli ./cmd/therealssh-cli
${OPTS} go build -o ./SSH-cli ./cmd/therealssh-cli
${OPTS} go build -o ./apps/skychat.v1.0 ./cmd/apps/skychat
${OPTS} go build -o ./apps/helloworld.v1.0 ./cmd/apps/helloworld
${OPTS} go build -o ./apps/therealproxy.v1.0 ./cmd/apps/therealproxy
${OPTS} go build -o ./apps/therealproxy-client.v1.0 ./cmd/apps/therealproxy-client
${OPTS} go build -o ./apps/therealssh.v1.0 ./cmd/apps/therealssh
${OPTS} go build -o ./apps/therealssh-client.v1.0 ./cmd/apps/therealssh-client
${OPTS} go build -o ./apps/socksproxy.v1.0 ./cmd/apps/therealproxy
${OPTS} go build -o ./apps/socksproxy-client.v1.0 ./cmd/apps/therealproxy-client
${OPTS} go build -o ./apps/SSH.v1.0 ./cmd/apps/therealssh
${OPTS} go build -o ./apps/SSH-client.v1.0 ./cmd/apps/therealssh-client



Expand All @@ -137,10 +137,10 @@ docker-network: ## Create docker network ${DOCKER_NETWORK}
docker-apps: ## Build apps binaries for dockerized skywire-node. `go build` with ${DOCKER_OPTS}
-${DOCKER_OPTS} go build -race -o ./node/apps/skychat.v1.0 ./cmd/apps/skychat
-${DOCKER_OPTS} go build -race -o ./node/apps/helloworld.v1.0 ./cmd/apps/helloworld
-${DOCKER_OPTS} go build -race -o ./node/apps/therealproxy.v1.0 ./cmd/apps/therealproxy
-${DOCKER_OPTS} go build -race -o ./node/apps/therealproxy-client.v1.0 ./cmd/apps/therealproxy-client
-${DOCKER_OPTS} go build -race -o ./node/apps/therealssh.v1.0 ./cmd/apps/therealssh
-${DOCKER_OPTS} go build -race -o ./node/apps/therealssh-client.v1.0 ./cmd/apps/therealssh-client
-${DOCKER_OPTS} go build -race -o ./node/apps/socksproxy.v1.0 ./cmd/apps/therealproxy
-${DOCKER_OPTS} go build -race -o ./node/apps/socksproxy-client.v1.0 ./cmd/apps/therealproxy-client
-${DOCKER_OPTS} go build -race -o ./node/apps/SSH.v1.0 ./cmd/apps/therealssh
-${DOCKER_OPTS} go build -race -o ./node/apps/SSH-client.v1.0 ./cmd/apps/therealssh-client

docker-bin: ## Build `skywire-node`, `skywire-cli`, `manager-node`, `therealssh-cli`. `go build` with ${DOCKER_OPTS}
${DOCKER_OPTS} go build -race -o ./node/skywire-node ./cmd/skywire-node
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ This will:
├── apps # node `apps` compiled with DOCKER_OPTS
│   ├── skychat.v1.0 #
│   ├── helloworld.v1.0 #
│   ├── therealproxy-client.v1.0 #
│   ├── therealproxy.v1.0 #
│   ├── socksproxy-client.v1.0 #
│   ├── socksproxy.v1.0 #
│   ├── therealssh-client.v1.0 #
│   └── therealssh.v1.0 #
├── local # **Created inside docker**
│   ├── skychat # according to "local_path" in skywire-config.json
│   ├── therealproxy #
│   ├── socksproxy #
│   └── therealssh #
├── PK # contains public key of node
├── skywire # db & logs. **Created inside docker**
Expand Down Expand Up @@ -291,7 +291,7 @@ $ GO111MODULE=on GOOS=linux go build -o /tmp/SKYNODE/skywire-node ./cmd/skywire-
# 3. compile apps
$ GO111MODULE=on GOOS=linux go build -o /tmp/SKYNODE/apps/skychat.v1.0 ./cmd/apps/skychat
$ GO111MODULE=on GOOS=linux go build -o /tmp/SKYNODE/apps/helloworld.v1.0 ./cmd/apps/helloworld
$ GO111MODULE=on GOOS=linux go build -o /tmp/SKYNODE/apps/therealproxy.v1.0 ./cmd/apps/therealproxy
$ GO111MODULE=on GOOS=linux go build -o /tmp/SKYNODE/apps/socksproxy.v1.0 ./cmd/apps/therealproxy
$ GO111MODULE=on GOOS=linux go build -o /tmp/SKYNODE/apps/therealssh.v1.0 ./cmd/apps/therealssh
$ GO111MODULE=on GOOS=linux go build -o /tmp/SKYNODE/apps/therealssh-client.v1.0 ./cmd/apps/therealssh-client
# 4. Create skywire-config.json for node
Expand All @@ -302,7 +302,7 @@ $ tree /tmp/SKYNODE
# ├── apps
# │   ├── skychat.v1.0
# │   ├── helloworld.v1.0
# │   ├── therealproxy.v1.0
# │   ├── socksproxy.v1.0
# │   ├── therealssh-client.v1.0
# │   └── therealssh.v1.0
# ├── skywire-config.json
Expand All @@ -314,7 +314,7 @@ $ docker run -it -v /tmp/SKYNODE:/sky --network=SKYNET --name=SKYNODE skywire-ru
# [2019-03-15T13:55:10Z] INFO [skywire]: Connected to messaging servers
# [2019-03-15T13:55:10Z] INFO [skywire]: Starting skychat.v1.0
# [2019-03-15T13:55:10Z] INFO [skywire]: Starting RPC interface on 127.0.0.1:3435
# [2019-03-15T13:55:10Z] INFO [skywire]: Starting therealproxy.v1.0
# [2019-03-15T13:55:10Z] INFO [skywire]: Starting socksproxy.v1.0
# [2019-03-15T13:55:10Z] INFO [skywire]: Starting therealssh.v1.0
# [2019-03-15T13:55:10Z] INFO [skywire]: Starting packet router
# [2019-03-15T13:55:10Z] INFO [router]: Starting router
Expand All @@ -324,8 +324,8 @@ $ docker run -it -v /tmp/SKYNODE:/sky --network=SKYNET --name=SKYNODE skywire-ru
# [2019-03-15T13:55:10Z] INFO [skychat.v1.0]: 2019/03/15 13:55:10 Serving HTTP on :8000
# [2019-03-15T13:55:10Z] INFO [router]: Got new App request with type Init: {"app-name":"therealssh",# "app-version":"1.0","protocol-version":"0.0.1"}
# [2019-03-15T13:55:10Z] INFO [router]: Handshaked new connection with the app therealssh.v1.0
# [2019-03-15T13:55:10Z] INFO [router]: Got new App request with type Init: {"app-name":"therealproxy",# "app-version":"1.0","protocol-version":"0.0.1"}
# [2019-03-15T13:55:10Z] INFO [router]: Handshaked new connection with the app therealproxy.v1.0
# [2019-03-15T13:55:10Z] INFO [router]: Got new App request with type Init: {"app-name":"socksproxy",# "app-version":"1.0","protocol-version":"0.0.1"}
# [2019-03-15T13:55:10Z] INFO [router]: Handshaked new connection with the app socksproxy.v1.0
```

Note that in this example docker is running in non-detached mode - it could be useful in some scenarios.
Expand Down
4 changes: 2 additions & 2 deletions cmd/apps/therealproxy-client/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Skywire SOCKS5 proxy client app

`therealproxy-client` app implements client for the SOCKS5 app.
`socksproxy-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.
Please check docs for `socksproxy` app for further instructions.
2 changes: 1 addition & 1 deletion cmd/apps/therealproxy-client/therealproxy-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func main() {
var serverPK = flag.String("srv", "", "PubKey of the server to connect to")
flag.Parse()

config := &app.Config{AppName: "therealproxy-client", AppVersion: "1.0", ProtocolVersion: "0.0.1"}
config := &app.Config{AppName: "socksproxy-client", AppVersion: "1.0", ProtocolVersion: "0.0.1"}
socksApp, err := app.Setup(config)
if err != nil {
log.Fatal("Setup failure: ", err)
Expand Down
10 changes: 5 additions & 5 deletions cmd/apps/therealproxy/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Skywire SOCKS5 proxy app

`therealproxy` app implements SOCKS5 functionality over skywire
`socksproxy` app implements SOCKS5 functionality over skywire
net.
Any conventional SOCKS5 client should be able to connect to the
proxy client.
Expand All @@ -17,7 +17,7 @@ Create 2 node config files:
```json
"apps": [
{
"app": "therealproxy",
"app": "socksproxy",
"version": "1.0",
"auto_start": true,
"port": 3,
Expand All @@ -31,7 +31,7 @@ Create 2 node config files:
```json
"apps": [
{
"app": "therealproxy-client",
"app": "socksproxy-client",
"version": "1.0",
"auto_start": true,
"port": 33,
Expand All @@ -43,8 +43,8 @@ Create 2 node config files:
Compile binaries and start 2 nodes:

```sh
$ go build -o apps/therealproxy.v1.0 ./cmd/apps/therealproxy
$ go build -o apps/therealproxy-client.v1.0 ./cmd/apps/therealproxy-client
$ go build -o apps/socksproxy.v1.0 ./cmd/apps/therealproxy
$ go build -o apps/socksproxy-client.v1.0 ./cmd/apps/therealproxy-client
$ ./skywire-node skywire1.json
$ ./skywire-node skywire2.json
```
Expand Down
2 changes: 1 addition & 1 deletion cmd/apps/therealproxy/therealproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func main() {
var passcode = flag.String("passcode", "", "Authorise user against this passcode")
flag.Parse()

config := &app.Config{AppName: "therealproxy", AppVersion: "1.0", ProtocolVersion: "0.0.1"}
config := &app.Config{AppName: "socksproxy", AppVersion: "1.0", ProtocolVersion: "0.0.1"}
socksApp, err := app.Setup(config)
if err != nil {
log.Fatal("Setup failure: ", err)
Expand Down
6 changes: 3 additions & 3 deletions cmd/apps/therealssh-client/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Skywire SSH client app

`therealssh-client` app implements client for the SSH app.
`SSH-client` app implements client for the SSH app.

It starts RCP interface for `therealssh-cli` and handles incoming requests to
It starts RCP interface for `SSH-cli` and handles incoming requests to
the remote node via `skywire` connection.

Please check docs for `therealssh` app for further instructions.
Please check docs for `SSH` app for further instructions.
2 changes: 1 addition & 1 deletion cmd/apps/therealssh-client/therealssh-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func main() {
var debug = flag.Bool("debug", false, "enable debug messages")
flag.Parse()

config := &app.Config{AppName: "therealssh-client", AppVersion: "1.0", ProtocolVersion: "0.0.1"}
config := &app.Config{AppName: "SSH-client", AppVersion: "1.0", ProtocolVersion: "0.0.1"}
sshApp, err := app.Setup(config)
if err != nil {
log.Fatal("Setup failure: ", err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/apps/therealssh/therealssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func main() {

flag.Parse()

config := &app.Config{AppName: "therealssh", AppVersion: "1.0", ProtocolVersion: "0.0.1"}
config := &app.Config{AppName: "SSH", AppVersion: "1.0", ProtocolVersion: "0.0.1"}
sshApp, err := app.Setup(config)
if err != nil {
log.Fatal("Setup failure: ", err)
Expand Down
4 changes: 2 additions & 2 deletions cmd/skywire-cli/commands/node/gen-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ func defaultConfig() *node.Config {
passcode := base64.StdEncoding.EncodeToString(cipher.RandByte(8))
conf.Apps = []node.AppConfig{
{App: "skychat", Version: "1.0", Port: 1, AutoStart: true, Args: []string{}},
{App: "therealssh", Version: "1.0", Port: 2, AutoStart: true, Args: []string{}},
{App: "therealproxy", Version: "1.0", Port: 3, AutoStart: true, Args: []string{"-passcode", passcode}},
{App: "SSH", Version: "1.0", Port: 2, AutoStart: true, Args: []string{}},
{App: "socksproxy", Version: "1.0", Port: 3, AutoStart: true, Args: []string{"-passcode", passcode}},
}
conf.TrustedNodes = []cipher.PubKey{}

Expand Down
2 changes: 1 addition & 1 deletion cmd/skywire-node/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"ports": [1]
},
{
"app": "therealssh-server",
"app": "SSH-server",
"auto_start": true,
"ports": [2]
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/therealssh-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CLI for SSH app

`therealssh-cli` implements PTY related operations for SSH app.
`SSH-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.
4 changes: 2 additions & 2 deletions cmd/therealssh-cli/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ var (
)

var rootCmd = &cobra.Command{
Use: "therealssh-cli [user@]remotePK [command] [args...]",
Short: "Client for the therealssh-client app",
Use: "SSH-cli [user@]remotePK [command] [args...]",
Short: "Client for the SSH-client app",
Args: cobra.MinimumNArgs(1),
Run: func(_ *cobra.Command, args []string) {
client, err := rpc.DialHTTP("tcp", rpcAddr)
Expand Down
2 changes: 1 addition & 1 deletion internal/therealssh/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/skycoin/skywire/pkg/app"
)

// Port reserved for therealssh app
// Port reserved for SSH app
const Port = 2

// Debug enables debug messages.
Expand Down
2 changes: 1 addition & 1 deletion pkg/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const Version = "0.0.1"

const supportedProtocolVersion = "0.0.1"

var reservedPorts = map[uint16]string{0: "router", 1: "skychat", 2: "therealssh", 3: "therealproxy"}
var reservedPorts = map[uint16]string{0: "router", 1: "skychat", 2: "therealssh", 3: "socksproxy"}

// AppState defines state parameters for a registered App.
type AppState struct {
Expand Down

0 comments on commit bc24216

Please sign in to comment.