Skip to content

Commit 9771114

Browse files
release: v0.7.1 (#181)
2 parents a628afa + 7e30997 commit 9771114

File tree

8 files changed

+261
-341
lines changed

8 files changed

+261
-341
lines changed

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ jobs:
1818

1919
steps:
2020
- name: Checkout repository
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222

2323
- name: Initialize CodeQL
24-
uses: github/codeql-action/init@v2
24+
uses: github/codeql-action/init@v3
2525
with:
2626
languages: ${{ matrix.languages }}
2727
queries: security-extended,security-and-quality
2828

2929
- name: Autobuild
30-
uses: github/codeql-action/autobuild@v2
30+
uses: github/codeql-action/autobuild@v3
3131

3232
- name: Perform CodeQL Analysis
33-
uses: github/codeql-action/analyze@v2
33+
uses: github/codeql-action/analyze@v3
3434
with:
3535
category: /language:${{ matrix.languages }}

.github/workflows/docker-publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@ jobs:
1616

1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020

2121
- name: Setup Docker buildx
22-
uses: docker/setup-buildx-action@v2
22+
uses: docker/setup-buildx-action@v3
2323

2424
- name: Log into registry ${{ env.REGISTRY }}
25-
uses: docker/login-action@v2
25+
uses: docker/login-action@v3
2626
with:
2727
registry: ${{ env.REGISTRY }}
2828
username: ${{ github.repository_owner }}
2929
password: ${{ secrets.GITHUB_TOKEN }}
3030

3131
- name: Extract Docker metadata
3232
id: meta
33-
uses: docker/metadata-action@v4
33+
uses: docker/metadata-action@v5
3434
with:
3535
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
3636

3737
- name: Build and push Docker image
38-
uses: docker/build-push-action@v4
38+
uses: docker/build-push-action@v5
3939
with:
4040
context: .
4141
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.20-alpine3.17 AS build
1+
FROM golang:1.21-alpine3.19 AS build
22

33
COPY . /root/dvpn-node/
44

@@ -9,12 +9,12 @@ RUN --mount=target=/go/pkg/mod,type=cache \
99
git clone --branch=master --depth=1 https://github.com/handshake-org/hnsd.git /root/hnsd && \
1010
cd /root/hnsd/ && bash autogen.sh && sh configure && make --jobs=$(nproc)
1111

12-
FROM alpine:3.17
12+
FROM alpine:3.19
1313

1414
COPY --from=build /go/bin/sentinelnode /usr/local/bin/process
1515
COPY --from=build /root/hnsd/hnsd /usr/local/bin/hnsd
1616

17-
RUN apk add --no-cache unbound-libs v2ray wireguard-tools && \
17+
RUN apk add --no-cache iptables unbound-libs v2ray wireguard-tools && \
1818
rm -rf /etc/v2ray/ /usr/share/v2ray/
1919

2020
CMD ["process"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
[![Tag](https://img.shields.io/github/tag/sentinel-official/dvpn-node.svg)](https://github.com/sentinel-official/dvpn-node/releases/latest)
99
[![TotalLines](https://img.shields.io/tokei/lines/github/sentinel-official/dvpn-node)]()
1010

11-
For documentation click [here](https://docs.sentinel.co/dVPN-node/setup "here")
11+
For documentation click [here](https://docs.sentinel.co/node-setup)

api/session/handlers.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package session
22

33
import (
44
"fmt"
5+
"math"
56
"net/http"
67

78
sdk "github.com/cosmos/cosmos-sdk/types"
@@ -194,7 +195,12 @@ func HandlerAddSession(ctx *context.Context) gin.HandlerFunc {
194195
return
195196
}
196197

197-
remainingBytes = alloc.GrantedBytes.Sub(alloc.UtilisedBytes).Int64()
198+
diff := alloc.GrantedBytes.Sub(alloc.UtilisedBytes)
199+
if diff.IsInt64() {
200+
remainingBytes = diff.Int64()
201+
} else {
202+
remainingBytes = math.MaxInt64
203+
}
198204
}
199205

200206
var items []types.Session

go.mod

Lines changed: 44 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
module github.com/sentinel-official/dvpn-node
22

3-
go 1.20
3+
go 1.21
44

55
require (
6-
github.com/avast/retry-go/v4 v4.5.0
6+
github.com/avast/retry-go/v4 v4.5.1
77
github.com/cosmos/cosmos-sdk v0.45.16
88
github.com/cosmos/go-bip39 v1.0.0
9-
github.com/gin-contrib/cors v1.4.0
9+
github.com/gin-contrib/cors v1.5.0
1010
github.com/gin-gonic/gin v1.9.1
1111
github.com/pkg/errors v0.9.1
12-
github.com/rs/zerolog v1.30.0
13-
github.com/sentinel-official/hub v0.11.1
14-
github.com/showwin/speedtest-go v1.6.3
12+
github.com/rs/zerolog v1.31.0
13+
github.com/sentinel-official/hub v0.11.3
14+
github.com/showwin/speedtest-go v1.6.10
1515
github.com/soheilhy/cmux v0.1.5
16-
github.com/spf13/cobra v1.7.0
17-
github.com/spf13/viper v1.16.0
16+
github.com/spf13/cobra v1.8.0
17+
github.com/spf13/viper v1.18.2
1818
github.com/tendermint/tendermint v0.34.27
19-
github.com/v2fly/v2ray-core/v5 v5.7.0
20-
golang.org/x/crypto v0.12.0
21-
google.golang.org/grpc v1.57.0
19+
github.com/v2fly/v2ray-core/v5 v5.13.0
20+
golang.org/x/crypto v0.17.0
21+
google.golang.org/grpc v1.60.0
2222
google.golang.org/protobuf v1.31.0
23-
gorm.io/driver/sqlite v1.5.3
24-
gorm.io/gorm v1.25.3
23+
gorm.io/driver/sqlite v1.5.4
24+
gorm.io/gorm v1.25.5
2525
)
2626

2727
require (
@@ -40,11 +40,11 @@ require (
4040
github.com/beorn7/perks v1.0.1 // indirect
4141
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
4242
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
43-
github.com/bytedance/sonic v1.10.0 // indirect
43+
github.com/bytedance/sonic v1.10.2 // indirect
4444
github.com/cespare/xxhash v1.1.0 // indirect
4545
github.com/cespare/xxhash/v2 v2.2.0 // indirect
4646
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
47-
github.com/chenzhuoyu/iasm v0.9.0 // indirect
47+
github.com/chenzhuoyu/iasm v0.9.1 // indirect
4848
github.com/cockroachdb/errors v1.9.1 // indirect
4949
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
5050
github.com/cockroachdb/pebble v0.0.0-20220817183557-09c6e030a677 // indirect
@@ -60,38 +60,38 @@ require (
6060
github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect
6161
github.com/creachadair/taskgroup v0.3.2 // indirect
6262
github.com/danieljoos/wincred v1.1.2 // indirect
63-
github.com/davecgh/go-spew v1.1.1 // indirect
63+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
6464
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
6565
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
6666
github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
6767
github.com/dgraph-io/ristretto v0.1.1 // indirect
6868
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
69-
github.com/dgryski/go-metro v0.0.0-20200812162917-85c65e2d0165 // indirect
69+
github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140 // indirect
7070
github.com/dustin/go-humanize v1.0.1 // indirect
7171
github.com/dvsekhvalnov/jose2go v1.5.0 // indirect
7272
github.com/felixge/httpsnoop v1.0.1 // indirect
73-
github.com/fsnotify/fsnotify v1.6.0 // indirect
74-
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
73+
github.com/fsnotify/fsnotify v1.7.0 // indirect
74+
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
7575
github.com/getsentry/sentry-go v0.17.0 // indirect
7676
github.com/gin-contrib/sse v0.1.0 // indirect
7777
github.com/go-kit/kit v0.12.0 // indirect
7878
github.com/go-kit/log v0.2.1 // indirect
7979
github.com/go-logfmt/logfmt v0.5.1 // indirect
8080
github.com/go-playground/locales v0.14.1 // indirect
8181
github.com/go-playground/universal-translator v0.18.1 // indirect
82-
github.com/go-playground/validator/v10 v10.15.1 // indirect
82+
github.com/go-playground/validator/v10 v10.16.0 // indirect
8383
github.com/goccy/go-json v0.10.2 // indirect
8484
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
8585
github.com/gogo/gateway v1.1.0 // indirect
8686
github.com/gogo/protobuf v1.3.3 // indirect
87-
github.com/golang/glog v1.1.1 // indirect
87+
github.com/golang/glog v1.1.2 // indirect
8888
github.com/golang/protobuf v1.5.3 // indirect
8989
github.com/golang/snappy v0.0.4 // indirect
9090
github.com/google/btree v1.1.2 // indirect
9191
github.com/google/orderedcode v0.0.1 // indirect
9292
github.com/gorilla/handlers v1.5.1 // indirect
9393
github.com/gorilla/mux v1.8.0 // indirect
94-
github.com/gorilla/websocket v1.5.0 // indirect
94+
github.com/gorilla/websocket v1.5.1 // indirect
9595
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
9696
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
9797
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
@@ -107,8 +107,8 @@ require (
107107
github.com/jinzhu/now v1.1.5 // indirect
108108
github.com/jmhodges/levigo v1.0.0 // indirect
109109
github.com/json-iterator/go v1.1.12 // indirect
110-
github.com/klauspost/compress v1.16.7 // indirect
111-
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
110+
github.com/klauspost/compress v1.17.0 // indirect
111+
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
112112
github.com/kr/pretty v0.3.1 // indirect
113113
github.com/kr/text v0.2.0 // indirect
114114
github.com/leodido/go-urn v1.2.4 // indirect
@@ -117,19 +117,19 @@ require (
117117
github.com/linxGnu/grocksdb v1.7.10 // indirect
118118
github.com/magiconair/properties v1.8.7 // indirect
119119
github.com/mattn/go-colorable v0.1.13 // indirect
120-
github.com/mattn/go-isatty v0.0.19 // indirect
121-
github.com/mattn/go-sqlite3 v1.14.17 // indirect
120+
github.com/mattn/go-isatty v0.0.20 // indirect
121+
github.com/mattn/go-sqlite3 v1.14.19 // indirect
122122
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
123123
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect
124124
github.com/minio/highwayhash v1.0.2 // indirect
125125
github.com/mitchellh/mapstructure v1.5.0 // indirect
126126
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
127127
github.com/modern-go/reflect2 v1.0.2 // indirect
128128
github.com/mtibben/percent v0.2.1 // indirect
129-
github.com/pelletier/go-toml/v2 v2.0.9 // indirect
129+
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
130130
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
131131
github.com/pires/go-proxyproto v0.7.0 // indirect
132-
github.com/pmezard/go-difflib v1.0.0 // indirect
132+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
133133
github.com/prometheus/client_golang v1.16.0 // indirect
134134
github.com/prometheus/client_model v0.3.0 // indirect
135135
github.com/prometheus/common v0.42.0 // indirect
@@ -140,11 +140,13 @@ require (
140140
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect
141141
github.com/rogpeppe/go-internal v1.9.0 // indirect
142142
github.com/rs/cors v1.8.2 // indirect
143+
github.com/sagikazarmark/locafero v0.4.0 // indirect
144+
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
143145
github.com/sasha-s/go-deadlock v0.3.1 // indirect
144146
github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb // indirect
145-
github.com/spf13/afero v1.9.5 // indirect
146-
github.com/spf13/cast v1.5.1 // indirect
147-
github.com/spf13/jwalterweatherman v1.1.0 // indirect
147+
github.com/sourcegraph/conc v0.3.0 // indirect
148+
github.com/spf13/afero v1.11.0 // indirect
149+
github.com/spf13/cast v1.6.0 // indirect
148150
github.com/spf13/pflag v1.0.5 // indirect
149151
github.com/stretchr/testify v1.8.4 // indirect
150152
github.com/subosito/gotenv v1.6.0 // indirect
@@ -154,20 +156,21 @@ require (
154156
github.com/tendermint/tm-db v0.6.7 // indirect
155157
github.com/tidwall/btree v1.5.0 // indirect
156158
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
157-
github.com/ugorji/go/codec v1.2.11 // indirect
159+
github.com/ugorji/go/codec v1.2.12 // indirect
158160
github.com/v2fly/ss-bloomring v0.0.0-20210312155135-28617310f63e // indirect
159161
github.com/zondax/hid v0.9.1 // indirect
160162
github.com/zondax/ledger-go v0.14.1 // indirect
161163
go.etcd.io/bbolt v1.3.7 // indirect
162-
golang.org/x/arch v0.4.0 // indirect
163-
golang.org/x/exp v0.0.0-20230131160201-f062dba9d201 // indirect
164-
golang.org/x/net v0.14.0 // indirect
165-
golang.org/x/sys v0.11.0 // indirect
166-
golang.org/x/term v0.11.0 // indirect
167-
golang.org/x/text v0.12.0 // indirect
168-
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
169-
google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5 // indirect
170-
google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878 // indirect
164+
go.uber.org/multierr v1.11.0 // indirect
165+
golang.org/x/arch v0.6.0 // indirect
166+
golang.org/x/exp v0.0.0-20231214170342-aacd6d4b4611 // indirect
167+
golang.org/x/net v0.19.0 // indirect
168+
golang.org/x/sys v0.15.0 // indirect
169+
golang.org/x/term v0.15.0 // indirect
170+
golang.org/x/text v0.14.0 // indirect
171+
google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect
172+
google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect
173+
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect
171174
gopkg.in/ini.v1 v1.67.0 // indirect
172175
gopkg.in/yaml.v2 v2.4.0 // indirect
173176
gopkg.in/yaml.v3 v3.0.1 // indirect

0 commit comments

Comments
 (0)