From a42f2175159d09f2a4ba7a7228fd5c5c57ccf6bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Mon, 20 Feb 2023 11:39:15 +0800 Subject: [PATCH] Init commit --- .github/update_dependencies.sh | 6 ++++++ .gitignore | 2 ++ .golangci.yml | 22 ++++++++++++++++++++++ LICENSE | 14 ++++++++++++++ Makefile | 21 +++++++++++++++++++++ go.mod | 3 +++ 6 files changed, 68 insertions(+) create mode 100755 .github/update_dependencies.sh create mode 100644 .gitignore create mode 100644 .golangci.yml create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 go.mod diff --git a/.github/update_dependencies.sh b/.github/update_dependencies.sh new file mode 100755 index 0000000..d63123b --- /dev/null +++ b/.github/update_dependencies.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +PROJECTS=$(dirname "$0")/../.. + +go get -x github.com/sagernet/sing@$(git -C $PROJECTS/sing rev-parse HEAD) +go mod tidy diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f7f8ac3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/.idea/ +/vendor/ diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..bfd0bdb --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,22 @@ +linters: + disable-all: true + enable: + - gofumpt + - govet + - gci + - staticcheck + +run: + skip-dirs: + - tls + - tls_compact + +linters-settings: + gci: + custom-order: true + sections: + - standard + - prefix(github.com/sagernet/) + - default + staticcheck: + go: '1.20' diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3e3e29e --- /dev/null +++ b/LICENSE @@ -0,0 +1,14 @@ +Copyright (C) 2022 by nekohasekai + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..01cc64e --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +fmt: + @gofumpt -l -w . + @gofmt -s -w . + @gci write --custom-order -s "standard,prefix(github.com/sagernet/),default" . + +fmt_install: + go install -v mvdan.cc/gofumpt@latest + go install -v github.com/daixiang0/gci@latest + +lint: + GOOS=linux golangci-lint run . + GOOS=android golangci-lint run . + GOOS=windows golangci-lint run . + GOOS=darwin golangci-lint run . + GOOS=freebsd golangci-lint run . + +lint_install: + go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest + +test: + go test -v . \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..d2dc4d1 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/sagernet/sing-shadowtls + +go 1.18