mirror of
https://github.com/fatedier/frp.git
synced 2026-04-21 08:29:10 +08:00
Compare commits
4 Commits
38a71a6803
...
5ed02275da
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ed02275da | ||
|
|
60c4f5d4bd | ||
|
|
d20e384bf1 | ||
|
|
c95dc9d88a |
14
.github/workflows/build-and-push-image.yml
vendored
14
.github/workflows/build-and-push-image.yml
vendored
@@ -19,15 +19,15 @@ jobs:
|
||||
steps:
|
||||
# environment
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
uses: docker/setup-qemu-action@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
# get image tag name
|
||||
- name: Get Image Tag Name
|
||||
@@ -38,13 +38,13 @@ jobs:
|
||||
echo "TAG_NAME=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
- name: Login to the GPR
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
@@ -61,7 +61,7 @@ jobs:
|
||||
echo "TAG_FRPS_GPR=ghcr.io/fatedier/frps:${{ env.TAG_NAME }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build and push frpc
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
context: .
|
||||
file: ./dockerfiles/Dockerfile-for-frpc
|
||||
@@ -72,7 +72,7 @@ jobs:
|
||||
${{ env.TAG_FRPC_GPR }}
|
||||
|
||||
- name: Build and push frps
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
context: .
|
||||
file: ./dockerfiles/Dockerfile-for-frps
|
||||
|
||||
6
.github/workflows/golangci-lint.yml
vendored
6
.github/workflows/golangci-lint.yml
vendored
@@ -14,12 +14,12 @@ jobs:
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: '1.25'
|
||||
cache: false
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: '22'
|
||||
- name: Build web assets (frps)
|
||||
|
||||
8
.github/workflows/goreleaser.yml
vendored
8
.github/workflows/goreleaser.yml
vendored
@@ -8,15 +8,15 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: '1.25'
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: '22'
|
||||
- name: Build web assets (frps)
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
./package.sh
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
uses: goreleaser/goreleaser-action@v7
|
||||
with:
|
||||
version: latest
|
||||
args: release --clean --release-notes=./Release.md
|
||||
|
||||
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
actions: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
- uses: actions/stale@v10
|
||||
with:
|
||||
stale-issue-message: 'Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.'
|
||||
stale-pr-message: "PRs go stale after 14d of inactivity. Stale PRs rot after an additional 3d of inactivity and eventually close."
|
||||
|
||||
@@ -32,3 +32,8 @@
|
||||
- E2E tests using Ginkgo/Gomega framework
|
||||
- Mock servers in `/test/e2e/mock/`
|
||||
- Run: `make e2e` or `make alltest`
|
||||
|
||||
## Agent Runbooks
|
||||
|
||||
Operational procedures for agents are in `doc/agents/`:
|
||||
- `doc/agents/release.md` - Release process
|
||||
|
||||
80
doc/agents/release.md
Normal file
80
doc/agents/release.md
Normal file
@@ -0,0 +1,80 @@
|
||||
# Release Process
|
||||
|
||||
## 1. Update Release Notes
|
||||
|
||||
Edit `Release.md` in the project root with the changes for this version:
|
||||
|
||||
```markdown
|
||||
## Features
|
||||
* ...
|
||||
|
||||
## Improvements
|
||||
* ...
|
||||
|
||||
## Fixes
|
||||
* ...
|
||||
```
|
||||
|
||||
This file is used by GoReleaser as the GitHub Release body.
|
||||
|
||||
## 2. Bump Version
|
||||
|
||||
Update the version string in `pkg/util/version/version.go`:
|
||||
|
||||
```go
|
||||
var version = "0.X.0"
|
||||
```
|
||||
|
||||
Commit and push to `dev`:
|
||||
|
||||
```bash
|
||||
git add pkg/util/version/version.go Release.md
|
||||
git commit -m "bump version to vX.Y.Z"
|
||||
git push origin dev
|
||||
```
|
||||
|
||||
## 3. Merge dev → master
|
||||
|
||||
Create a PR from `dev` to `master`:
|
||||
|
||||
```bash
|
||||
gh pr create --base master --head dev --title "bump version"
|
||||
```
|
||||
|
||||
Wait for CI to pass, then merge using **merge commit** (not squash).
|
||||
|
||||
## 4. Tag the Release
|
||||
|
||||
```bash
|
||||
git checkout master
|
||||
git pull origin master
|
||||
git tag -a vX.Y.Z -m "bump version"
|
||||
git push origin vX.Y.Z
|
||||
```
|
||||
|
||||
## 5. Trigger GoReleaser
|
||||
|
||||
Manually trigger the `goreleaser` workflow in GitHub Actions:
|
||||
|
||||
```bash
|
||||
gh workflow run goreleaser --ref master
|
||||
```
|
||||
|
||||
GoReleaser will:
|
||||
1. Run `package.sh` to cross-compile all platforms and create archives
|
||||
2. Create a GitHub Release with all packages, using `Release.md` as release notes
|
||||
|
||||
## Key Files
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `pkg/util/version/version.go` | Version string |
|
||||
| `Release.md` | Release notes (read by GoReleaser) |
|
||||
| `.goreleaser.yml` | GoReleaser config |
|
||||
| `package.sh` | Cross-compile and packaging script |
|
||||
| `.github/workflows/goreleaser.yml` | GitHub Actions workflow (manual trigger) |
|
||||
|
||||
## Versioning
|
||||
|
||||
- Minor release: `v0.X.0`
|
||||
- Patch release: `v0.X.Y` (e.g., `v0.62.1`)
|
||||
@@ -1,8 +1,11 @@
|
||||
FROM node:22 AS web-builder
|
||||
|
||||
WORKDIR /web/frpc
|
||||
COPY web/frpc/ ./
|
||||
COPY web/package.json /web/package.json
|
||||
COPY web/shared/ /web/shared/
|
||||
COPY web/frpc/ /web/frpc/
|
||||
WORKDIR /web
|
||||
RUN npm install
|
||||
WORKDIR /web/frpc
|
||||
RUN npm run build
|
||||
|
||||
FROM golang:1.25 AS building
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
FROM node:22 AS web-builder
|
||||
|
||||
WORKDIR /web/frps
|
||||
COPY web/frps/ ./
|
||||
COPY web/package.json /web/package.json
|
||||
COPY web/shared/ /web/shared/
|
||||
COPY web/frps/ /web/frps/
|
||||
WORKDIR /web
|
||||
RUN npm install
|
||||
WORKDIR /web/frps
|
||||
RUN npm run build
|
||||
|
||||
FROM golang:1.25 AS building
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@use './mixins' as *;
|
||||
@use '@shared/css/mixins' as *;
|
||||
|
||||
/* Shared form layout styles for proxy/visitor form sections */
|
||||
.field-row {
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
@forward './variables';
|
||||
@forward './mixins';
|
||||
@@ -1,49 +0,0 @@
|
||||
@use './variables' as vars;
|
||||
|
||||
@mixin mobile {
|
||||
@media (max-width: #{vars.$breakpoint-mobile - 1px}) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin flex-center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@mixin flex-column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
@mixin page-scroll {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding: vars.$spacing-xl 40px;
|
||||
|
||||
> * {
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@include mobile {
|
||||
padding: vars.$spacing-xl;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin custom-scrollbar {
|
||||
&::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: #d1d1d1;
|
||||
border-radius: 3px;
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
// Typography
|
||||
$font-size-xs: 11px;
|
||||
$font-size-sm: 13px;
|
||||
$font-size-md: 14px;
|
||||
$font-size-lg: 15px;
|
||||
$font-size-xl: 18px;
|
||||
|
||||
$font-weight-normal: 400;
|
||||
$font-weight-medium: 500;
|
||||
$font-weight-semibold: 600;
|
||||
|
||||
// Colors - Text
|
||||
$color-text-primary: var(--color-text-primary);
|
||||
$color-text-secondary: var(--color-text-secondary);
|
||||
$color-text-muted: var(--color-text-muted);
|
||||
$color-text-light: var(--color-text-light);
|
||||
|
||||
// Colors - Background
|
||||
$color-bg-primary: var(--color-bg-primary);
|
||||
$color-bg-secondary: var(--color-bg-secondary);
|
||||
$color-bg-tertiary: var(--color-bg-tertiary);
|
||||
$color-bg-muted: var(--color-bg-muted);
|
||||
$color-bg-hover: var(--color-bg-hover);
|
||||
$color-bg-active: var(--color-bg-active);
|
||||
|
||||
// Colors - Border
|
||||
$color-border: var(--color-border);
|
||||
$color-border-light: var(--color-border-light);
|
||||
$color-border-lighter: var(--color-border-lighter);
|
||||
|
||||
// Colors - Status
|
||||
$color-primary: var(--color-primary);
|
||||
$color-danger: var(--color-danger);
|
||||
$color-danger-dark: var(--color-danger-dark);
|
||||
$color-danger-light: var(--color-danger-light);
|
||||
|
||||
// Colors - Button
|
||||
$color-btn-primary: var(--color-btn-primary);
|
||||
$color-btn-primary-hover: var(--color-btn-primary-hover);
|
||||
|
||||
// Spacing
|
||||
$spacing-xs: 4px;
|
||||
$spacing-sm: 8px;
|
||||
$spacing-md: 12px;
|
||||
$spacing-lg: 16px;
|
||||
$spacing-xl: 20px;
|
||||
|
||||
// Border Radius
|
||||
$radius-sm: 6px;
|
||||
$radius-md: 8px;
|
||||
|
||||
// Transitions
|
||||
$transition-fast: 0.15s ease;
|
||||
$transition-medium: 0.2s ease;
|
||||
|
||||
// Layout
|
||||
$header-height: 50px;
|
||||
$sidebar-width: 200px;
|
||||
|
||||
// Breakpoints
|
||||
$breakpoint-mobile: 768px;
|
||||
@@ -1,89 +0,0 @@
|
||||
.el-form-item span {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.proxy-table-expand {
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.proxy-table-expand .el-form-item__label{
|
||||
width: 90px;
|
||||
color: #99a9bf;
|
||||
}
|
||||
|
||||
.proxy-table-expand .el-form-item {
|
||||
margin-right: 0;
|
||||
margin-bottom: 0;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.el-table .el-table__expanded-cell {
|
||||
padding: 20px 50px;
|
||||
}
|
||||
|
||||
/* Modern styles */
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Smooth transitions */
|
||||
.el-button,
|
||||
.el-card,
|
||||
.el-input,
|
||||
.el-select,
|
||||
.el-tag {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
/* Card hover effects */
|
||||
.el-card:hover {
|
||||
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/* Better scrollbar */
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #c1c1c1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: #a8a8a8;
|
||||
}
|
||||
|
||||
/* Page headers */
|
||||
.el-page-header {
|
||||
padding: 16px 0;
|
||||
}
|
||||
|
||||
.el-page-header__title {
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Better form layouts */
|
||||
.el-form-item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
/* Responsive adjustments */
|
||||
@media (max-width: 768px) {
|
||||
.el-row {
|
||||
margin-left: 0 !important;
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
|
||||
.el-col {
|
||||
padding-left: 10px !important;
|
||||
padding-right: 10px !important;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user