mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-21 22:30:46 +08:00
ci: add support for multiple arch
This commit is contained in:
@@ -4,60 +4,40 @@ on:
|
||||
name: Build
|
||||
jobs:
|
||||
release-linux:
|
||||
name: release linux
|
||||
name: release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '^1.16.0'
|
||||
- name: compile
|
||||
run: |
|
||||
GOARCH="amd64" go build -v -ldflags="-s -w -extldflags=-static" -tags netgo -trimpath -o "bin/revsuit_linux_amd64" ./cmd/revsuit/revsuit.go
|
||||
# GOARCH="386" go build -v -ldflags="-s -w -extldflags=-static" -tags netgo -trimpath -o "bin/revsuit_linux_i386" ./cmd/revsuit/revsuit.go
|
||||
# GOARCH="arm" go build -v -ldflags="-s -w -extldflags=-static" -tags netgo -trimpath -o "bin/revsuit_linux_arm" ./cmd/revsuit/revsuit.go
|
||||
# GOARCH="arm64" go build -v -ldflags="-s -w -extldflags=-static" -tags netgo -trimpath -o "bin/revsuit_linux_arm64" ./cmd/revsuit/revsuit.go
|
||||
- name: Upload the artifacts
|
||||
uses: li4n0/upload-release-action@v2
|
||||
|
||||
- name: install nodejs
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: bin/*
|
||||
tag: ${{ github.ref }}
|
||||
overwrite: true
|
||||
file_glob: true
|
||||
release-darwin-amd64:
|
||||
name: release darwin/amd64
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '^1.16.0'
|
||||
- name: compile
|
||||
run: |
|
||||
GOARCH="amd64" go build -v -ldflags="-s -w" -trimpath -o "bin/revsuit_darwin_amd64" ./cmd/revsuit/revsuit.go
|
||||
# GOARCH="arm64" go build -v -ldflags="-s -w" -trimpath -o "bin/revsuit_darwin_arm64" ./cmd/revsuit/revsuit.go
|
||||
- name: Upload the artifacts
|
||||
uses: li4n0/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: bin/*
|
||||
tag: ${{ github.ref }}
|
||||
overwrite: true
|
||||
file_glob: true
|
||||
release-windows:
|
||||
name: release windows
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '^1.16.0'
|
||||
- name: compile
|
||||
run: |
|
||||
env GOARCH=amd64 go build -v -ldflags="-s -w -extldflags=-static" -trimpath -o "bin/revsuit_windows_amd64.exe" ./cmd/revsuit/revsuit.go
|
||||
# env GOARCH=386 go build -v -ldflags="-s -w -extldflags=-static" -trimpath -o "bin/revsuit_windows_i386.exe" ./cmd/revsuit/revsuit.go
|
||||
# env GOARCH=arm go build -v -ldflags="-s -w -extldflags=-static" -trimpath -o "bin/revsuit_windows_arm.exe" ./cmd/revsuit/revsuit.go
|
||||
node-version: '12'
|
||||
|
||||
- name: install yarn
|
||||
run: npm install -g yarn
|
||||
|
||||
- name: build frontend
|
||||
run: cd frontend && yarn install && yarn build
|
||||
|
||||
- name: get the version
|
||||
id: get_version
|
||||
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
|
||||
|
||||
- name: compile linux amd64
|
||||
run: GOARCH="amd64" go build -ldflags="-s -w -X 'github.com/li4n0/revsuit/pkg/server.VERSION=${{ steps.get_version.outputs.VERSION }}'" -tags netgo -trimpath -o "bin/revsuit_linux_amd64" ./cmd/revsuit/revsuit.go
|
||||
- name: compile linux arm64
|
||||
run: GOARCH="arm64" go build -ldflags="-s -w -X 'github.com/li4n0/revsuit/pkg/server.VERSION=${{ steps.get_version.outputs.VERSION }}'" -tags netgo -trimpath -o "bin/revsuit_linux_arm64" ./cmd/revsuit/revsuit.go
|
||||
- name: compile darwin amd64
|
||||
run: GOOS="darwin" GOARCH="amd64" go build -ldflags="-s -w -X 'github.com/li4n0/revsuit/pkg/server.VERSION=${{ steps.get_version.outputs.VERSION }}'" -trimpath -o "bin/revsuit_darwin_amd64" ./cmd/revsuit/revsuit.go
|
||||
- name: compile darwin arm64
|
||||
run: GOOS="darwin" GOARCH="arm64" go build -ldflags="-s -w -X 'github.com/li4n0/revsuit/pkg/server.VERSION=${{ steps.get_version.outputs.VERSION }}'" -trimpath -o "bin/revsuit_darwin_arm64" ./cmd/revsuit/revsuit.go
|
||||
- name: compile windows amd64
|
||||
run: GOOS="windows" GOARCH="amd64" go build -ldflags="-s -w -X 'github.com/li4n0/revsuit/pkg/server.VERSION=${{ steps.get_version.outputs.VERSION }}' " -trimpath -o "bin/revsuit_windows_amd64.exe" ./cmd/revsuit/revsuit.go
|
||||
|
||||
- name: Upload the artifacts
|
||||
uses: li4n0/upload-release-action@v2
|
||||
with:
|
||||
|
||||
+5
-2
@@ -11,7 +11,7 @@ GeoLite2-City.mmdb
|
||||
config.yaml*
|
||||
|
||||
# binary
|
||||
revsuit
|
||||
/revsuit
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
@@ -23,6 +23,9 @@ revsuit
|
||||
*.sw?
|
||||
|
||||
## node
|
||||
package.json
|
||||
/package.json
|
||||
package-lock.json
|
||||
node_modules/
|
||||
|
||||
## frontend dist
|
||||
dist/
|
||||
@@ -26,11 +26,16 @@ Powerful:
|
||||
|
||||
### Installation and Configuration
|
||||
|
||||
Download the latest release firstly. For the time being, only the binary for amd64 architecture is available for
|
||||
download, if you need to use it in other architectures, you can compile it yourself.
|
||||
Download the latest release directly or build by following steps:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/Li4n0/revsuit.git
|
||||
cd revsuit/frontend && yarn install && yarn build
|
||||
cd ../ && go build ./cmd/revsuit/revsuit.go
|
||||
```
|
||||
|
||||
RevSuit will generate default configuration file on first run. Modify the configuration file according to your needs,
|
||||
then re-run. A detailed description of the configuration file can be found at: [Configuration Notes](./CONFIG.md)
|
||||
then re-run. A detailed description of the configuration file can be found at: [Configuration Notes](./CONFIG.md)
|
||||
|
||||
### Run
|
||||
|
||||
|
||||
+7
-1
@@ -23,7 +23,13 @@ RevSuit 是一款灵活并且强大的反连平台。目前支持 HTTP、DNS、R
|
||||
|
||||
### 安装及配置
|
||||
|
||||
在 Releases 里下载最新版本的 RevSuit。暂时只提供 amd64 架构下的二进制文件下载,如需要在其它架构下使用,可以自行编译。
|
||||
在 Releases 里下载最新版本的 RevSuit,或者通过以下命令自行编译:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/Li4n0/revsuit.git
|
||||
cd revsuit/frontend && yarn install && yarn build
|
||||
cd ../ && go build ./cmd/revsuit/revsuit.go
|
||||
```
|
||||
|
||||
RevSuit首次运行将会在当前目录生成配置文件,您可以根据需要自定义其中的某些内容。配置文件的详细说明可见:[配置说明](./CONFIG.zh-CN.md)
|
||||
|
||||
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
.custom-icons-list[data-v-05a908c2] .anticon{margin-right:6px}body[data-v-bc5a7470],html[data-v-bc5a7470]{height:100%;margin:0}.fade-transform-enter-active[data-v-bc5a7470],.fade-transform-leave-active[data-v-bc5a7470]{transition:all .3s;opacity:0}.fade-transform-enter[data-v-bc5a7470],.fade-transform-leave[data-v-bc5a7470]{opacity:0}.fade-transform-enter-to[data-v-bc5a7470]{opacity:0}.ant-menu-item>span>a[data-v-bc5a7470]{color:hsla(0,0%,100%,.65)}.ant-menu-item-selected>span>a[data-v-bc5a7470]{color:#fff}#app[data-v-bc5a7470]{min-height:100%}#app .trigger[data-v-bc5a7470]{font-size:18px;line-height:64px;padding:0 24px;cursor:pointer;transition:color .3s}#app .trigger[data-v-bc5a7470]:hover{color:#1890ff}#app .logo[data-v-bc5a7470]{height:32px;background:#0a1d2d;margin:16px;text-align:center;font-size:1.2rem;color:#fff;padding-bottom:5px;border-bottom:2px solid #b6befa}.copyright[data-v-bc5a7470]{color:#888;text-align:right;margin-right:1rem}
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
#add-rule[data-v-50ca3b7c]{margin-bottom:10px}
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
#add-rule[data-v-4fed8448]{margin-bottom:10px}
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
.gray-table-row{background-color:#f5f5f5}
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
.gray-table-row{background-color:#f5f5f5}
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
.gray-table-row{background-color:#f5f5f5}
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
#add-rule[data-v-3819ffac]{margin-bottom:10px}
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
.gray-table-row{background-color:#f5f5f5}
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
#add-rule[data-v-0fa98c43]{margin-bottom:10px}
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
.gray-table-row{background-color:#f5f5f5}
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
.gray-table-row{background-color:#f5f5f5}
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
#add-rule[data-v-3db1b286]{margin-bottom:10px}
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
#add-rule[data-v-b1cc51ba]{margin-bottom:10px}.full-screen-icon[data-v-b1cc51ba]{position:absolute;z-index:5;color:#9e9e9e;right:1px;font-size:1rem;cursor:pointer;transition:font-size .1s}.full-screen-icon[data-v-b1cc51ba]:hover{font-size:1.1rem;transition:font-size .1s}
|
||||
Vendored
-8
File diff suppressed because one or more lines are too long
Vendored
-1
@@ -1 +0,0 @@
|
||||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>RevSuit Control Panel</title><link href="/revsuit/admin/css/chunk-016c45cf.css" rel="prefetch"><link href="/revsuit/admin/css/chunk-0cb5e9e6.css" rel="prefetch"><link href="/revsuit/admin/css/chunk-193ec343.css" rel="prefetch"><link href="/revsuit/admin/css/chunk-33aba89a.css" rel="prefetch"><link href="/revsuit/admin/css/chunk-46a53d26.css" rel="prefetch"><link href="/revsuit/admin/css/chunk-4ffb84ba.css" rel="prefetch"><link href="/revsuit/admin/css/chunk-5fb70d83.css" rel="prefetch"><link href="/revsuit/admin/css/chunk-6101772c.css" rel="prefetch"><link href="/revsuit/admin/css/chunk-72839f90.css" rel="prefetch"><link href="/revsuit/admin/css/chunk-740736c7.css" rel="prefetch"><link href="/revsuit/admin/css/chunk-ae691e78.css" rel="prefetch"><link href="/revsuit/admin/css/chunk-f1802c3c.css" rel="prefetch"><link href="/revsuit/admin/js/chunk-016c45cf.js" rel="prefetch"><link href="/revsuit/admin/js/chunk-0cb5e9e6.js" rel="prefetch"><link href="/revsuit/admin/js/chunk-193ec343.js" rel="prefetch"><link href="/revsuit/admin/js/chunk-27186dd0.js" rel="prefetch"><link href="/revsuit/admin/js/chunk-33aba89a.js" rel="prefetch"><link href="/revsuit/admin/js/chunk-46a53d26.js" rel="prefetch"><link href="/revsuit/admin/js/chunk-4ffb84ba.js" rel="prefetch"><link href="/revsuit/admin/js/chunk-5fb70d83.js" rel="prefetch"><link href="/revsuit/admin/js/chunk-6101772c.js" rel="prefetch"><link href="/revsuit/admin/js/chunk-72839f90.js" rel="prefetch"><link href="/revsuit/admin/js/chunk-740736c7.js" rel="prefetch"><link href="/revsuit/admin/js/chunk-ae691e78.js" rel="prefetch"><link href="/revsuit/admin/js/chunk-b241c712.js" rel="prefetch"><link href="/revsuit/admin/js/chunk-f1802c3c.js" rel="prefetch"><link href="/revsuit/admin/css/app.css" rel="preload" as="style"><link href="/revsuit/admin/css/chunk-vendors.css" rel="preload" as="style"><link href="/revsuit/admin/js/app.js" rel="preload" as="script"><link href="/revsuit/admin/js/chunk-vendors.js" rel="preload" as="script"><link href="/revsuit/admin/css/chunk-vendors.css" rel="stylesheet"><link href="/revsuit/admin/css/app.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but revsuit-frontend doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/revsuit/admin/js/chunk-vendors.js"></script><script src="/revsuit/admin/js/app.js"></script></body></html>
|
||||
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
-299
File diff suppressed because one or more lines are too long
@@ -6,6 +6,6 @@ const banner = `
|
||||
/ /_/ / _ \ | / /\__ \/ / / / / __/
|
||||
/ _, _/ __/ |/ /___/ / /_/ / / /_
|
||||
/_/ |_|\___/|___//____/\__,_/_/\__/
|
||||
v%s
|
||||
%s
|
||||
https://revsuit.pro
|
||||
`
|
||||
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
log "unknwon.dev/clog/v2"
|
||||
)
|
||||
|
||||
const VERSION = "0.4.0"
|
||||
var VERSION = ""
|
||||
|
||||
type Revsuit struct {
|
||||
config *Config
|
||||
|
||||
Reference in New Issue
Block a user