Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge v0.1.0 #298

Merged
merged 117 commits into from
Apr 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
66b32f2
Change transport type preference
nkryuchkov Mar 10, 2020
5902465
Fix an error
nkryuchkov Mar 10, 2020
05bcab9
Send router packets asynchronously
nkryuchkov Mar 10, 2020
6ba2da5
Return an error if STCP table doesn't have requested PK
nkryuchkov Mar 10, 2020
6183cf5
Expand flag description
nkryuchkov Mar 11, 2020
c681996
Make changes suggested by @evanlinjin
nkryuchkov Mar 11, 2020
13b39e8
Merge pull request #222 from nkryuchkov/feature/tp-type-preference
nkryuchkov Mar 12, 2020
b975415
Fix possible double logging of stopping
nkryuchkov Mar 12, 2020
27e1672
Merge pull request #223 from nkryuchkov/feature/async-router-packets
nkryuchkov Mar 12, 2020
3dfb92e
Put apps in a separate directory
nkryuchkov Mar 12, 2020
c589d85
Fix version format
nkryuchkov Mar 13, 2020
354654e
Merge pull request #228 from nkryuchkov/fix/put-apps-in-dir
nkryuchkov Mar 16, 2020
9748acd
Add script to generate SSL cert, install NPM deps and run the dev server
Darkren Mar 18, 2020
6202fe5
Replace unix pipes with TCP sockets
Darkren Mar 19, 2020
322b6df
Change hypervisor's default config to have auth disabled and HTTP add…
Darkren Mar 19, 2020
134c68f
Make server address be passed as a single string (no separate host an…
Darkren Mar 20, 2020
1ddf8ed
Add latest manager UI build
Darkren Mar 20, 2020
72f5976
Merge branch 'master' into develop
jdknives Mar 20, 2020
973ee39
Integrate manager UI within hypervisor
Darkren Mar 22, 2020
9b79181
Add default value for hypervisor's web dir
Darkren Mar 22, 2020
ae77299
Fix `/user` endpoint to work properly if no auth enabled
Darkren Mar 22, 2020
2c14585
Fix hypervisor's README
Darkren Mar 22, 2020
c7636f3
Try to fix hypervisor tests
Darkren Mar 22, 2020
68344e8
Update vendor
Darkren Mar 22, 2020
17dbeb0
Fix hypervisor's tests
Darkren Mar 22, 2020
60bc825
Merge pull request #235 from jdknives/develop
jdknives Mar 22, 2020
7ffdc8a
Merge branch 'develop' of github.com:SkycoinProject/skywire-mainnet i…
Darkren Mar 23, 2020
5eecaac
Change hypervisor `gen-config` to generate `hash_key` and `block_key`…
Darkren Mar 23, 2020
3ded5bf
Merge pull request #236 from Darkren/feature/simplify-manager-ui-buil…
jdknives Mar 23, 2020
b5629fa
Move app server addr to constant
Darkren Mar 23, 2020
3ba933a
Merge pull request #231 from Darkren/feature/replace-unix-pipes
jdknives Mar 23, 2020
42a78ff
Update bbolt version, remove workaround
nkryuchkov Mar 23, 2020
ce9aaa9
Merge pull request #240 from nkryuchkov/fix/remove-tests-workaround
jdknives Mar 23, 2020
1a26ecb
Add `--retain-keys` command
Darkren Mar 24, 2020
db69454
Merge pull request #242 from Darkren/feature/retain-keys-on-config-ge…
jdknives Mar 24, 2020
df23cb9
Make cookie's `secure` value false by default
Darkren Mar 24, 2020
5adcdcd
Merge pull request #243 from Darkren/fix/manager-ui-login
jdknives Mar 24, 2020
22a9fd9
Use default values if required visor config fields are empty
nkryuchkov Mar 24, 2020
fa7bafc
Set default AppServerSockFile in Visor config if it is not set
nkryuchkov Mar 24, 2020
9fe29e7
Fix default config generation
nkryuchkov Mar 24, 2020
e2eaeea
Merge branch 'develop' into feature/fill-config-defaults
nkryuchkov Mar 24, 2020
733077e
Fix errors after merging
nkryuchkov Mar 24, 2020
44de409
Return Version to Visor config
nkryuchkov Mar 24, 2020
61a26f2
Output PK in Visor logs
nkryuchkov Mar 24, 2020
6ba3938
Improve the error messages the manager shows
Senyoret1 Mar 24, 2020
ae96c9a
Set correct name for KeyPair in Visor config
nkryuchkov Mar 25, 2020
540afaf
Add a forgotten TODO
nkryuchkov Mar 25, 2020
c3c1e8f
Fix JSON names for config fields
nkryuchkov Mar 25, 2020
3c5f8cd
Merge pull request #246 from nkryuchkov/feature/fill-config-defaults
jdknives Mar 25, 2020
bf4d499
Merge pull request #249 from Senyoret1/error-msg
jdknives Mar 25, 2020
ced5e53
Start adding configuration options for some apps in the manager
Senyoret1 Mar 25, 2020
7a1ddee
Make the manager open the terminal with the same protocol
Senyoret1 Mar 25, 2020
edeb262
Fix incorrectly renamed "Uptime" to "UptimeTracker"
nkryuchkov Mar 26, 2020
54de424
Merge pull request #254 from nkryuchkov/fix/uptime-tracker
nkryuchkov Mar 26, 2020
fae9e4c
Generate PubKey from SecKey if only SecKey is set in Visor config
nkryuchkov Mar 26, 2020
cc6721e
Remove `static` prefix for Visor keys
nkryuchkov Mar 26, 2020
d5a26e7
Remove unnecessary config file
nkryuchkov Mar 26, 2020
bfae7a3
Change default cookie config
Darkren Mar 26, 2020
84ad57a
Merge pull request #252 from Senyoret1/http
jdknives Mar 26, 2020
7360b76
Flush default values in Visor config to disk if they are not set
nkryuchkov Mar 26, 2020
ea190a5
Fix writing missed default values to config
nkryuchkov Mar 26, 2020
518e552
Make the session cookie work with the terminal
Senyoret1 Mar 26, 2020
48e8404
Improvements for the configuration options in the manager
Senyoret1 Mar 26, 2020
91f6cd0
Merge remote-tracking branch 'upstream/develop' into app-config
Senyoret1 Mar 26, 2020
59026ea
Merge pull request #256 from nkryuchkov/feature/visor-pubkey-from-seckey
jdknives Mar 26, 2020
a183cfe
Added --secret-key,-s flag to gen-config. #262
Mar 27, 2020
a6dab23
Merge pull request #265 from SkycoinProject/master
nkryuchkov Mar 27, 2020
4f4e4fb
Merge pull request #263 from evanlinjin/feature/visor-gen-config-sk-flag
Mar 27, 2020
4b38d32
Fix panic on migration of old key pair
nkryuchkov Mar 27, 2020
6dfb639
Merge pull request #267 from nkryuchkov/fix/old-keys-panic
jdknives Mar 27, 2020
1a9be99
Merge pull request #258 from Senyoret1/cookie
jdknives Mar 27, 2020
b34c36b
Merge pull request #257 from Darkren/fix/dmsgpty-in-manager-ui
nkryuchkov Mar 27, 2020
b633dc2
Finish adding to the manager initial config options for the apps
Senyoret1 Mar 28, 2020
9bc682a
Add tests for the manager to Travis CI
Senyoret1 Mar 28, 2020
bda2242
Show the visor version on the manager
Senyoret1 Mar 28, 2020
21325ce
Update the Spanish translation
Senyoret1 Mar 28, 2020
3f845ff
Make the manager work with http while using the test server
Senyoret1 Mar 28, 2020
6fcb14d
Fix a problem while navigating with the manager
Senyoret1 Mar 28, 2020
e43fcb2
Small fix for the manager
Senyoret1 Mar 30, 2020
d8bcb79
Merge pull request #253 from Senyoret1/app-config
jdknives Mar 30, 2020
eb97385
Merge pull request #275 from Senyoret1/navigation
jdknives Mar 30, 2020
966de2d
Merge pull request #272 from Senyoret1/version
jdknives Mar 30, 2020
ccf283d
Merge pull request #273 from Senyoret1/esp1
jdknives Mar 30, 2020
507c7b3
Merge pull request #274 from Senyoret1/proxy
jdknives Mar 30, 2020
f668f9b
Merge pull request #271 from Senyoret1/travis
jdknives Mar 30, 2020
1430272
Update the Spanish translation of the manager
Senyoret1 Mar 31, 2020
9c251a7
Fix setup node PKs
nkryuchkov Mar 31, 2020
454831a
Merge pull request #283 from nkryuchkov/fix/setup-pk
jdknives Mar 31, 2020
3f53899
Add hypervisor to goreleaser
nkryuchkov Apr 1, 2020
30e5cd8
Expose skyenv module
nkryuchkov Apr 1, 2020
7f20536
Merge pull request #286 from nkryuchkov/feature/goreleaser-hypervisor
jdknives Apr 1, 2020
40c719e
Merge pull request #281 from Senyoret1/esp3
jdknives Apr 1, 2020
20f61d8
Rebuilt frontend
Darkren Apr 1, 2020
ab9d0d5
Merge pull request #287 from nkryuchkov/feature/expose-skyenv
jdknives Apr 1, 2020
8e7140d
Fix?
Darkren Apr 1, 2020
7b3adaf
Small fix
Darkren Apr 1, 2020
7a5bd11
Fix skysocks-client start with edited server PK config if on visor st…
nkryuchkov Apr 1, 2020
b57b982
Merge pull request #288 from Darkren/fix/hypervisor-pub-key-setting
jdknives Apr 1, 2020
b6a4036
Revert sending router packets asynchronously
nkryuchkov Apr 1, 2020
2abbc62
Hypervisor improvements.
Apr 2, 2020
a9082b4
Various cleanups and refactoring.
Apr 2, 2020
10ccf12
Merge branch 'develop' into feature/statik-hypervisor
Apr 2, 2020
1b92581
Change ports for skychat, skysocks, hypervisor API/UI
nkryuchkov Apr 2, 2020
372d532
Change port in the packed frontend
nkryuchkov Apr 2, 2020
e391799
Merge pull request #291 from nkryuchkov/fix/revert-async-router-packets
jdknives Apr 2, 2020
a678dd3
Merge pull request #294 from nkryuchkov/fix/change-ports
jdknives Apr 2, 2020
beb4da7
Improved appearance of build-ui target.
Apr 2, 2020
97e1c7e
Format.
Apr 2, 2020
f73fe86
Comment out failing tests
nkryuchkov Apr 2, 2020
2dfa5e4
Merge branch 'develop' into feature/statik-hypervisor
Apr 2, 2020
4d1aef9
Format and tidy.
Apr 2, 2020
22dfac7
Merge pull request #293 from evanlinjin/feature/statik-hypervisor
jdknives Apr 2, 2020
d3e4e3f
Merge pull request #295 from nkryuchkov/fix/comment-out-failing-tests
jdknives Apr 2, 2020
73b4c1d
Update dmsg version
nkryuchkov Apr 2, 2020
1c061a3
Merge branch 'master' into merge/develop-to-master
nkryuchkov Apr 2, 2020
a25070c
Merge pull request #296 from nkryuchkov/fix/vendor-dmsg
nkryuchkov Apr 2, 2020
82397d5
Merge pull request #297 from nkryuchkov/merge/develop-to-master
nkryuchkov Apr 2, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*.test
*.out
.DS_Store
*.pem

.idea/

Expand All @@ -18,6 +19,7 @@ pkg/visor/apps/
pkg/visor/bar/
pkg/visor/foo/

/bin
/node
/users.db
/hypervisor
Expand Down
24 changes: 20 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,24 @@ builds:
- CGO_ENABLED=0
main: ./cmd/skywire-cli/
ldflags: -s -w -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.version={{.Version}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.commit={{.ShortCommit}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.date={{.Date}}
- id: hypervisor
binary: hypervisor
goos:
- linux
- darwin
goarch:
- amd64
- 386
- arm64
- arm
goarm:
- 7
env:
- CGO_ENABLED=0
main: ./cmd/hypervisor/
ldflags: -s -w -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.version={{.Version}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.commit={{.ShortCommit}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.date={{.Date}}
- id: skychat
binary: skychat
binary: apps/skychat
goos:
- linux
- darwin
Expand All @@ -53,7 +69,7 @@ builds:
main: ./cmd/apps/skychat/
ldflags: -s -w -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.version={{.Version}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.commit={{.ShortCommit}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.date={{.Date}}
- id: skysocks
binary: skysocks
binary: apps/skysocks
goos:
- linux
- darwin
Expand All @@ -69,7 +85,7 @@ builds:
main: ./cmd/apps/skysocks/
ldflags: -s -w -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.version={{.Version}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.commit={{.ShortCommit}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.date={{.Date}}
- id: skysocks-client
binary: skysocks-client
binary: apps/skysocks-client
goos:
- linux
- darwin
Expand All @@ -87,7 +103,7 @@ builds:
archives:
- format: tar.gz
wrap_in_directory: false
name_template: 'skywire-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
name_template: 'skywire-v{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ matrix:
if: type != pull_request
osx_image: xcode8

before_install:
- nvm install 10.16

install:
- go get -u github.com/FiloSottile/vendorcheck
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.22.2
Expand All @@ -24,3 +27,6 @@ script:
# - make lint TODO(evanlinjin): Temporary due to https://github.com/golangci/golangci-lint/issues/827
- make test
- make test-no-ci
- make install-deps-ui
- make lint-ui
- make build-ui
22 changes: 14 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ COMMIT := $(shell git rev-list -1 HEAD)

PROJECT_BASE := github.com/SkycoinProject/skywire-mainnet
OPTS?=GO111MODULE=on
MANAGER_UI_DIR = static/skywire-manager-src
DOCKER_IMAGE?=skywire-runner # docker image to use for running skywire-visor.`golang`, `buildpack-deps:stretch-scm` is OK too
DOCKER_NETWORK?=SKYNET
DOCKER_NODE?=SKY01
Expand All @@ -29,14 +30,6 @@ ifneq (,$(findstring 64,$(GOARCH)))
TEST_OPTS_BASE:=$(TEST_OPTS_BASE) $(RACE_FLAG)
endif

# TODO: Remove after https://github.com/etcd-io/bbolt/pull/201 is closed.
DISABLE_CHECKPTR_FLAG:=-gcflags=all=-d=checkptr=0
GO_VERSION:=$(shell go version)

ifneq (,$(findstring go1.14,$(GO_VERSION)))
TEST_OPTS_BASE:=$(TEST_OPTS_BASE) $(DISABLE_CHECKPTR_FLAG)
endif

TEST_OPTS_NOCI:=-$(TEST_OPTS_BASE) -v
TEST_OPTS:=$(TEST_OPTS_BASE) -tags no_ci

Expand Down Expand Up @@ -143,6 +136,19 @@ release: ## Build `skywire-visor`, `skywire-cli`, `hypervisor` and apps without
github-release: ## Create a GitHub release
goreleaser --rm-dist

# Manager UI
install-deps-ui: ## Install the UI dependencies
cd $(MANAGER_UI_DIR) && npm ci

lint-ui: ## Lint the UI code
cd $(MANAGER_UI_DIR) && npm run lint

build-ui: ## Builds the UI
cd $(MANAGER_UI_DIR) && npm run build
mkdir -p ${PWD}/bin
${OPTS} GOBIN=${PWD}/bin go get github.com/rakyll/statik
${PWD}/bin/statik -src=$(MANAGER_UI_DIR)/dist -dest ./cmd/hypervisor -f

# Dockerized skywire-visor
docker-image: ## Build docker image `skywire-runner`
docker image build --tag=skywire-runner --rm - < skywire-runner.Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Then you can start a hypervisor with:
$ hypervisor
```

You can open up the hypervisor UI on `localhost:8080`.
You can open up the hypervisor UI on `localhost:8000`.

### Apps

Expand Down
4 changes: 2 additions & 2 deletions cmd/apps/skychat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Create 2 visor config files:
"version": "1.0",
"auto_start": true,
"port": 1,
"args": ["-addr", ":8001"]
"args": ["-addr", ":8002"]
}
]
}
Expand All @@ -49,4 +49,4 @@ $ ./skywire-visor skywire1.json
$ ./skywire-visor skywire2.json
```

Chat interface will be available on ports `8000` and `8001`.
Chat interface will be available on ports `8001` and `8002`.
2 changes: 1 addition & 1 deletion cmd/apps/skychat/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const (
port = routing.Port(1)
)

var addr = flag.String("addr", ":8000", "address to bind")
var addr = flag.String("addr", ":8001", "address to bind")
var r = netutil.NewRetrier(50*time.Millisecond, 5, 2)

var (
Expand Down
5 changes: 3 additions & 2 deletions cmd/apps/skysocks-client/skysocks-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import (
"github.com/SkycoinProject/skycoin/src/util/logging"

"github.com/SkycoinProject/skywire-mainnet/internal/netutil"
"github.com/SkycoinProject/skywire-mainnet/internal/skyenv"
"github.com/SkycoinProject/skywire-mainnet/internal/skysocks"
"github.com/SkycoinProject/skywire-mainnet/pkg/app"
"github.com/SkycoinProject/skywire-mainnet/pkg/app/appnet"
"github.com/SkycoinProject/skywire-mainnet/pkg/routing"
"github.com/SkycoinProject/skywire-mainnet/pkg/skyenv"
"github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo"
)

Expand Down Expand Up @@ -75,7 +75,8 @@ func main() {
}()

if *serverPK == "" {
log.Fatal("Invalid server PubKey")
log.Warn("Empty server PubKey. Exiting")
return
}

pk := cipher.PubKey{}
Expand Down
2 changes: 1 addition & 1 deletion cmd/apps/skysocks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ $ ./skywire-visor skywire2.json
You should be able to connect to a secondary visor via `curl`:

```sh
$ curl -v -x socks5://123456:@localhost:1080 https://api.ipify.org
$ curl -v -x socks5://123456:@localhost:9443 https://api.ipify.org
```
6 changes: 5 additions & 1 deletion cmd/hypervisor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ $ hypervisor gen-config
$ hypervisor --mock
```

By default, the RESTful API is served on `:8080`.
By default, the RESTful API is served on `:8000`.

## Endpoints Documentation

Endpoints are documented in the provided [Postman](https://www.getpostman.com/) file: `hypervisor.postman_collection.json`.

## Web UI

UI is served on the same port as the API (`:8000` by default). Directory to search for the build frontend is passed in the `web_dir` field of the hypervisor's config.

### Authentication information

- When the authentication cookie is invalid, the hypervisor will return code `401`.
Expand Down
9 changes: 8 additions & 1 deletion cmd/hypervisor/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import (
"github.com/SkycoinProject/dmsg"
"github.com/SkycoinProject/dmsg/disc"
"github.com/SkycoinProject/skycoin/src/util/logging"
"github.com/rakyll/statik/fs"
"github.com/spf13/cobra"

_ "github.com/SkycoinProject/skywire-mainnet/cmd/hypervisor/statik" // embedded static files
"github.com/SkycoinProject/skywire-mainnet/pkg/hypervisor"
"github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo"
"github.com/SkycoinProject/skywire-mainnet/pkg/util/pathutil"
Expand Down Expand Up @@ -50,8 +52,13 @@ var rootCmd = &cobra.Command{

conf := prepareConfig(args)

assets, err := fs.New()
if err != nil {
log.Fatalf("Failed to obtain embedded static files: %v", err)
}

// Prepare hypervisor.
hv, err := hypervisor.New(conf)
hv, err := hypervisor.New(assets, conf)
if err != nil {
log.Fatalln("Failed to start hypervisor:", err)
}
Expand Down
Loading