mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 18:54:02 +03:00
REPOSITORY / ScuroNeko/mtg
Compare commits
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
64859069ed | ||
|
|
c1935b4cef | ||
|
|
f48156814b | ||
|
|
9d67414db6 | ||
|
|
a587f85dd2 | ||
|
|
18a52340fa | ||
|
|
981ffb0dbe | ||
|
|
b976e74fc0 | ||
|
|
b2de98c8f9 | ||
|
|
6f3abf0990 | ||
|
|
e74726af70 | ||
|
|
8da55410de |
@@ -30,10 +30,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go_version:
|
go_version:
|
||||||
- ~1.14
|
- ^1.19
|
||||||
- ~1.15
|
|
||||||
- ~1.16
|
|
||||||
- ^1.17
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@@ -73,12 +70,12 @@ jobs:
|
|||||||
- name: Run linter
|
- name: Run linter
|
||||||
uses: golangci/golangci-lint-action@v2
|
uses: golangci/golangci-lint-action@v2
|
||||||
with:
|
with:
|
||||||
version: v1.42.0
|
version: v1.48.0
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
name: Docker
|
name: Docker
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|||||||
+1
-1
@@ -7,5 +7,5 @@
|
|||||||
*.out
|
*.out
|
||||||
mtg
|
mtg
|
||||||
vendor/
|
vendor/
|
||||||
ccbuilds/
|
|
||||||
.bin/
|
.bin/
|
||||||
|
dist/
|
||||||
|
|||||||
+11
-2
@@ -3,11 +3,20 @@ concurrency = 4
|
|||||||
deadline = "2m"
|
deadline = "2m"
|
||||||
tests = true
|
tests = true
|
||||||
skip-dirs = ["vendor"]
|
skip-dirs = ["vendor"]
|
||||||
skip-files = ["version.go"]
|
|
||||||
|
|
||||||
[output]
|
[output]
|
||||||
format = "colored-line-number"
|
format = "colored-line-number"
|
||||||
|
|
||||||
[linters]
|
[linters]
|
||||||
enable-all = true
|
enable-all = true
|
||||||
disable = ["gochecknoglobals", "gas", "gomnd", "goerr113", "exhaustivestruct"]
|
disable = [
|
||||||
|
"containedctx",
|
||||||
|
"exhaustivestruct",
|
||||||
|
"exhaustruct",
|
||||||
|
"gas",
|
||||||
|
"gochecknoglobals",
|
||||||
|
"goerr113",
|
||||||
|
"ireturn",
|
||||||
|
"thelper",
|
||||||
|
"varnamelen",
|
||||||
|
]
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
project_name: mtg
|
||||||
|
|
||||||
|
before:
|
||||||
|
hooks:
|
||||||
|
- go mod tidy
|
||||||
|
- go generate ./...
|
||||||
|
|
||||||
|
builds:
|
||||||
|
- binary: '{{ .ProjectName }}'
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
- freebsd
|
||||||
|
- linux
|
||||||
|
- netbsd
|
||||||
|
- openbsd
|
||||||
|
goarch:
|
||||||
|
- 386
|
||||||
|
- amd64
|
||||||
|
- arm
|
||||||
|
- arm64
|
||||||
|
goarm:
|
||||||
|
- 6
|
||||||
|
- 7
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
- -mod=readonly
|
||||||
|
ldflags: -s -w -X main.version={{ .Version }}
|
||||||
|
ignore:
|
||||||
|
- goos: darwin
|
||||||
|
goarch: 386
|
||||||
|
- goos: freebsd
|
||||||
|
goarch: arm64
|
||||||
|
- goos: netbsd
|
||||||
|
goarch: arm64
|
||||||
|
- goos: openbsd
|
||||||
|
goarch: arm64
|
||||||
|
|
||||||
|
archives:
|
||||||
|
- name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
|
||||||
|
format: tar.gz
|
||||||
|
wrap_in_directory: true
|
||||||
|
format_overrides:
|
||||||
|
- goos: windows
|
||||||
|
format: zip
|
||||||
|
files:
|
||||||
|
- LICENSE
|
||||||
|
- README.md
|
||||||
|
- SECURITY.md
|
||||||
|
|
||||||
|
gomod:
|
||||||
|
proxy: true
|
||||||
|
|
||||||
|
snapshot:
|
||||||
|
name_template: '{{ .Version }}'
|
||||||
|
|
||||||
|
checksum:
|
||||||
|
name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt'
|
||||||
|
|
||||||
|
source:
|
||||||
|
enabled: true
|
||||||
|
name_template: '{{ .ProjectName }}-sources'
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# BUILD STAGE
|
# BUILD STAGE
|
||||||
|
|
||||||
FROM golang:1.17-alpine AS build
|
FROM golang:1.19-alpine AS build
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& apk --no-cache --update add \
|
&& apk --no-cache --update add \
|
||||||
|
|||||||
@@ -2,14 +2,12 @@ ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
|||||||
IMAGE_NAME := mtg
|
IMAGE_NAME := mtg
|
||||||
APP_NAME := $(IMAGE_NAME)
|
APP_NAME := $(IMAGE_NAME)
|
||||||
|
|
||||||
CC_BINARIES := $(shell bash -c "echo -n $(APP_NAME)-{linux,freebsd,openbsd}-{386,amd64} $(APP_NAME)-linux-{arm,arm64}")
|
GOLANGCI_LINT_VERSION := v1.48.0
|
||||||
|
|
||||||
GOLANGCI_LINT_VERSION := v1.42.0
|
|
||||||
|
|
||||||
VERSION_GO := $(shell go version)
|
VERSION_GO := $(shell go version)
|
||||||
VERSION_DATE := $(shell date -Ru)
|
VERSION_DATE := $(shell date -Ru)
|
||||||
VERSION_TAG := $(shell git describe --tags --always)
|
VERSION_TAG := $(shell git describe --tags --always)
|
||||||
COMMON_BUILD_FLAGS := -mod=readonly -ldflags="-s -w -X 'main.version=$(VERSION_TAG) ($(VERSION_GO)) [$(VERSION_DATE)]'"
|
COMMON_BUILD_FLAGS := -trimpath -mod=readonly -ldflags="-s -w -X 'main.version=$(VERSION_TAG) ($(VERSION_GO)) [$(VERSION_DATE)]'"
|
||||||
|
|
||||||
GOBIN := $(ROOT_DIR)/.bin
|
GOBIN := $(ROOT_DIR)/.bin
|
||||||
GOTOOL := env "GOBIN=$(GOBIN)" "PATH=$(ROOT_DIR)/.bin:$(PATH)"
|
GOTOOL := env "GOBIN=$(GOBIN)" "PATH=$(ROOT_DIR)/.bin:$(PATH)"
|
||||||
@@ -29,18 +27,6 @@ $(APP_NAME): build
|
|||||||
static:
|
static:
|
||||||
@env CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo $(COMMON_BUILD_FLAGS) -o "$(APP_NAME)"
|
@env CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo $(COMMON_BUILD_FLAGS) -o "$(APP_NAME)"
|
||||||
|
|
||||||
$(APP_NAME)-%: GOOS=$(shell echo -n "$@" | sed 's?$(APP_NAME)-??' | cut -f1 -d-)
|
|
||||||
$(APP_NAME)-%: GOARCH=$(shell echo -n "$@" | sed 's?$(APP_NAME)-??' | cut -f2 -d-)
|
|
||||||
$(APP_NAME)-%: ccbuilds
|
|
||||||
@env "GOOS=$(GOOS)" "GOARCH=$(GOARCH)" \
|
|
||||||
go build \
|
|
||||||
$(COMMON_BUILD_FLAGS) \
|
|
||||||
-o "./ccbuilds/$(APP_NAME)-$(GOOS)-$(GOARCH)"
|
|
||||||
|
|
||||||
.PHONY: ccbuilds
|
|
||||||
ccbuilds:
|
|
||||||
@rm -rf ./ccbuilds && mkdir -p ./ccbuilds
|
|
||||||
|
|
||||||
vendor: go.mod go.sum
|
vendor: go.mod go.sum
|
||||||
@$(MOD_ON) go mod vendor
|
@$(MOD_ON) go mod vendor
|
||||||
|
|
||||||
@@ -52,9 +38,6 @@ test:
|
|||||||
citest:
|
citest:
|
||||||
@go test -coverprofile=coverage.txt -covermode=atomic -race -v ./...
|
@go test -coverprofile=coverage.txt -covermode=atomic -race -v ./...
|
||||||
|
|
||||||
.PHONY: crosscompile
|
|
||||||
crosscompile: $(CC_BINARIES)
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
@git clean -xfd && \
|
@git clean -xfd && \
|
||||||
@@ -73,8 +56,18 @@ docker:
|
|||||||
doc:
|
doc:
|
||||||
@$(GOTOOL) godoc -http 0.0.0.0:10000
|
@$(GOTOOL) godoc -http 0.0.0.0:10000
|
||||||
|
|
||||||
|
.PHONY: fmt
|
||||||
|
fmt:
|
||||||
|
@$(GOTOOL) gofumpt -w -extra "$(ROOT_DIR)"
|
||||||
|
|
||||||
|
.PHONY: release
|
||||||
|
release:
|
||||||
|
@$(GOTOOL) goreleaser release --snapshot --rm-dist && \
|
||||||
|
find "$(ROOT_DIR)/dist" -type d | grep -vP "dist$$" | xargs -r rm -rf && \
|
||||||
|
rm -f "$(ROOT_DIR)/dist/config.yaml"
|
||||||
|
|
||||||
.PHONY: install-tools
|
.PHONY: install-tools
|
||||||
install-tools: install-tools-lint install-tools-godoc
|
install-tools: install-tools-lint install-tools-godoc install-tools-gofumpt install-tools-goreleaser
|
||||||
|
|
||||||
.PHONY: install-tools-lint
|
.PHONY: install-tools-lint
|
||||||
install-tools-lint:
|
install-tools-lint:
|
||||||
@@ -87,6 +80,14 @@ install-tools-godoc:
|
|||||||
@mkdir -p "$(GOBIN)" || true && \
|
@mkdir -p "$(GOBIN)" || true && \
|
||||||
$(GOTOOL) go get -u golang.org/x/tools/cmd/godoc
|
$(GOTOOL) go get -u golang.org/x/tools/cmd/godoc
|
||||||
|
|
||||||
|
.PHONY: install-tools-gofumpt
|
||||||
|
install-tools-gofumpt: .bin
|
||||||
|
@$(GOTOOL) go install mvdan.cc/gofumpt@latest
|
||||||
|
|
||||||
|
.PHONY: goreleaser
|
||||||
|
install-tools-goreleaser: .bin
|
||||||
|
@$(GOTOOL) go install github.com/goreleaser/goreleaser@latest
|
||||||
|
|
||||||
.PHONY: update-deps
|
.PHONY: update-deps
|
||||||
upgrade-deps:
|
update-deps:
|
||||||
$go get -u && go mod tidy
|
@go get -u && go mod tidy -go=1.18
|
||||||
|
|||||||
@@ -0,0 +1,84 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"crypto/sha256"
|
||||||
|
"encoding/base64"
|
||||||
|
"encoding/binary"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"runtime/debug"
|
||||||
|
"sort"
|
||||||
|
"strconv"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
var version = "dev" // has to be set by ldflags
|
||||||
|
|
||||||
|
const (
|
||||||
|
buildInfoModuleStart byte = iota
|
||||||
|
buildInfoModuleFinish
|
||||||
|
buildInfoModuleDelimeter
|
||||||
|
)
|
||||||
|
|
||||||
|
func getVersion() string {
|
||||||
|
buildInfo, ok := debug.ReadBuildInfo()
|
||||||
|
if !ok {
|
||||||
|
return version
|
||||||
|
}
|
||||||
|
|
||||||
|
date := time.Now()
|
||||||
|
commit := ""
|
||||||
|
goVersion := buildInfo.GoVersion
|
||||||
|
dirtySuffix := ""
|
||||||
|
|
||||||
|
for _, setting := range buildInfo.Settings {
|
||||||
|
switch setting.Key {
|
||||||
|
case "vcs.time":
|
||||||
|
date, _ = time.Parse(time.RFC3339, setting.Value)
|
||||||
|
case "vcs.revision":
|
||||||
|
commit = setting.Value
|
||||||
|
case "vcs.modified":
|
||||||
|
if dirty, _ := strconv.ParseBool(setting.Value); dirty {
|
||||||
|
dirtySuffix = " [dirty]"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hasher := sha256.New()
|
||||||
|
|
||||||
|
checksumModule := func(mod *debug.Module) {
|
||||||
|
hasher.Write([]byte{buildInfoModuleStart})
|
||||||
|
|
||||||
|
io.WriteString(hasher, mod.Path) //nolint: errcheck
|
||||||
|
hasher.Write([]byte{buildInfoModuleDelimeter})
|
||||||
|
|
||||||
|
io.WriteString(hasher, mod.Version) //nolint: errcheck
|
||||||
|
hasher.Write([]byte{buildInfoModuleDelimeter})
|
||||||
|
|
||||||
|
io.WriteString(hasher, mod.Sum) //nolint: errcheck
|
||||||
|
|
||||||
|
hasher.Write([]byte{buildInfoModuleFinish})
|
||||||
|
}
|
||||||
|
|
||||||
|
io.WriteString(hasher, buildInfo.Path) //nolint: errcheck
|
||||||
|
|
||||||
|
binary.Write(hasher, binary.LittleEndian, uint64(1+len(buildInfo.Deps))) //nolint: errcheck
|
||||||
|
|
||||||
|
sort.Slice(buildInfo.Deps, func(i, j int) bool {
|
||||||
|
return buildInfo.Deps[i].Path > buildInfo.Deps[j].Path
|
||||||
|
})
|
||||||
|
|
||||||
|
checksumModule(&buildInfo.Main)
|
||||||
|
|
||||||
|
for _, module := range buildInfo.Deps {
|
||||||
|
checksumModule(module)
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Sprintf("%s (%s: %s on %s%s, modules checksum %s)",
|
||||||
|
version,
|
||||||
|
goVersion,
|
||||||
|
date.Format(time.RFC3339),
|
||||||
|
commit,
|
||||||
|
dirtySuffix,
|
||||||
|
base64.StdEncoding.EncodeToString(hasher.Sum(nil)))
|
||||||
|
}
|
||||||
+6
-6
@@ -146,7 +146,7 @@ func (c *Config) adjustProxyValue(value int) int {
|
|||||||
|
|
||||||
fvalue := float64(value)
|
fvalue := float64(value)
|
||||||
|
|
||||||
newValue := fvalue * 2 * math.Log(float64(c.MultiplexPerConnection))
|
newValue := fvalue * 2 * math.Log(float64(c.MultiplexPerConnection)) //nolint: gomnd
|
||||||
newValue = math.Ceil(newValue)
|
newValue = math.Ceil(newValue)
|
||||||
newValue = math.Max(fvalue, newValue)
|
newValue = math.Max(fvalue, newValue)
|
||||||
|
|
||||||
@@ -208,15 +208,15 @@ func Init(options ...Opt) error { // nolint: gocyclo, funlen, cyclop
|
|||||||
case OptionTypeStatsdTags:
|
case OptionTypeStatsdTags:
|
||||||
C.StatsdTags = opt.Value.(map[string]string) //nolint: forcetypeassert
|
C.StatsdTags = opt.Value.(map[string]string) //nolint: forcetypeassert
|
||||||
case OptionTypeWriteBufferSize:
|
case OptionTypeWriteBufferSize:
|
||||||
C.WriteBuffer = int(opt.Value.(units.Base2Bytes))
|
C.WriteBuffer = int(opt.Value.(units.Base2Bytes)) //nolint: forcetypeassert
|
||||||
case OptionTypeReadBufferSize:
|
case OptionTypeReadBufferSize:
|
||||||
C.ReadBuffer = int(opt.Value.(units.Base2Bytes))
|
C.ReadBuffer = int(opt.Value.(units.Base2Bytes)) //nolint: forcetypeassert
|
||||||
case OptionTypeCloakPort:
|
case OptionTypeCloakPort:
|
||||||
C.CloakPort = int(opt.Value.(uint16))
|
C.CloakPort = int(opt.Value.(uint16)) //nolint: forcetypeassert
|
||||||
case OptionTypeAntiReplayMaxSize:
|
case OptionTypeAntiReplayMaxSize:
|
||||||
C.AntiReplayMaxSize = int(opt.Value.(units.Base2Bytes))
|
C.AntiReplayMaxSize = int(opt.Value.(units.Base2Bytes)) //nolint: forcetypeassert
|
||||||
case OptionTypeMultiplexPerConnection:
|
case OptionTypeMultiplexPerConnection:
|
||||||
C.MultiplexPerConnection = int(opt.Value.(uint))
|
C.MultiplexPerConnection = int(opt.Value.(uint)) //nolint: forcetypeassert
|
||||||
case OptionTypeNTPServers:
|
case OptionTypeNTPServers:
|
||||||
C.NTPServers = opt.Value.([]string) //nolint: forcetypeassert
|
C.NTPServers = opt.Value.([]string) //nolint: forcetypeassert
|
||||||
if len(C.NTPServers) == 0 {
|
if len(C.NTPServers) == 0 {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -46,7 +45,7 @@ func fetchIP(ctx context.Context, network string) (net.IP, error) {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
req, err := http.NewRequest("GET", ifconfigAddress, nil)
|
req, err := http.NewRequest(http.MethodGet, ifconfigAddress, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot create a request: %w", err)
|
return nil, fmt.Errorf("cannot create a request: %w", err)
|
||||||
}
|
}
|
||||||
@@ -54,7 +53,7 @@ func fetchIP(ctx context.Context, network string) (net.IP, error) {
|
|||||||
resp, err := client.Do(req.WithContext(ctx))
|
resp, err := client.Do(req.WithContext(ctx))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if resp != nil {
|
if resp != nil {
|
||||||
io.Copy(ioutil.Discard, resp.Body) // nolint: errcheck
|
io.Copy(io.Discard, resp.Body) //nolint: errcheck
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil, fmt.Errorf("cannot perform a request: %w", err)
|
return nil, fmt.Errorf("cannot perform a request: %w", err)
|
||||||
@@ -62,7 +61,7 @@ func fetchIP(ctx context.Context, network string) (net.IP, error) {
|
|||||||
|
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
respDataBytes, err := ioutil.ReadAll(resp.Body)
|
respDataBytes, err := io.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot read response body: %w", err)
|
return nil, fmt.Errorf("cannot read response body: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -20,8 +20,9 @@ type IPURLs struct {
|
|||||||
BotSecret string `json:"secret_for_mtproxybot"` //nolint: tagliatelle
|
BotSecret string `json:"secret_for_mtproxybot"` //nolint: tagliatelle
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetURLs() (urls IPURLs) {
|
func GetURLs() IPURLs {
|
||||||
secret := ""
|
secret := ""
|
||||||
|
urls := IPURLs{}
|
||||||
|
|
||||||
switch C.SecretMode {
|
switch C.SecretMode {
|
||||||
case SecretModeSimple:
|
case SecretModeSimple:
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ func cloak(one, another io.ReadWriteCloser) {
|
|||||||
another = rwc.NewPing(ctx, another, channelPing)
|
another = rwc.NewPing(ctx, another, channelPing)
|
||||||
wg := &sync.WaitGroup{}
|
wg := &sync.WaitGroup{}
|
||||||
|
|
||||||
wg.Add(2)
|
wg.Add(2) //nolint: gomnd
|
||||||
|
|
||||||
go cloakPipe(one, another, wg)
|
go cloakPipe(one, another, wg)
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +1,22 @@
|
|||||||
module github.com/9seconds/mtg
|
module github.com/9seconds/mtg
|
||||||
|
|
||||||
go 1.17
|
go 1.18
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/VictoriaMetrics/fastcache v1.6.0
|
github.com/VictoriaMetrics/fastcache v1.10.0
|
||||||
github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15
|
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137
|
||||||
github.com/beevik/ntp v0.3.0
|
github.com/beevik/ntp v0.3.0
|
||||||
github.com/golang/snappy v0.0.4 // indirect
|
github.com/golang/snappy v0.0.4 // indirect
|
||||||
github.com/prometheus/client_golang v1.11.0
|
github.com/prometheus/client_golang v1.13.0
|
||||||
github.com/prometheus/common v0.30.0 // indirect
|
github.com/prometheus/common v0.37.0 // indirect
|
||||||
github.com/prometheus/procfs v0.7.3 // indirect
|
github.com/prometheus/procfs v0.8.0 // indirect
|
||||||
github.com/smira/go-statsd v1.3.2
|
github.com/smira/go-statsd v1.3.2
|
||||||
go.uber.org/multierr v1.7.0 // indirect
|
go.uber.org/multierr v1.8.0 // indirect
|
||||||
go.uber.org/zap v1.19.0
|
go.uber.org/zap v1.22.0
|
||||||
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
|
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa
|
||||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5 // indirect
|
golang.org/x/net v0.0.0-20220809012201-f428fae20770 // indirect
|
||||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40
|
golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664 // indirect
|
||||||
golang.org/x/tools v0.1.0 // indirect
|
google.golang.org/protobuf v1.28.1 // indirect
|
||||||
google.golang.org/protobuf v1.27.1 // indirect
|
|
||||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6
|
gopkg.in/alecthomas/kingpin.v2 v2.2.6
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -33,22 +33,21 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
|
|||||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||||
github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o=
|
github.com/VictoriaMetrics/fastcache v1.10.0 h1:5hDJnLsKLpnUEToub7ETuRu8RCkb40woBZAUiKonXzY=
|
||||||
github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw=
|
github.com/VictoriaMetrics/fastcache v1.10.0/go.mod h1:tjiYeEfYXCqacuvYw/7UoDIeJaNxq6132xHICNP77w8=
|
||||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
|
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
|
||||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||||
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
||||||
github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 h1:AUNCr9CiJuwrRYS3XieqF+Z9B9gNxo/eANAJCF2eiN4=
|
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc=
|
||||||
github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
|
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
|
||||||
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8=
|
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8=
|
||||||
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
|
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
|
||||||
github.com/beevik/ntp v0.3.0 h1:xzVrPrE4ziasFXgBVBZJDP0Wg/KpMwk2KHJ4Ba8GrDw=
|
github.com/beevik/ntp v0.3.0 h1:xzVrPrE4ziasFXgBVBZJDP0Wg/KpMwk2KHJ4Ba8GrDw=
|
||||||
github.com/beevik/ntp v0.3.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg=
|
github.com/beevik/ntp v0.3.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg=
|
||||||
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
|
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
|
||||||
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
|
||||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||||
@@ -75,9 +74,11 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2
|
|||||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||||
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
|
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
|
||||||
|
github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0=
|
||||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
||||||
|
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
|
||||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||||
@@ -108,7 +109,6 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
|
|||||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
||||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||||
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
|
||||||
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
||||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||||
@@ -121,8 +121,8 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
|||||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
|
|
||||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
|
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
|
||||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||||
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||||
@@ -143,6 +143,7 @@ github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX
|
|||||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||||
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||||
|
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||||
@@ -160,6 +161,7 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ
|
|||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||||
|
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
@@ -171,8 +173,10 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
|
|||||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||||
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
|
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
|
||||||
github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ=
|
|
||||||
github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
|
github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
|
||||||
|
github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
|
||||||
|
github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU=
|
||||||
|
github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ=
|
||||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||||
@@ -181,14 +185,16 @@ github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T
|
|||||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||||
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
|
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
|
||||||
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
|
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
|
||||||
github.com/prometheus/common v0.30.0 h1:JEkYlQnpzrzQFxi6gnukFPdQ+ac82oRhzMcIduJu/Ug=
|
github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
|
||||||
github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
|
github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE=
|
||||||
|
github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
|
||||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||||
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
|
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
|
||||||
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
||||||
github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU=
|
|
||||||
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
||||||
|
github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo=
|
||||||
|
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
|
||||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||||
@@ -205,7 +211,6 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
|||||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
|
||||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||||
@@ -214,21 +219,19 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
|||||||
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||||
go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
|
go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
|
||||||
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||||
go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0=
|
go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
|
||||||
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
|
go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8=
|
||||||
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=
|
||||||
go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec=
|
go.uber.org/zap v1.22.0 h1:Zcye5DUgBloQ9BaT4qc9BnjOFog5TvBSAGkJ3Nf70c0=
|
||||||
go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=
|
go.uber.org/zap v1.22.0/go.mod h1:H4siCOZOrAolnUPJEkfaSjDqyP+BDS0DdDWzwcgt3+U=
|
||||||
go.uber.org/zap v1.19.0 h1:mZQZefskPPCMIBCSEH0v2/iUqqLrYtaeqwD6FUGUnFE=
|
|
||||||
go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
|
|
||||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g=
|
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c=
|
||||||
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||||
@@ -250,7 +253,6 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl
|
|||||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||||
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
|
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
|
||||||
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||||
golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k=
|
|
||||||
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||||
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
|
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
|
||||||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
||||||
@@ -288,15 +290,18 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/
|
|||||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
|
||||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5 h1:wjuX4b5yYQnEQHzd+CBcrcC6OVR2J1CN6mUy0oSxIPo=
|
|
||||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
|
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||||
|
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||||
|
golang.org/x/net v0.0.0-20220809012201-f428fae20770 h1:dIi4qVdvjZEjiMDv7vhokAZNGnz3kepwuXqFKYDdDMs=
|
||||||
|
golang.org/x/net v0.0.0-20220809012201-f428fae20770/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||||
|
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
@@ -305,7 +310,6 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
|
|||||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
@@ -320,7 +324,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
@@ -339,22 +342,25 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||||||
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 h1:JWgyZ1qgdTaF3N3oxC+MdTV7qvEEgHo3otj+HB5CM7Q=
|
|
||||||
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20220405052023-b1e9470b6e64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664 h1:v1W7bwXHsnLLloWYTVEdvGvA7BHMeBYsPcF0GLDxIRs=
|
||||||
|
golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
@@ -373,7 +379,6 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw
|
|||||||
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
|
||||||
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
@@ -399,12 +404,9 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY
|
|||||||
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||||
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||||
golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY=
|
|
||||||
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||||
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
|
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
|
||||||
@@ -481,8 +483,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
|
|||||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||||
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
|
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
||||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
|
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
|
||||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
@@ -493,13 +495,11 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
||||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
|
||||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
|
||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ func (h *hub) Register(req *protocol.TelegramRequest) (*ProxyConn, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (h *hub) getMux(req *protocol.TelegramRequest) *mux {
|
func (h *hub) getMux(req *protocol.TelegramRequest) *mux {
|
||||||
key := 32767 + int32(req.ClientProtocol.DC()) + 100000*int32(req.ClientProtocol.ConnectionProtocol())
|
key := 32767 + int32(req.ClientProtocol.DC()) + 100000*int32(req.ClientProtocol.ConnectionProtocol()) //nolint: gomnd
|
||||||
|
|
||||||
h.mutex.RLock()
|
h.mutex.RLock()
|
||||||
m, ok := h.muxes[key]
|
m, ok := h.muxes[key]
|
||||||
|
|||||||
@@ -3,18 +3,13 @@ package main
|
|||||||
import (
|
import (
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
"runtime/debug"
|
|
||||||
"strings"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/9seconds/mtg/cli"
|
"github.com/9seconds/mtg/cli"
|
||||||
"github.com/9seconds/mtg/config"
|
"github.com/9seconds/mtg/config"
|
||||||
"github.com/9seconds/mtg/utils"
|
|
||||||
kingpin "gopkg.in/alecthomas/kingpin.v2"
|
kingpin "gopkg.in/alecthomas/kingpin.v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
var version = "dev" // has to be set by ldflags
|
|
||||||
|
|
||||||
var (
|
var (
|
||||||
app = kingpin.New("mtg", "Simple MTPROTO proxy.")
|
app = kingpin.New("mtg", "Simple MTPROTO proxy.")
|
||||||
|
|
||||||
@@ -128,10 +123,6 @@ func main() {
|
|||||||
app.Version(getVersion())
|
app.Version(getVersion())
|
||||||
app.HelpFlag.Short('h')
|
app.HelpFlag.Short('h')
|
||||||
|
|
||||||
if err := utils.SetLimits(); err != nil {
|
|
||||||
cli.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
switch kingpin.MustParse(app.Parse(os.Args[1:])) {
|
switch kingpin.MustParse(app.Parse(os.Args[1:])) {
|
||||||
case generateSecretCommand.FullCommand():
|
case generateSecretCommand.FullCommand():
|
||||||
cli.Generate(*generateSecretType, *generateCloakHost)
|
cli.Generate(*generateSecretType, *generateCloakHost)
|
||||||
@@ -166,25 +157,3 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func getVersion() string {
|
|
||||||
if version != "dev" {
|
|
||||||
return version
|
|
||||||
}
|
|
||||||
|
|
||||||
info, ok := debug.ReadBuildInfo()
|
|
||||||
if !ok {
|
|
||||||
return version
|
|
||||||
}
|
|
||||||
|
|
||||||
builder := strings.Builder{}
|
|
||||||
builder.WriteString(info.Main.Version)
|
|
||||||
|
|
||||||
if info.Main.Sum != "" {
|
|
||||||
builder.WriteString(" (checksum: ")
|
|
||||||
builder.WriteString(info.Main.Sum)
|
|
||||||
builder.WriteRune(')')
|
|
||||||
}
|
|
||||||
|
|
||||||
return builder.String()
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ func (r *HandshakeResponse) Valid() error {
|
|||||||
// NewHandshakeResponse constructs new handshake response from the given
|
// NewHandshakeResponse constructs new handshake response from the given
|
||||||
// data.
|
// data.
|
||||||
func NewHandshakeResponse(data []byte) (*HandshakeResponse, error) {
|
func NewHandshakeResponse(data []byte) (*HandshakeResponse, error) {
|
||||||
if len(data) != 32 {
|
if len(data) != 32 { //nolint: gomnd
|
||||||
return nil, fmt.Errorf("incorrect handshake response length %d", len(data))
|
return nil, fmt.Errorf("incorrect handshake response length %d", len(data))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,17 +29,17 @@ func (r *NonceRequest) Bytes() []byte {
|
|||||||
|
|
||||||
// NewNonceRequest builds new none request based on proxy secret.
|
// NewNonceRequest builds new none request based on proxy secret.
|
||||||
func NewNonceRequest(proxySecret []byte) (*NonceRequest, error) {
|
func NewNonceRequest(proxySecret []byte) (*NonceRequest, error) {
|
||||||
nonce := make([]byte, 16)
|
nonce := make([]byte, 16) //nolint: gomnd
|
||||||
keySelector := make([]byte, 4)
|
keySelector := make([]byte, 4) //nolint: gomnd
|
||||||
cryptoTS := make([]byte, 4)
|
cryptoTS := make([]byte, 4) //nolint: gomnd
|
||||||
|
|
||||||
if _, err := rand.Read(nonce); err != nil {
|
if _, err := rand.Read(nonce); err != nil {
|
||||||
return nil, fmt.Errorf("cannot generate nonce: %w", err)
|
return nil, fmt.Errorf("cannot generate nonce: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
copy(keySelector, proxySecret)
|
copy(keySelector, proxySecret)
|
||||||
|
// 256 ^ 4 - do not know how to name
|
||||||
timestamp := time.Now().Truncate(time.Second).Unix() % 4294967296 // 256 ^ 4 - do not know how to name
|
timestamp := time.Now().Truncate(time.Second).Unix() % 4294967296 //nolint: gomnd
|
||||||
binary.LittleEndian.PutUint32(cryptoTS, uint32(timestamp))
|
binary.LittleEndian.PutUint32(cryptoTS, uint32(timestamp))
|
||||||
|
|
||||||
return &NonceRequest{
|
return &NonceRequest{
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ func (r *NonceResponse) Valid(req *NonceRequest) error {
|
|||||||
|
|
||||||
// NewNonceResponse build new nonce response based on the given data.
|
// NewNonceResponse build new nonce response based on the given data.
|
||||||
func NewNonceResponse(data []byte) (*NonceResponse, error) {
|
func NewNonceResponse(data []byte) (*NonceResponse, error) {
|
||||||
if len(data) != 32 {
|
if len(data) != 32 { //nolint: gomnd
|
||||||
return nil, fmt.Errorf("unexpected message length %d", len(data))
|
return nil, fmt.Errorf("unexpected message length %d", len(data))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,14 +21,14 @@ const (
|
|||||||
var ProxyRequestFlagsEncryptedPrefix [8]byte
|
var ProxyRequestFlagsEncryptedPrefix [8]byte
|
||||||
|
|
||||||
func (r ProxyRequestFlags) Bytes() []byte {
|
func (r ProxyRequestFlags) Bytes() []byte {
|
||||||
converted := make([]byte, 4)
|
converted := make([]byte, 4) //nolint: gomnd
|
||||||
binary.LittleEndian.PutUint32(converted, uint32(r))
|
binary.LittleEndian.PutUint32(converted, uint32(r))
|
||||||
|
|
||||||
return converted
|
return converted
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r ProxyRequestFlags) String() string {
|
func (r ProxyRequestFlags) String() string {
|
||||||
flags := make([]string, 0, 7)
|
flags := make([]string, 0, 7) //nolint: gomnd
|
||||||
|
|
||||||
if r&ProxyRequestFlagsHasAdTag != 0 {
|
if r&ProxyRequestFlagsHasAdTag != 0 {
|
||||||
flags = append(flags, "HAS_AD_TAG")
|
flags = append(flags, "HAS_AD_TAG")
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ type ProxyResponse struct {
|
|||||||
func ParseProxyResponse(packet conntypes.Packet) (*ProxyResponse, error) {
|
func ParseProxyResponse(packet conntypes.Packet) (*ProxyResponse, error) {
|
||||||
var response ProxyResponse
|
var response ProxyResponse
|
||||||
|
|
||||||
if len(packet) < 4 {
|
if len(packet) < 4 { //nolint: gomnd
|
||||||
return nil, fmt.Errorf("incorrect packet length: %d", len(packet))
|
return nil, fmt.Errorf("incorrect packet length: %d", len(packet))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,12 +93,14 @@ func (c *ClientProtocol) Handshake(socket conntypes.StreamReadWriteCloser) (conn
|
|||||||
return stream.NewObfuscated2(socket, encryptor, decryptor), nil
|
return stream.NewObfuscated2(socket, encryptor, decryptor), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ClientProtocol) ReadFrame(socket conntypes.StreamReader) (fm Frame, err error) {
|
func (c *ClientProtocol) ReadFrame(socket conntypes.StreamReader) (Frame, error) {
|
||||||
if _, err = io.ReadFull(handshakeReader{socket}, fm.Bytes()); err != nil {
|
fm := Frame{}
|
||||||
err = fmt.Errorf("cannot extract obfuscated2 frame: %w", err)
|
|
||||||
|
if _, err := io.ReadFull(handshakeReader{socket}, fm.Bytes()); err != nil {
|
||||||
|
return fm, fmt.Errorf("cannot extract obfuscated2 frame: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return fm, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type handshakeReader struct {
|
type handshakeReader struct {
|
||||||
|
|||||||
@@ -44,11 +44,11 @@ func (f *Frame) Unique() []byte {
|
|||||||
return f.data[frameOffsetFirst:frameOffsetDC]
|
return f.data[frameOffsetFirst:frameOffsetDC]
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *Frame) Invert() (nf Frame) {
|
func (f *Frame) Invert() Frame {
|
||||||
nf = *f
|
nf := *f
|
||||||
for i := 0; i < frameLenKey+frameLenIV; i++ {
|
for i := 0; i < frameLenKey+frameLenIV; i++ {
|
||||||
nf.data[frameOffsetFirst+i] = f.data[frameOffsetIV-1-i]
|
nf.data[frameOffsetFirst+i] = f.data[frameOffsetIV-1-i]
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return nf
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ func TelegramProtocol(req *protocol.TelegramRequest) (conntypes.StreamReadWriteC
|
|||||||
return stream.NewObfuscated2(conn, encryptor, decryptor), nil
|
return stream.NewObfuscated2(conn, encryptor, decryptor), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func generateFrame(cp protocol.ClientProtocol) (fm Frame) {
|
func generateFrame(cp protocol.ClientProtocol) Frame {
|
||||||
|
fm := Frame{}
|
||||||
data := fm.Bytes()
|
data := fm.Bytes()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
@@ -47,22 +48,22 @@ func generateFrame(cp protocol.ClientProtocol) (fm Frame) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if data[0] == 0xef {
|
if data[0] == 0xef { //nolint: gomnd
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
val := (uint32(data[3]) << 24) | (uint32(data[2]) << 16) | (uint32(data[1]) << 8) | uint32(data[0])
|
val := (uint32(data[3]) << 24) | (uint32(data[2]) << 16) | (uint32(data[1]) << 8) | uint32(data[0]) //nolint: gomnd, lll
|
||||||
if val == 0x44414548 || val == 0x54534f50 || val == 0x20544547 || val == 0x4954504f || val == 0xeeeeeeee {
|
if val == 0x44414548 || val == 0x54534f50 || val == 0x20544547 || val == 0x4954504f || val == 0xeeeeeeee { //nolint: lll
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
val = (uint32(data[7]) << 24) | (uint32(data[6]) << 16) | (uint32(data[5]) << 8) | uint32(data[4])
|
val = (uint32(data[7]) << 24) | (uint32(data[6]) << 16) | (uint32(data[5]) << 8) | uint32(data[4]) //nolint: gomnd
|
||||||
if val == 0x00000000 {
|
if val == 0x00000000 { //nolint: gomnd
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
copy(fm.Magic(), cp.ConnectionType().Tag())
|
copy(fm.Magic(), cp.ConnectionType().Tag())
|
||||||
|
|
||||||
return
|
return fm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ func directConnection(request *protocol.TelegramRequest) error {
|
|||||||
defer telegramConnRaw.Close()
|
defer telegramConnRaw.Close()
|
||||||
|
|
||||||
wg := &sync.WaitGroup{}
|
wg := &sync.WaitGroup{}
|
||||||
wg.Add(2)
|
wg.Add(2) //nolint: gomnd
|
||||||
|
|
||||||
go directPipe(telegramConnRaw, request.ClientConn, wg, request.Logger)
|
go directPipe(telegramConnRaw, request.ClientConn, wg, request.Logger)
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -32,7 +32,7 @@ func middleConnection(request *protocol.TelegramRequest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
wg := &sync.WaitGroup{}
|
wg := &sync.WaitGroup{}
|
||||||
wg.Add(2)
|
wg.Add(2) //nolint: gomnd
|
||||||
|
|
||||||
go middlePipe(telegramConn, clientConn, wg, request.Logger)
|
go middlePipe(telegramConn, clientConn, wg, request.Logger)
|
||||||
|
|
||||||
@@ -44,7 +44,8 @@ func middleConnection(request *protocol.TelegramRequest) {
|
|||||||
func middlePipe(dst conntypes.PacketAckWriteCloser,
|
func middlePipe(dst conntypes.PacketAckWriteCloser,
|
||||||
src conntypes.PacketAckReadCloser,
|
src conntypes.PacketAckReadCloser,
|
||||||
wg *sync.WaitGroup,
|
wg *sync.WaitGroup,
|
||||||
logger *zap.SugaredLogger) {
|
logger *zap.SugaredLogger,
|
||||||
|
) {
|
||||||
defer func() {
|
defer func() {
|
||||||
dst.Close()
|
dst.Close()
|
||||||
src.Close()
|
src.Close()
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ func (s *statsPrometheus) ClientDisconnected(connectionType conntypes.Connection
|
|||||||
|
|
||||||
func (s *statsPrometheus) changeConnections(connectionType conntypes.ConnectionType,
|
func (s *statsPrometheus) changeConnections(connectionType conntypes.ConnectionType,
|
||||||
addr *net.TCPAddr,
|
addr *net.TCPAddr,
|
||||||
increment float64) {
|
increment float64,
|
||||||
|
) {
|
||||||
labels := [...]string{
|
labels := [...]string{
|
||||||
"intermediate",
|
"intermediate",
|
||||||
"ipv4",
|
"ipv4",
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ func (s *statsStatsd) ClientDisconnected(connectionType conntypes.ConnectionType
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *statsStatsd) changeConnections(connectionType conntypes.ConnectionType, addr *net.TCPAddr, increment int64) {
|
func (s *statsStatsd) changeConnections(connectionType conntypes.ConnectionType, addr *net.TCPAddr, increment int64) {
|
||||||
tags := make([]*statsStatsdTag, 0, 2)
|
tags := make([]*statsStatsdTag, 0, 2) //nolint: gomnd
|
||||||
|
|
||||||
switch connectionType {
|
switch connectionType {
|
||||||
case conntypes.ConnectionTypeAbridged:
|
case conntypes.ConnectionTypeAbridged:
|
||||||
@@ -194,8 +194,8 @@ func newStatsStatsd() Interface {
|
|||||||
return &statsStatsd{
|
return &statsStatsd{
|
||||||
seen: make(map[string]struct{}),
|
seen: make(map[string]struct{}),
|
||||||
client: statsd.NewClient(config.C.StatsdAddr.String(),
|
client: statsd.NewClient(config.C.StatsdAddr.String(),
|
||||||
statsd.SendLoopCount(2),
|
statsd.SendLoopCount(2), //nolint: gomnd
|
||||||
statsd.ReconnectInterval(10*time.Second),
|
statsd.ReconnectInterval(10*time.Second), //nolint: gomnd
|
||||||
statsd.Logger(logger),
|
statsd.Logger(logger),
|
||||||
statsd.MetricPrefix(prefix),
|
statsd.MetricPrefix(prefix),
|
||||||
statsd.TagStyle(config.C.StatsdTagsFormat),
|
statsd.TagStyle(config.C.StatsdTagsFormat),
|
||||||
|
|||||||
@@ -74,12 +74,12 @@ func getAddresses(url string) (map[conntypes.DC][]string, conntypes.DC, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func addressesParseProxyFor(text string) (string, conntypes.DC, error) {
|
func addressesParseProxyFor(text string) (string, conntypes.DC, error) {
|
||||||
chunks := addressesProxyForSplitter.Split(text, 3)
|
chunks := addressesProxyForSplitter.Split(text, 3) //nolint: gomnd
|
||||||
if len(chunks) != 3 || chunks[0] != "proxy_for" {
|
if len(chunks) != 3 || chunks[0] != "proxy_for" {
|
||||||
return "", 0, fmt.Errorf("incorrect config %s", text)
|
return "", 0, fmt.Errorf("incorrect config %s", text)
|
||||||
}
|
}
|
||||||
|
|
||||||
dc, err := strconv.ParseInt(chunks[1], 10, 16)
|
dc, err := strconv.ParseInt(chunks[1], 10, 16) //nolint: gomnd
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", 0, fmt.Errorf("incorrect config '%s': %w", text, err)
|
return "", 0, fmt.Errorf("incorrect config '%s': %w", text, err)
|
||||||
}
|
}
|
||||||
@@ -93,14 +93,14 @@ func addressesParseProxyFor(text string) (string, conntypes.DC, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func addressesParseDefault(text string) (conntypes.DC, error) {
|
func addressesParseDefault(text string) (conntypes.DC, error) {
|
||||||
chunks := addressesProxyForSplitter.Split(text, 2)
|
chunks := addressesProxyForSplitter.Split(text, 2) //nolint: gomnd
|
||||||
if len(chunks) != 2 || chunks[0] != "default" {
|
if len(chunks) != 2 || chunks[0] != "default" {
|
||||||
return 0, fmt.Errorf("incorrect config '%s'", text)
|
return 0, fmt.Errorf("incorrect config '%s'", text)
|
||||||
}
|
}
|
||||||
|
|
||||||
dcString := strings.TrimRight(chunks[1], ";")
|
dcString := strings.TrimRight(chunks[1], ";")
|
||||||
|
|
||||||
dc, err := strconv.ParseInt(dcString, 10, 16)
|
dc, err := strconv.ParseInt(dcString, 10, 16) //nolint: gomnd
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, fmt.Errorf("incorrect config '%s': %w", text, err)
|
return 0, fmt.Errorf("incorrect config '%s': %w", text, err)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-3
@@ -4,7 +4,6 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
@@ -22,7 +21,7 @@ func request(url string) (io.ReadCloser, error) {
|
|||||||
ctx, cancel := context.WithTimeout(context.Background(), apiHTTPTimeout)
|
ctx, cancel := context.WithTimeout(context.Background(), apiHTTPTimeout)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
req, err := http.NewRequestWithContext(ctx, "GET", url, nil)
|
req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@@ -33,7 +32,7 @@ func request(url string) (io.ReadCloser, error) {
|
|||||||
resp, err := httpClient.Do(req)
|
resp, err := httpClient.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if resp != nil {
|
if resp != nil {
|
||||||
io.Copy(ioutil.Discard, resp.Body) // nolint: errcheck
|
io.Copy(io.Discard, resp.Body) //nolint: errcheck
|
||||||
resp.Body.Close()
|
resp.Body.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package api
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io"
|
||||||
)
|
)
|
||||||
|
|
||||||
const secretURL = "https://core.telegram.org/getProxySecret" //nolint: gas
|
const secretURL = "https://core.telegram.org/getProxySecret" //nolint: gas
|
||||||
@@ -15,7 +15,7 @@ func Secret() ([]byte, error) {
|
|||||||
|
|
||||||
defer resp.Close()
|
defer resp.Close()
|
||||||
|
|
||||||
secret, err := ioutil.ReadAll(resp)
|
secret, err := io.ReadAll(resp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot read response: %w", err)
|
return nil, fmt.Errorf("cannot read response: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-3
@@ -28,7 +28,8 @@ func (b *baseTelegram) Secret() []byte {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (b *baseTelegram) dial(dc conntypes.DC,
|
func (b *baseTelegram) dial(dc conntypes.DC,
|
||||||
protocol conntypes.ConnectionProtocol) (conntypes.StreamReadWriteCloser, error) {
|
protocol conntypes.ConnectionProtocol,
|
||||||
|
) (conntypes.StreamReadWriteCloser, error) {
|
||||||
for _, addr := range b.getAddresses(dc, protocol) {
|
for _, addr := range b.getAddresses(dc, protocol) {
|
||||||
conn, err := b.dialer.Dial("tcp", addr)
|
conn, err := b.dialer.Dial("tcp", addr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -50,7 +51,7 @@ func (b *baseTelegram) dial(dc conntypes.DC,
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (b *baseTelegram) getAddresses(dc conntypes.DC, protocol conntypes.ConnectionProtocol) []string {
|
func (b *baseTelegram) getAddresses(dc conntypes.DC, protocol conntypes.ConnectionProtocol) []string {
|
||||||
addresses := make([]string, 0, 2)
|
addresses := make([]string, 0, 2) //nolint: gomnd
|
||||||
protos := []conntypes.ConnectionProtocol{
|
protos := []conntypes.ConnectionProtocol{
|
||||||
conntypes.ConnectionProtocolIPv6,
|
conntypes.ConnectionProtocolIPv6,
|
||||||
conntypes.ConnectionProtocolIPv4,
|
conntypes.ConnectionProtocolIPv4,
|
||||||
@@ -74,7 +75,8 @@ func (b *baseTelegram) getAddresses(dc conntypes.DC, protocol conntypes.Connecti
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (b *baseTelegram) chooseAddress(addresses map[conntypes.DC][]string,
|
func (b *baseTelegram) chooseAddress(addresses map[conntypes.DC][]string,
|
||||||
dc, defaultDC conntypes.DC) string {
|
dc, defaultDC conntypes.DC,
|
||||||
|
) string {
|
||||||
addrs, ok := addresses[dc]
|
addrs, ok := addresses[dc]
|
||||||
if !ok {
|
if !ok {
|
||||||
addrs = addresses[defaultDC]
|
addrs = addresses[defaultDC]
|
||||||
|
|||||||
+2
-1
@@ -29,7 +29,8 @@ type directTelegram struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (d *directTelegram) Dial(dc conntypes.DC,
|
func (d *directTelegram) Dial(dc conntypes.DC,
|
||||||
protocol conntypes.ConnectionProtocol) (conntypes.StreamReadWriteCloser, error) {
|
protocol conntypes.ConnectionProtocol,
|
||||||
|
) (conntypes.StreamReadWriteCloser, error) {
|
||||||
switch {
|
switch {
|
||||||
case dc < 0:
|
case dc < 0:
|
||||||
dc = -dc
|
dc = -dc
|
||||||
|
|||||||
+2
-1
@@ -63,7 +63,8 @@ func (m *middleTelegram) backgroundUpdate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *middleTelegram) Dial(dc conntypes.DC,
|
func (m *middleTelegram) Dial(dc conntypes.DC,
|
||||||
protocol conntypes.ConnectionProtocol) (conntypes.StreamReadWriteCloser, error) {
|
protocol conntypes.ConnectionProtocol,
|
||||||
|
) (conntypes.StreamReadWriteCloser, error) {
|
||||||
if dc == 0 {
|
if dc == 0 {
|
||||||
dc = conntypes.DCDefaultIdx
|
dc = conntypes.DCDefaultIdx
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-13
@@ -20,22 +20,22 @@ const (
|
|||||||
type CipherSuiteType uint8
|
type CipherSuiteType uint8
|
||||||
|
|
||||||
const (
|
const (
|
||||||
CipherSuiteType_TLS_AES_128_GCM_SHA256 CipherSuiteType = iota // nolint: stylecheck,golint,revive
|
CipherSuiteType_TLS_AES_128_GCM_SHA256 CipherSuiteType = iota //nolint: stylecheck,golint,revive,nosnakecase
|
||||||
CipherSuiteType_TLS_AES_256_GCM_SHA384 // nolint: stylecheck,golint,revive
|
CipherSuiteType_TLS_AES_256_GCM_SHA384 //nolint: stylecheck,golint,revive,nosnakecase
|
||||||
CipherSuiteType_TLS_CHACHA20_POLY1305_SHA256 // nolint: stylecheck,golint,revive
|
CipherSuiteType_TLS_CHACHA20_POLY1305_SHA256 //nolint: stylecheck,golint,revive,nosnakecase
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c CipherSuiteType) Bytes() []byte {
|
func (c CipherSuiteType) Bytes() []byte {
|
||||||
switch c {
|
switch c {
|
||||||
case CipherSuiteType_TLS_AES_128_GCM_SHA256:
|
case CipherSuiteType_TLS_AES_128_GCM_SHA256: //nolint: nosnakecase
|
||||||
return CipherSuiteType_TLS_AES_128_GCM_SHA256_Bytes
|
return CipherSuiteType_TLS_AES_128_GCM_SHA256_Bytes //nolint: nosnakecase
|
||||||
case CipherSuiteType_TLS_AES_256_GCM_SHA384:
|
case CipherSuiteType_TLS_AES_256_GCM_SHA384: //nolint: nosnakecase
|
||||||
return CipherSuiteType_TLS_AES_256_GCM_SHA384_Bytes
|
return CipherSuiteType_TLS_AES_256_GCM_SHA384_Bytes //nolint: nosnakecase
|
||||||
case CipherSuiteType_TLS_CHACHA20_POLY1305_SHA256:
|
case CipherSuiteType_TLS_CHACHA20_POLY1305_SHA256: //nolint: nosnakecase
|
||||||
return CipherSuiteType_TLS_CHACHA20_POLY1305_SHA256_Bytes
|
return CipherSuiteType_TLS_CHACHA20_POLY1305_SHA256_Bytes //nolint: nosnakecase
|
||||||
}
|
}
|
||||||
|
|
||||||
return CipherSuiteType_TLS_CHACHA20_POLY1305_SHA256_Bytes
|
return CipherSuiteType_TLS_CHACHA20_POLY1305_SHA256_Bytes //nolint: nosnakecase
|
||||||
}
|
}
|
||||||
|
|
||||||
type Version uint8
|
type Version uint8
|
||||||
@@ -69,9 +69,9 @@ var (
|
|||||||
Version12Bytes = []byte{0x03, 0x03}
|
Version12Bytes = []byte{0x03, 0x03}
|
||||||
Version13Bytes = []byte{0x03, 0x04}
|
Version13Bytes = []byte{0x03, 0x04}
|
||||||
|
|
||||||
CipherSuiteType_TLS_AES_128_GCM_SHA256_Bytes = []byte{0x13, 0x01} // nolint: stylecheck,golint,revive
|
CipherSuiteType_TLS_AES_128_GCM_SHA256_Bytes = []byte{0x13, 0x01} //nolint: stylecheck,golint,revive,nosnakecase
|
||||||
CipherSuiteType_TLS_AES_256_GCM_SHA384_Bytes = []byte{0x13, 0x02} // nolint: stylecheck,golint,revive
|
CipherSuiteType_TLS_AES_256_GCM_SHA384_Bytes = []byte{0x13, 0x02} //nolint: stylecheck,golint,revive,nosnakecase
|
||||||
CipherSuiteType_TLS_CHACHA20_POLY1305_SHA256_Bytes = []byte{0x13, 0x03} // nolint: stylecheck,golint,revive
|
CipherSuiteType_TLS_CHACHA20_POLY1305_SHA256_Bytes = []byte{0x13, 0x03} //nolint: stylecheck,golint,revive,nosnakecase
|
||||||
)
|
)
|
||||||
|
|
||||||
type Byter interface {
|
type Byter interface {
|
||||||
|
|||||||
+4
-2
@@ -65,7 +65,9 @@ func ReadRecord(reader io.Reader) (Record, error) {
|
|||||||
return rec, nil
|
return rec, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func MakeRecords(raw []byte) (arr []Record) {
|
func MakeRecords(raw []byte) []Record {
|
||||||
|
var arr []Record
|
||||||
|
|
||||||
for len(raw) > 0 {
|
for len(raw) > 0 {
|
||||||
chunkSize := recordMaxChunkSize
|
chunkSize := recordMaxChunkSize
|
||||||
if chunkSize > len(raw) {
|
if chunkSize > len(raw) {
|
||||||
@@ -80,5 +82,5 @@ func MakeRecords(raw []byte) (arr []Record) {
|
|||||||
raw = raw[chunkSize:]
|
raw = raw[chunkSize:]
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return arr
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ func (s ServerHello) WelcomePacket() []byte {
|
|||||||
}
|
}
|
||||||
recChangeCipher.WriteBytes(buf)
|
recChangeCipher.WriteBytes(buf)
|
||||||
|
|
||||||
hostCert := make([]byte, 1024+mrand.Intn(3092)) // nolint: gosec
|
hostCert := make([]byte, 1024+mrand.Intn(3092)) //nolint: gosec, gomnd
|
||||||
rand.Read(hostCert) //nolint: errcheck
|
rand.Read(hostCert) //nolint: errcheck
|
||||||
|
|
||||||
recData := Record{
|
recData := Record{
|
||||||
@@ -66,8 +66,8 @@ func NewServerHello(clientHello *ClientHello) *ServerHello {
|
|||||||
rv.SessionID = make([]byte, len(clientHello.SessionID))
|
rv.SessionID = make([]byte, len(clientHello.SessionID))
|
||||||
copy(rv.SessionID, clientHello.SessionID)
|
copy(rv.SessionID, clientHello.SessionID)
|
||||||
|
|
||||||
tail := bytes.NewBuffer(CipherSuiteType_TLS_AES_128_GCM_SHA256_Bytes)
|
tail := bytes.NewBuffer(CipherSuiteType_TLS_AES_128_GCM_SHA256_Bytes) //nolint: nosnakecase
|
||||||
tail.WriteByte(0x00) // no compression
|
tail.WriteByte(0x00) //nolint: gomnd // no compression
|
||||||
makeTLSExtensions(tail)
|
makeTLSExtensions(tail)
|
||||||
rv.Tail = RawBytes(tail.Bytes())
|
rv.Tail = RawBytes(tail.Bytes())
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
)
|
)
|
||||||
|
|
||||||
func InitTCP(conn net.Conn, readBufferSize int, writeBufferSize int) error {
|
func InitTCP(conn net.Conn, readBufferSize, writeBufferSize int) error {
|
||||||
tcpConn := conn.(*net.TCPConn) //nolint: forcetypeassert
|
tcpConn := conn.(*net.TCPConn) //nolint: forcetypeassert
|
||||||
|
|
||||||
if err := tcpConn.SetNoDelay(true); err != nil {
|
if err := tcpConn.SetNoDelay(true); err != nil {
|
||||||
|
|||||||
+3
-2
@@ -4,12 +4,13 @@ import "io"
|
|||||||
|
|
||||||
const readFullBufferSize = 1024 + 1 // +1 because telegram opreates with blocks mod 4
|
const readFullBufferSize = 1024 + 1 // +1 because telegram opreates with blocks mod 4
|
||||||
|
|
||||||
func ReadFull(src io.Reader) (rv []byte, err error) {
|
func ReadFull(src io.Reader) ([]byte, error) {
|
||||||
buf := make([]byte, readFullBufferSize)
|
buf := make([]byte, readFullBufferSize)
|
||||||
n := readFullBufferSize
|
n := readFullBufferSize
|
||||||
|
rv := []byte{}
|
||||||
|
|
||||||
for n == len(buf) {
|
for n == len(buf) {
|
||||||
n, err = src.Read(buf)
|
n, err := src.Read(buf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err //nolint: wrapcheck
|
return nil, err //nolint: wrapcheck
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ func ReverseBytes(data []byte) []byte {
|
|||||||
rv := make([]byte, dataLen)
|
rv := make([]byte, dataLen)
|
||||||
rv[dataLen/2] = data[dataLen/2]
|
rv[dataLen/2] = data[dataLen/2]
|
||||||
|
|
||||||
for i := dataLen/2 - 1; i >= 0; i-- {
|
for i := dataLen/2 - 1; i >= 0; i-- { //nolint: gomnd
|
||||||
opp := dataLen - i - 1
|
opp := dataLen - i - 1
|
||||||
rv[i], rv[opp] = data[opp], data[i]
|
rv[i], rv[opp] = data[opp], data[i]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
//go:build !windows
|
|
||||||
// +build !windows
|
|
||||||
|
|
||||||
package utils
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"golang.org/x/sys/unix"
|
|
||||||
)
|
|
||||||
|
|
||||||
func SetLimits() error {
|
|
||||||
rLimit := unix.Rlimit{}
|
|
||||||
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rLimit); err != nil {
|
|
||||||
return fmt.Errorf("cannot get rlimit: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
rLimit.Cur = rLimit.Max
|
|
||||||
|
|
||||||
if err := unix.Setrlimit(unix.RLIMIT_NOFILE, &rLimit); err != nil {
|
|
||||||
return fmt.Errorf("cannot set rlimit: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
+2
-2
@@ -3,9 +3,9 @@ package utils
|
|||||||
type Uint24 [3]byte
|
type Uint24 [3]byte
|
||||||
|
|
||||||
func ToUint24(number uint32) Uint24 {
|
func ToUint24(number uint32) Uint24 {
|
||||||
return Uint24{byte(number), byte(number >> 8), byte(number >> 16)}
|
return Uint24{byte(number), byte(number >> 8), byte(number >> 16)} //nolint: gomnd
|
||||||
}
|
}
|
||||||
|
|
||||||
func FromUint24(number Uint24) uint32 {
|
func FromUint24(number Uint24) uint32 {
|
||||||
return uint32(number[0]) + (uint32(number[1]) << 8) + (uint32(number[2]) << 16)
|
return uint32(number[0]) + (uint32(number[1]) << 8) + (uint32(number[2]) << 16) //nolint: gomnd
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"hash/crc32"
|
"hash/crc32"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
"github.com/9seconds/mtg/conntypes"
|
"github.com/9seconds/mtg/conntypes"
|
||||||
@@ -28,10 +27,13 @@ var mtprotoFramePadding = []byte{0x04, 0x00, 0x00, 0x00}
|
|||||||
//
|
//
|
||||||
// MSGLEN is the length of the message + len of seqno and msglen.
|
// MSGLEN is the length of the message + len of seqno and msglen.
|
||||||
// SEQNO is the number of frame in the receive/send sequence. If client
|
// SEQNO is the number of frame in the receive/send sequence. If client
|
||||||
|
//
|
||||||
// sends a message with SeqNo 18, it has to receive message with SeqNo 18.
|
// sends a message with SeqNo 18, it has to receive message with SeqNo 18.
|
||||||
|
//
|
||||||
// MSG is the data which has to be written
|
// MSG is the data which has to be written
|
||||||
// CRC32 is the CRC32 checksum of MSGLEN + SEQNO + MSG
|
// CRC32 is the CRC32 checksum of MSGLEN + SEQNO + MSG
|
||||||
// PADDING is custom padding schema to complete frame length to such that
|
// PADDING is custom padding schema to complete frame length to such that
|
||||||
|
//
|
||||||
// len(frame) % 16 == 0
|
// len(frame) % 16 == 0
|
||||||
type wrapperMtprotoFrame struct {
|
type wrapperMtprotoFrame struct {
|
||||||
parent conntypes.StreamReadWriteCloser
|
parent conntypes.StreamReadWriteCloser
|
||||||
@@ -50,7 +52,7 @@ func (w *wrapperMtprotoFrame) Read() (conntypes.Packet, error) { // nolint: funl
|
|||||||
buf.Reset()
|
buf.Reset()
|
||||||
sum.Reset()
|
sum.Reset()
|
||||||
|
|
||||||
if _, err := io.CopyN(writer, w.parent, 4); err != nil {
|
if _, err := io.CopyN(writer, w.parent, 4); err != nil { //nolint: gomnd
|
||||||
return nil, fmt.Errorf("cannot read frame padding: %w", err)
|
return nil, fmt.Errorf("cannot read frame padding: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,7 +74,7 @@ func (w *wrapperMtprotoFrame) Read() (conntypes.Packet, error) { // nolint: funl
|
|||||||
|
|
||||||
buf.Reset()
|
buf.Reset()
|
||||||
|
|
||||||
if _, err := io.CopyN(writer, w.parent, int64(messageLength)-4-4); err != nil {
|
if _, err := io.CopyN(writer, w.parent, int64(messageLength)-4-4); err != nil { //nolint: gomnd
|
||||||
return nil, fmt.Errorf("cannot read the message frame: %w", err)
|
return nil, fmt.Errorf("cannot read the message frame: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,11 +86,11 @@ func (w *wrapperMtprotoFrame) Read() (conntypes.Packet, error) { // nolint: funl
|
|||||||
return nil, fmt.Errorf("unexpected sequence number %d (wait for %d)", seqNo, w.readSeqNo)
|
return nil, fmt.Errorf("unexpected sequence number %d (wait for %d)", seqNo, w.readSeqNo)
|
||||||
}
|
}
|
||||||
|
|
||||||
data, _ := ioutil.ReadAll(buf)
|
data, _ := io.ReadAll(buf)
|
||||||
buf.Reset()
|
buf.Reset()
|
||||||
// write to buf, not to writer. This is because we are going to fetch
|
// write to buf, not to writer. This is because we are going to fetch
|
||||||
// crc32 checksum.
|
// crc32 checksum.
|
||||||
if _, err := io.CopyN(buf, w.parent, 4); err != nil {
|
if _, err := io.CopyN(buf, w.parent, 4); err != nil { //nolint: gomnd
|
||||||
return nil, fmt.Errorf("cannot read checksum: %w", err)
|
return nil, fmt.Errorf("cannot read checksum: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,7 +111,7 @@ func (w *wrapperMtprotoFrame) Read() (conntypes.Packet, error) { // nolint: funl
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (w *wrapperMtprotoFrame) Write(p conntypes.Packet) error {
|
func (w *wrapperMtprotoFrame) Write(p conntypes.Packet) error {
|
||||||
messageLength := 4 + 4 + len(p) + 4
|
messageLength := 4 + 4 + len(p) + 4 //nolint: gomnd
|
||||||
paddingLength := (aes.BlockSize - messageLength%aes.BlockSize) % aes.BlockSize
|
paddingLength := (aes.BlockSize - messageLength%aes.BlockSize) % aes.BlockSize
|
||||||
|
|
||||||
buf := &bytes.Buffer{}
|
buf := &bytes.Buffer{}
|
||||||
@@ -120,7 +122,7 @@ func (w *wrapperMtprotoFrame) Write(p conntypes.Packet) error {
|
|||||||
|
|
||||||
checksum := crc32.ChecksumIEEE(buf.Bytes())
|
checksum := crc32.ChecksumIEEE(buf.Bytes())
|
||||||
binary.Write(buf, binary.LittleEndian, checksum) //nolint: errcheck
|
binary.Write(buf, binary.LittleEndian, checksum) //nolint: errcheck
|
||||||
buf.Write(bytes.Repeat(mtprotoFramePadding, paddingLength/4))
|
buf.Write(bytes.Repeat(mtprotoFramePadding, paddingLength/4)) //nolint: gomnd
|
||||||
|
|
||||||
w.logger.Debugw("Write MTProto frame",
|
w.logger.Debugw("Write MTProto frame",
|
||||||
"length", len(p),
|
"length", len(p),
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ func (w *wrapperClientAbridged) Read(acks *conntypes.ConnectionAcks) (conntypes.
|
|||||||
}
|
}
|
||||||
|
|
||||||
if msgLength == clientAbridgedSmallPacketLength {
|
if msgLength == clientAbridgedSmallPacketLength {
|
||||||
buf.Grow(3)
|
buf.Grow(3) //nolint: gomnd
|
||||||
|
|
||||||
if _, err := io.CopyN(&buf, w.parent, 3); err != nil {
|
if _, err := io.CopyN(&buf, w.parent, 3); err != nil { //nolint: gomnd
|
||||||
return nil, fmt.Errorf("cannot read correct message length: %w", err)
|
return nil, fmt.Errorf("cannot read correct message length: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ func (w *wrapperClientAbridged) Write(packet conntypes.Packet, acks *conntypes.C
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
packetLength := len(packet) / 4
|
packetLength := len(packet) / 4 //nolint: gomnd
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case packetLength < clientAbridgedSmallPacketLength:
|
case packetLength < clientAbridgedSmallPacketLength:
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ type wrapperClientIntermediate struct {
|
|||||||
func (w *wrapperClientIntermediate) Read(acks *conntypes.ConnectionAcks) (conntypes.Packet, error) {
|
func (w *wrapperClientIntermediate) Read(acks *conntypes.ConnectionAcks) (conntypes.Packet, error) {
|
||||||
buf := bytes.Buffer{}
|
buf := bytes.Buffer{}
|
||||||
|
|
||||||
buf.Grow(4)
|
buf.Grow(4) //nolint: gomnd
|
||||||
|
|
||||||
if _, err := io.CopyN(&buf, w.parent, 4); err != nil {
|
if _, err := io.CopyN(&buf, w.parent, 4); err != nil { //nolint: gomnd
|
||||||
return nil, fmt.Errorf("cannot read message length: %w", err)
|
return nil, fmt.Errorf("cannot read message length: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ func (w *wrapperClientIntermediateSecure) Read(acks *conntypes.ConnectionAcks) (
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
length := len(data) - (len(data) % 4)
|
length := len(data) - (len(data) % 4) //nolint: gomnd
|
||||||
|
|
||||||
return data[:length], nil
|
return data[:length], nil
|
||||||
}
|
}
|
||||||
@@ -35,7 +35,7 @@ func (w *wrapperClientIntermediateSecure) Write(packet conntypes.Packet, acks *c
|
|||||||
}
|
}
|
||||||
|
|
||||||
buf := &bytes.Buffer{}
|
buf := &bytes.Buffer{}
|
||||||
paddingLength := rand.Intn(4) // nolint: gosec
|
paddingLength := rand.Intn(4) //nolint: gosec, gomnd
|
||||||
|
|
||||||
buf.Grow(4 + len(packet) + paddingLength)
|
buf.Grow(4 + len(packet) + paddingLength)
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ func (w *wrapperProxy) Write(packet conntypes.Packet, acks *conntypes.Connection
|
|||||||
buf.Write(rpc.ProxyRequestProxyTag)
|
buf.Write(rpc.ProxyRequestProxyTag)
|
||||||
buf.WriteByte(byte(len(config.C.AdTag)))
|
buf.WriteByte(byte(len(config.C.AdTag)))
|
||||||
buf.Write(config.C.AdTag)
|
buf.Write(config.C.AdTag)
|
||||||
buf.Write(make([]byte, (4-buf.Len()%4)%4))
|
buf.Write(make([]byte, (4-buf.Len()%4)%4)) //nolint: gomnd
|
||||||
buf.Grow(len(packet))
|
buf.Grow(len(packet))
|
||||||
buf.Write(packet)
|
buf.Write(packet)
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,8 @@ func (w *wrapperBlockCipher) RemoteAddr() *net.TCPAddr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func newBlockCipher(parent conntypes.StreamReadWriteCloser,
|
func newBlockCipher(parent conntypes.StreamReadWriteCloser,
|
||||||
encryptor, decryptor cipher.BlockMode) conntypes.StreamReadWriteCloser {
|
encryptor, decryptor cipher.BlockMode,
|
||||||
|
) conntypes.StreamReadWriteCloser {
|
||||||
cipher := &wrapperBlockCipher{
|
cipher := &wrapperBlockCipher{
|
||||||
parent: parent,
|
parent: parent,
|
||||||
encryptor: encryptor,
|
encryptor: encryptor,
|
||||||
|
|||||||
@@ -91,10 +91,11 @@ func (w *wrapperConn) RemoteAddr() *net.TCPAddr {
|
|||||||
|
|
||||||
func newConn(parent net.Conn,
|
func newConn(parent net.Conn,
|
||||||
connID conntypes.ConnID,
|
connID conntypes.ConnID,
|
||||||
purpose connPurpose) conntypes.StreamReadWriteCloser {
|
purpose connPurpose,
|
||||||
localAddr := *parent.LocalAddr().(*net.TCPAddr)
|
) conntypes.StreamReadWriteCloser {
|
||||||
|
localAddr := *parent.LocalAddr().(*net.TCPAddr) //nolint: forcetypeassert
|
||||||
|
|
||||||
if parent.RemoteAddr().(*net.TCPAddr).IP.To4() != nil {
|
if parent.RemoteAddr().(*net.TCPAddr).IP.To4() != nil { //nolint: forcetypeassert
|
||||||
if config.C.PublicIPv4.IP != nil {
|
if config.C.PublicIPv4.IP != nil {
|
||||||
localAddr.IP = config.C.PublicIPv4.IP
|
localAddr.IP = config.C.PublicIPv4.IP
|
||||||
}
|
}
|
||||||
@@ -117,7 +118,7 @@ func newConn(parent net.Conn,
|
|||||||
parent: parent,
|
parent: parent,
|
||||||
connID: connID,
|
connID: connID,
|
||||||
logger: logger,
|
logger: logger,
|
||||||
remoteAddr: parent.RemoteAddr().(*net.TCPAddr),
|
remoteAddr: parent.RemoteAddr().(*net.TCPAddr), //nolint: forcetypeassert
|
||||||
localAddr: &localAddr,
|
localAddr: &localAddr,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,8 @@ func (w *wrapperCtx) RemoteAddr() *net.TCPAddr {
|
|||||||
|
|
||||||
func NewCtx(ctx context.Context,
|
func NewCtx(ctx context.Context,
|
||||||
cancel context.CancelFunc,
|
cancel context.CancelFunc,
|
||||||
parent conntypes.StreamReadWriteCloser) conntypes.StreamReadWriteCloser {
|
parent conntypes.StreamReadWriteCloser,
|
||||||
|
) conntypes.StreamReadWriteCloser {
|
||||||
return &wrapperCtx{
|
return &wrapperCtx{
|
||||||
parent: parent,
|
parent: parent,
|
||||||
ctx: ctx,
|
ctx: ctx,
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ var mtprotoEmptyIP = [4]byte{0x00, 0x00, 0x00, 0x00}
|
|||||||
func NewMiddleProxyCipher(parent conntypes.StreamReadWriteCloser,
|
func NewMiddleProxyCipher(parent conntypes.StreamReadWriteCloser,
|
||||||
req *rpc.NonceRequest,
|
req *rpc.NonceRequest,
|
||||||
resp *rpc.NonceResponse,
|
resp *rpc.NonceResponse,
|
||||||
secret []byte) conntypes.StreamReadWriteCloser {
|
secret []byte,
|
||||||
|
) conntypes.StreamReadWriteCloser {
|
||||||
localAddr := parent.LocalAddr()
|
localAddr := parent.LocalAddr()
|
||||||
remoteAddr := parent.RemoteAddr()
|
remoteAddr := parent.RemoteAddr()
|
||||||
|
|
||||||
@@ -53,7 +54,8 @@ func mtprotoDeriveKeys(purpose mtprotoCipherPurpose,
|
|||||||
req *rpc.NonceRequest,
|
req *rpc.NonceRequest,
|
||||||
resp *rpc.NonceResponse,
|
resp *rpc.NonceResponse,
|
||||||
client, remote *net.TCPAddr,
|
client, remote *net.TCPAddr,
|
||||||
secret []byte) ([]byte, []byte) {
|
secret []byte,
|
||||||
|
) ([]byte, []byte) {
|
||||||
message := bytes.Buffer{}
|
message := bytes.Buffer{}
|
||||||
|
|
||||||
message.Write(resp.Nonce)
|
message.Write(resp.Nonce)
|
||||||
|
|||||||
@@ -84,7 +84,8 @@ func (w *wrapperObfuscated2) Close() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewObfuscated2(socket conntypes.StreamReadWriteCloser,
|
func NewObfuscated2(socket conntypes.StreamReadWriteCloser,
|
||||||
encryptor, decryptor cipher.Stream) conntypes.StreamReadWriteCloser {
|
encryptor, decryptor cipher.Stream,
|
||||||
|
) conntypes.StreamReadWriteCloser {
|
||||||
return &wrapperObfuscated2{
|
return &wrapperObfuscated2{
|
||||||
parent: socket,
|
parent: socket,
|
||||||
encryptor: encryptor,
|
encryptor: encryptor,
|
||||||
|
|||||||
Reference in New Issue
Block a user