mirror of
https://github.com/fatedier/frp.git
synced 2026-07-31 01:42:55 +08:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97dcb1e34b |
@@ -6,14 +6,6 @@ jobs:
|
|||||||
resource_class: large
|
resource_class: large
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
|
||||||
name: Build web assets (frps)
|
|
||||||
command: make install build
|
|
||||||
working_directory: web/frps
|
|
||||||
- run:
|
|
||||||
name: Build web assets (frpc)
|
|
||||||
command: make install build
|
|
||||||
working_directory: web/frpc
|
|
||||||
- run: make
|
- run: make
|
||||||
- run: make alltest
|
- run: make alltest
|
||||||
|
|
||||||
|
|||||||
@@ -19,15 +19,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: '1.24'
|
go-version: '1.24'
|
||||||
cache: false
|
cache: false
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '22'
|
|
||||||
- name: Build web assets (frps)
|
|
||||||
run: make install build
|
|
||||||
working-directory: web/frps
|
|
||||||
- name: Build web assets (frpc)
|
|
||||||
run: make install build
|
|
||||||
working-directory: web/frpc
|
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@v8
|
uses: golangci/golangci-lint-action@v8
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -16,21 +16,13 @@ jobs:
|
|||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.24'
|
go-version: '1.24'
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '22'
|
|
||||||
- name: Build web assets (frps)
|
|
||||||
run: make install build
|
|
||||||
working-directory: web/frps
|
|
||||||
- name: Build web assets (frpc)
|
|
||||||
run: make install build
|
|
||||||
working-directory: web/frpc
|
|
||||||
- name: Make All
|
- name: Make All
|
||||||
run: |
|
run: |
|
||||||
./package.sh
|
./package.sh
|
||||||
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v6
|
uses: goreleaser/goreleaser-action@v5
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
args: release --clean --release-notes=./Release.md
|
args: release --clean --release-notes=./Release.md
|
||||||
|
|||||||
@@ -2,22 +2,19 @@ export PATH := $(PATH):`go env GOPATH`/bin
|
|||||||
export GO111MODULE=on
|
export GO111MODULE=on
|
||||||
LDFLAGS := -s -w
|
LDFLAGS := -s -w
|
||||||
|
|
||||||
.PHONY: web frps-web frpc-web frps frpc
|
all: env fmt build
|
||||||
|
|
||||||
all: env fmt web build
|
|
||||||
|
|
||||||
build: frps frpc
|
build: frps frpc
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@go version
|
@go version
|
||||||
|
|
||||||
web: frps-web frpc-web
|
# compile assets into binary file
|
||||||
|
file:
|
||||||
frps-web:
|
rm -rf ./assets/frps/static/*
|
||||||
$(MAKE) -C web/frps build
|
rm -rf ./assets/frpc/static/*
|
||||||
|
cp -rf ./web/frps/dist/* ./assets/frps/static
|
||||||
frpc-web:
|
cp -rf ./web/frpc/dist/* ./assets/frpc/static
|
||||||
$(MAKE) -C web/frpc build
|
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
go fmt ./...
|
go fmt ./...
|
||||||
@@ -28,7 +25,7 @@ fmt-more:
|
|||||||
gci:
|
gci:
|
||||||
gci write -s standard -s default -s "prefix(github.com/fatedier/frp/)" ./
|
gci write -s standard -s default -s "prefix(github.com/fatedier/frp/)" ./
|
||||||
|
|
||||||
vet: web
|
vet:
|
||||||
go vet ./...
|
go vet ./...
|
||||||
|
|
||||||
frps:
|
frps:
|
||||||
@@ -39,7 +36,7 @@ frpc:
|
|||||||
|
|
||||||
test: gotest
|
test: gotest
|
||||||
|
|
||||||
gotest: web
|
gotest:
|
||||||
go test -v --cover ./assets/...
|
go test -v --cover ./assets/...
|
||||||
go test -v --cover ./cmd/...
|
go test -v --cover ./cmd/...
|
||||||
go test -v --cover ./client/...
|
go test -v --cover ./client/...
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ frp is an open source project with its ongoing development made possible entirel
|
|||||||
<h3 align="center">Gold Sponsors</h3>
|
<h3 align="center">Gold Sponsors</h3>
|
||||||
<!--gold sponsors start-->
|
<!--gold sponsors start-->
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://requestly.com/?utm_source=github&utm_medium=partnered&utm_campaign=frp" target="_blank">
|
<a href="https://go.warp.dev/frp" target="_blank">
|
||||||
<img width="480px" src="https://github.com/user-attachments/assets/24670320-997d-4d62-9bca-955c59fe883d">
|
<img width="360px" src="https://raw.githubusercontent.com/warpdotdev/brand-assets/refs/heads/main/Github/Sponsor/Warp-Github-LG-01.png">
|
||||||
<br>
|
<br>
|
||||||
<b>Requestly - Free & Open-Source alternative to Postman</b>
|
<b>Warp, built for collaborating with AI Agents</b>
|
||||||
<br>
|
<br>
|
||||||
<sub>All-in-one platform to Test, Mock and Intercept APIs.</sub>
|
<sub>Available for macOS, Linux and Windows</sub>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -49,6 +49,15 @@ If you're looking for a meeting recording API, consider checking out [Recall.ai]
|
|||||||
an API that records Zoom, Google Meet, Microsoft Teams, in-person meetings, and more.
|
an API that records Zoom, Google Meet, Microsoft Teams, in-person meetings, and more.
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://requestly.com/?utm_source=github&utm_medium=partnered&utm_campaign=frp" target="_blank">
|
||||||
|
<img width="480px" src="https://github.com/user-attachments/assets/24670320-997d-4d62-9bca-955c59fe883d">
|
||||||
|
<br>
|
||||||
|
<b>Requestly - Free & Open-Source alternative to Postman</b>
|
||||||
|
<br>
|
||||||
|
<sub>All-in-one platform to Test, Mock and Intercept APIs.</sub>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
<!--gold sponsors end-->
|
<!--gold sponsors end-->
|
||||||
|
|
||||||
## What is frp?
|
## What is frp?
|
||||||
|
|||||||
+13
-4
@@ -16,12 +16,12 @@ frp 是一个完全开源的项目,我们的开发工作完全依靠赞助者
|
|||||||
<h3 align="center">Gold Sponsors</h3>
|
<h3 align="center">Gold Sponsors</h3>
|
||||||
<!--gold sponsors start-->
|
<!--gold sponsors start-->
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://requestly.com/?utm_source=github&utm_medium=partnered&utm_campaign=frp" target="_blank">
|
<a href="https://go.warp.dev/frp" target="_blank">
|
||||||
<img width="480px" src="https://github.com/user-attachments/assets/24670320-997d-4d62-9bca-955c59fe883d">
|
<img width="360px" src="https://raw.githubusercontent.com/warpdotdev/brand-assets/refs/heads/main/Github/Sponsor/Warp-Github-LG-01.png">
|
||||||
<br>
|
<br>
|
||||||
<b>Requestly - Free & Open-Source alternative to Postman</b>
|
<b>Warp, built for collaborating with AI Agents</b>
|
||||||
<br>
|
<br>
|
||||||
<sub>All-in-one platform to Test, Mock and Intercept APIs.</sub>
|
<sub>Available for macOS, Linux and Windows</sub>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -51,6 +51,15 @@ If you're looking for a meeting recording API, consider checking out [Recall.ai]
|
|||||||
an API that records Zoom, Google Meet, Microsoft Teams, in-person meetings, and more.
|
an API that records Zoom, Google Meet, Microsoft Teams, in-person meetings, and more.
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://requestly.com/?utm_source=github&utm_medium=partnered&utm_campaign=frp" target="_blank">
|
||||||
|
<img width="480px" src="https://github.com/user-attachments/assets/24670320-997d-4d62-9bca-955c59fe883d">
|
||||||
|
<br>
|
||||||
|
<b>Requestly - Free & Open-Source alternative to Postman</b>
|
||||||
|
<br>
|
||||||
|
<sub>All-in-one platform to Test, Mock and Intercept APIs.</sub>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
<!--gold sponsors end-->
|
<!--gold sponsors end-->
|
||||||
|
|
||||||
## 为什么使用 frp ?
|
## 为什么使用 frp ?
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@ func Load(path string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Register(fileSystem fs.FS) {
|
func Register(fileSystem fs.FS) {
|
||||||
subFs, err := fs.Sub(fileSystem, "dist")
|
subFs, err := fs.Sub(fileSystem, "static")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
content = subFs
|
content = subFs
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"github.com/fatedier/frp/assets"
|
"github.com/fatedier/frp/assets"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed dist
|
//go:embed static/*
|
||||||
var EmbedFS embed.FS
|
var content embed.FS
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
assets.Register(EmbedFS)
|
assets.Register(content)
|
||||||
}
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,15 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>frp client</title>
|
||||||
|
<script type="module" crossorigin src="./index-BAsh6RH1.js"></script>
|
||||||
|
<link rel="stylesheet" crossorigin href="./index-JCcyRUo1.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package frpc
|
||||||
|
|
||||||
|
import (
|
||||||
|
"embed"
|
||||||
|
|
||||||
|
"github.com/fatedier/frp/assets"
|
||||||
|
)
|
||||||
|
|
||||||
|
//go:embed static/*
|
||||||
|
var content embed.FS
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
assets.Register(content)
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,15 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" class="dark">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>frp server</title>
|
||||||
|
<script type="module" crossorigin src="./index-r9B2t7lx.js"></script>
|
||||||
|
<link rel="stylesheet" crossorigin href="./index-Cl4R6mJh.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
+1
-1
@@ -15,9 +15,9 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
_ "github.com/fatedier/frp/assets/frpc"
|
||||||
"github.com/fatedier/frp/cmd/frpc/sub"
|
"github.com/fatedier/frp/cmd/frpc/sub"
|
||||||
"github.com/fatedier/frp/pkg/util/system"
|
"github.com/fatedier/frp/pkg/util/system"
|
||||||
_ "github.com/fatedier/frp/web/frpc"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
+1
-1
@@ -15,9 +15,9 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
_ "github.com/fatedier/frp/assets/frps"
|
||||||
_ "github.com/fatedier/frp/pkg/metrics"
|
_ "github.com/fatedier/frp/pkg/metrics"
|
||||||
"github.com/fatedier/frp/pkg/util/system"
|
"github.com/fatedier/frp/pkg/util/system"
|
||||||
_ "github.com/fatedier/frp/web/frps"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -1,17 +1,9 @@
|
|||||||
FROM node:22 AS web-builder
|
|
||||||
|
|
||||||
WORKDIR /web/frpc
|
|
||||||
COPY web/frpc/ ./
|
|
||||||
RUN npm install
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
FROM golang:1.24 AS building
|
FROM golang:1.24 AS building
|
||||||
|
|
||||||
COPY . /building
|
COPY . /building
|
||||||
COPY --from=web-builder /web/frpc/dist /building/web/frpc/dist
|
|
||||||
WORKDIR /building
|
WORKDIR /building
|
||||||
|
|
||||||
RUN env CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -tags frpc -o bin/frpc ./cmd/frpc
|
RUN make frpc
|
||||||
|
|
||||||
FROM alpine:3
|
FROM alpine:3
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,9 @@
|
|||||||
FROM node:22 AS web-builder
|
|
||||||
|
|
||||||
WORKDIR /web/frps
|
|
||||||
COPY web/frps/ ./
|
|
||||||
RUN npm install
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
FROM golang:1.24 AS building
|
FROM golang:1.24 AS building
|
||||||
|
|
||||||
COPY . /building
|
COPY . /building
|
||||||
COPY --from=web-builder /web/frps/dist /building/web/frps/dist
|
|
||||||
WORKDIR /building
|
WORKDIR /building
|
||||||
|
|
||||||
RUN env CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -tags frps -o bin/frps ./cmd/frps
|
RUN make frps
|
||||||
|
|
||||||
FROM alpine:3
|
FROM alpine:3
|
||||||
|
|
||||||
|
|||||||
+1
-4
@@ -1,7 +1,4 @@
|
|||||||
.PHONY: dist install build preview lint
|
.PHONY: dist build preview lint
|
||||||
|
|
||||||
install:
|
|
||||||
@npm install
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@npm run build
|
@npm run build
|
||||||
|
|||||||
Generated
-5857
File diff suppressed because it is too large
Load Diff
+2975
File diff suppressed because it is too large
Load Diff
+1
-4
@@ -1,7 +1,4 @@
|
|||||||
.PHONY: dist install build preview lint
|
.PHONY: dist build preview lint
|
||||||
|
|
||||||
install:
|
|
||||||
@npm install
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@npm run build
|
@npm run build
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
package frps
|
|
||||||
|
|
||||||
import (
|
|
||||||
"embed"
|
|
||||||
|
|
||||||
"github.com/fatedier/frp/assets"
|
|
||||||
)
|
|
||||||
|
|
||||||
//go:embed dist
|
|
||||||
var EmbedFS embed.FS
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
assets.Register(EmbedFS)
|
|
||||||
}
|
|
||||||
Generated
-6687
File diff suppressed because it is too large
Load Diff
+3015
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user