Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
ba937e9
update README (#4139)
fatedier Apr 9, 2024
e52727e
update golib (#4142)
fatedier Apr 10, 2024
07946e9
fix: revert gorilla/websocket from 1.5.1 to 1.5.0 (#4149)
wlynxg Apr 11, 2024
dd7e2e8
return 504 instead of 404 for proxy type http request timeout (#4151)
fatedier Apr 11, 2024
f3a71bc
show tcpmux proxies on the frps dashboard (#4152)
fatedier Apr 11, 2024
2626d6e
support linux/arm v6 (#4154)
fatedier Apr 12, 2024
885278c
README add releated projects (#4167)
fatedier Apr 17, 2024
eaae212
Makefile.cross-compiles: Fix softfloat flag not being honored for mip…
ddscentral Apr 22, 2024
c1893ee
adjust arm compilation configuration (#4181)
fatedier Apr 25, 2024
4059690
client: add StatusExporter in service (#4182)
fatedier Apr 25, 2024
ee38927
change default value of heartbeat interval and timeout when tcpmux en…
fatedier Apr 28, 2024
d0d396b
Update README.md (#4190)
Weltolk Apr 29, 2024
e81b36c
support responseHeaders.set for proxy type http (#4192)
fatedier Apr 29, 2024
92cb0b3
update version (#4204)
fatedier May 7, 2024
4e8e9e1
Merge pull request #4205 from fatedier/dev
fatedier May 7, 2024
9ced717
update build-and-push-image.yml (#4206)
fatedier May 7, 2024
f0442d0
plugin: fix http2 not enabled for https2http and https2https plugin (…
fatedier May 21, 2024
301515d
update the default value of transport.tcpMuxKeepaliveInterval (#4231)
fatedier May 21, 2024
522e2c9
config: return error if plugin type is empty (#4235)
fatedier May 23, 2024
e680acf
android: only use google dns server when the default dns server canno…
fatedier May 23, 2024
77990c3
fix ini configuration default values (#4250)
fatedier May 30, 2024
e649692
Merge pull request #4253 from fatedier/dev
fatedier May 31, 2024
f390e4a
add sponsor (#4265)
fatedier Jun 5, 2024
939c490
Add http2http client plugin with hostHeaderRewrite and requestHeaders…
fatedier Jun 12, 2024
c6f9d8d
update sponsors (#4303)
fatedier Jun 26, 2024
b4d5d8c
plugin https2http&https2https: return 421 if host not match sni (#4323)
fatedier Jul 9, 2024
243ca99
Merge pull request #4324 from fatedier/dev
fatedier Jul 9, 2024
69cc422
client plugin: added plugin tls2raw (#4341)
fatedier Jul 25, 2024
e804519
Fix loginFailExit = false bug (#4354)
Yurunsoft Jul 30, 2024
ae73ec2
added a 30s timeout for frpc subcommands to avoid long delays (#4359)
fatedier Jul 30, 2024
f1fb2d7
update .github/FUNDING.yml (#4365)
fatedier Aug 2, 2024
d47e138
bump templexxx/cpu version and add support for linux/loong64 (#4367)
KatyushaScarlet Aug 6, 2024
2dcdb24
replace github.com/templexxx/xorsimd to the new version (#4373)
fatedier Aug 7, 2024
03c8d7b
bump kcp-go to add linux/loong64 support (#4384)
KatyushaScarlet Aug 16, 2024
ccfe8c9
Merge pull request #4392 from fatedier/dev
fatedier Aug 19, 2024
edd7cf8
chore: fix function name (#4416)
crystalstall Sep 6, 2024
fe4ca1b
Update README_zh.md (#4421)
f2elab Sep 6, 2024
2855ac7
frpc visitor: add --server-user option to specify server proxy userna…
fatedier Oct 9, 2024
2466e65
support multiple subjects in oidc ping (#4475)
RobKenis Oct 12, 2024
b14192a
feat: bump (#4490)
blizard863 Oct 15, 2024
3a08c2a
conf: fix example for tls2raw (#4494)
fatedier Oct 17, 2024
f7a06cb
use go1.23 (#4495)
fatedier Oct 17, 2024
4bbec09
Merge pull request #4496 from fatedier/dev
fatedier Oct 17, 2024
62352c7
dockerfiles: add tzdata (#4499)
fatedier Oct 18, 2024
9d5638c
update Release.md (#4500)
fatedier Oct 18, 2024
6ba849f
readme: update sponsor (#4504)
fatedier Oct 22, 2024
4383756
frps: add support for quic-bind-port parameter in frps (#4519)
fatedier Oct 30, 2024
dff56cb
update .golangci.yml (#4527)
fatedier Nov 7, 2024
8593eff
update sponsor info (#4545)
fatedier Nov 20, 2024
0358113
samber lo version up (#4569)
Guiwoo Dec 2, 2024
c73096f
Upgrade packages to resolve CVE-2024-53259 (#4577)
AdallomRoy Dec 10, 2024
bb912d6
enable h2c for vhost server (#4582)
sword-jin Dec 13, 2024
f47d8ab
update Release.md (#4589)
fatedier Dec 16, 2024
2a7aa69
Merge pull request #4590 from fatedier/dev
fatedier Dec 16, 2024
01fed8d
Update stale workflow (#4600)
fatedier Dec 19, 2024
092e5d3
client, pkg, server, test: replaced 'interface{}' with 'any' (#4611)
mihaigmarin Jan 2, 2025
6542dcd
Fix typos (#4615)
deining Jan 2, 2025
27db621
frpc: support metadatas and annotations in frpc proxy commands (#4623)
fatedier Jan 6, 2025
450b839
Fix goroutine leaks
Alpha2J Jan 16, 2025
b8d3ace
Use text/template instead of html/template for config pre-processing …
hansmi Feb 7, 2025
8b86e14
Fix ports not being released on Service.Close() (#4666)
ubergeek77 Feb 12, 2025
e0dd947
frps: release resources in service.Close() (#4667)
fatedier Feb 12, 2025
1e8db66
update Release.md (#4668)
fatedier Feb 12, 2025
9757a35
fix golangci lint config (#4698)
fatedier Mar 7, 2025
773169e
update version (#4699)
fatedier Mar 7, 2025
31b44c1
Merge pull request #4700 from fatedier/dev
fatedier Mar 7, 2025
a78814a
virtual-net: initial (#4751)
fatedier Apr 16, 2025
e208043
vnet: update tun_unsupported function (#4752)
fatedier Apr 16, 2025
c5a8f6e
Merge pull request #4753 from fatedier/dev
fatedier Apr 16, 2025
27f66ba
update feature gates doc (#4755)
fatedier Apr 16, 2025
3c8d648
vnet: fix issues (#4771)
fatedier Apr 27, 2025
b41d8f8
update release notes (#4772)
fatedier Apr 27, 2025
c99986f
build: add x64 openbsd (#4780)
CrynTox May 6, 2025
077ba80
fix: type error in server_plugin doc (#4799)
scientificworld May 19, 2025
8eb525a
feat: support YAML merge in strict configuration mode (#4809)
fatedier May 23, 2025
3fa76b7
add proxy protocol support for UDP proxies (#4810)
fatedier May 23, 2025
720c09c
update test package (#4814)
fatedier May 26, 2025
43cf168
update golangci-lint version (#4817)
fatedier May 27, 2025
c777891
update .golangci.yml (#4848)
fatedier Jun 25, 2025
af6bc63
Merge pull request #4849 from fatedier/dev
fatedier Jun 25, 2025
61330d4
Update quic-go dependency from v0.48.2 to v0.53.0 (#4862)
fatedier Jul 1, 2025
f9065a6
add tokenSource support for auth configuration (#4865)
fatedier Jul 3, 2025
c3bf952
fix webserver port not being released on frpc svr.Close() (#4896)
maguowei Jul 24, 2025
7fe295f
update golangci-lint version (#4897)
fatedier Jul 25, 2025
e6dacf3
Fix SSH tunnel gateway binding address issue #4900 (#4902)
fatedier Jul 28, 2025
dc3bc91
update sponsor info (#4917)
fatedier Aug 8, 2025
024e4f5
improve random TLS certificate generation (#4923)
fatedier Aug 10, 2025
f795950
bump version to v0.64.0 (#4924)
fatedier Aug 10, 2025
22ae816
Merge pull request #4925 from fatedier/dev
fatedier Aug 10, 2025
024c334
Merge pull request #4928 from fatedier/xtcp
fatedier Aug 11, 2025
14253af
remove quotes (#4938)
immomo808 Aug 15, 2025
80d3f33
xtcp: add configuration to disable assisted addresses in NAT traversa…
fatedier Aug 25, 2025
610e5ed
improve yamux logging (#4952)
fatedier Aug 25, 2025
604700c
update README (#4957)
fatedier Aug 27, 2025
0a798a7
update go version to 1.24 (#4960)
fatedier Aug 27, 2025
7cfa546
add proxy name label to the proxy_count prometheus metric (#4985)
charlieblevins Sep 22, 2025
abf4942
auth: enhance OIDC client with TLS and proxy configuration options (#…
fatedier Sep 25, 2025
6561107
chore: fix struct field name in comment (#4993)
juejinyuxitu Sep 25, 2025
b642a63
update sponsors info (#4997)
fatedier Sep 25, 2025
b5e90c0
bump version to v0.65.0 and update release notes (#4998)
fatedier Sep 25, 2025
2f5e1f7
Merge pull request #4999 from fatedier/dev
fatedier Sep 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
go-version-latest:
docker:
- image: cimg/go:1.22-node
- image: cimg/go:1.24-node
resource_class: large
steps:
- checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# These are supported funding model platforms

github: [fatedier]
custom: ["https://afdian.net/a/fatedier"]
custom: ["https://afdian.com/a/fatedier"]
4 changes: 2 additions & 2 deletions .github/workflows/build-and-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build Image and Publish to Dockerhub & GPR

on:
release:
types: [ created ]
types: [ published ]
workflow_dispatch:
inputs:
tag:
Expand Down Expand Up @@ -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@v4
uses: docker/build-push-action@v5
with:
context: .
file: ./dockerfiles/Dockerfile-for-frpc
Expand Down
22 changes: 3 additions & 19 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,10 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.24'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v8
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.57

# Optional: golangci-lint command line arguments.
# args: --issues-exit-code=0

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true

# Optional: if set to true then the all caching functionality will be complete disabled,
# takes precedence over all other caching options.
# skip-cache: true

# Optional: if set to true then the action don't cache or restore ~/go/pkg.
# skip-pkg-cache: true

# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# skip-build-cache: true
version: v2.3
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.24'

- name: Make All
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Close stale issues"
name: "Close stale issues and PRs"
on:
schedule:
- cron: "20 0 * * *"
Expand All @@ -21,14 +21,14 @@ jobs:
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.'
stale-pr-message: "PRs go stale after 21d of inactivity. Stale PRs rot after an additional 7d of inactivity and eventually close."
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."
stale-issue-label: 'lifecycle/stale'
exempt-issue-labels: 'bug,doc,enhancement,future,proposal,question,testing,todo,easy,help wanted,assigned'
stale-pr-label: 'lifecycle/stale'
exempt-pr-labels: 'bug,doc,enhancement,future,proposal,question,testing,todo,easy,help wanted,assigned'
days-before-stale: 21
days-before-close: 7
days-before-stale: 14
days-before-close: 3
debug-only: ${{ github.event.inputs.debug-only }}
exempt-all-pr-milestones: true
exempt-all-pr-assignees: true
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ client.key

# Cache
*.swp

# AI
CLAUDE.md
217 changes: 96 additions & 121 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,140 +1,115 @@
service:
golangci-lint-version: 1.57.x # use the fixed version to not introduce new linters unexpectedly

version: "2"
run:
concurrency: 4
# timeout for analysis, e.g. 30s, 5m, default is 1m
deadline: 20m
timeout: 20m
build-tags:
- integ
- integfuzz

linters:
disable-all: true
default: none
enable:
- unused
- asciicheck
- copyloopvar
- errcheck
- exportloopref
- gocritic
- gofumpt
- goimports
- revive
- gosimple
- gosec
- govet
- ineffassign
- lll
- makezero
- misspell
- prealloc
- predeclared
- revive
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
settings:
errcheck:
check-type-assertions: false
check-blank: false
gocritic:
disabled-checks:
- exitAfterDefer
gosec:
excludes:
- G401
- G402
- G404
- G501
- G115
severity: low
confidence: low
govet:
disable:
- shadow
lll:
line-length: 160
tab-width: 1
misspell:
locale: US
ignore-rules:
- cancelled
- marshalled
unparam:
check-exported: false
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- errcheck
- maligned
path: _test\.go$|^tests/|^samples/
- linters:
- revive
- staticcheck
text: use underscores in Go names
- linters:
- revive
text: unused-parameter
- linters:
- revive
text: "avoid meaningless package names"
- linters:
- unparam
text: is always false
paths:
- .*\.pb\.go
- .*\.gen\.go
- genfiles$
- vendor$
- bin$
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gosec
- asciicheck
- prealloc
- predeclared
- makezero
fast: false

linters-settings:
errcheck:
# report about not checking of errors in type assetions: `a := b.(MyStruct)`;
# default is false: such cases aren't reported by default.
check-type-assertions: false

# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
# default is false: such cases aren't reported by default.
check-blank: false
govet:
# report about shadowed variables
check-shadowing: false
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
misspell:
# Correct spellings using locale preferences for US or UK.
# Default is to use a neutral variety of English.
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
locale: US
ignore-words:
- cancelled
- marshalled
lll:
# max line length, lines longer will be reported. Default is 120.
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
line-length: 160
# tab width in spaces. Default to 1.
tab-width: 1
gocritic:
disabled-checks:
- exitAfterDefer
unused:
check-exported: false
unparam:
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
# with golangci-lint call it on a directory with the changed file.
check-exported: false
gci:
sections:
- standard
- default
- prefix(github.com/fatedier/frp/)
gosec:
severity: "low"
confidence: "low"
excludes:
- G102
- G112
- G306
- G401
- G402
- G404
- G501

- gofumpt
- goimports
settings:
gci:
sections:
- standard
- default
- prefix(github.com/fatedier/frp/)
exclusions:
generated: lax
paths:
- .*\.pb\.go
- .*\.gen\.go
- genfiles$
- vendor$
- bin$
- third_party$
- builtin$
- examples$
issues:
# List of regexps of issue texts to exclude, empty list by default.
# But independently from this option we use default exclude patterns,
# it can be disabled by `exclude-use-default: false`. To list all
# excluded by default patterns execute `golangci-lint run --help`
# exclude:
# - composite literal uses unkeyed fields

exclude-rules:
# Exclude some linters from running on test files.
- path: _test\.go$|^tests/|^samples/
linters:
- errcheck
- maligned
- linters:
- revive
- stylecheck
text: "use underscores in Go names"
- linters:
- revive
text: "unused-parameter"
- linters:
- unparam
text: "is always false"

exclude-dirs:
- genfiles$
- vendor$
- bin$
exclude-files:
- ".*\\.pb\\.go"
- ".*\\.gen\\.go"

# Independently from option `exclude` we use default exclude patterns,
# it can be disabled by this option. To list all
# excluded by default patterns execute `golangci-lint run --help`.
# Default value for this option is true.
exclude-use-default: true

# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-per-linter: 0

# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-issues-per-linter: 0
max-same-issues: 0
32 changes: 22 additions & 10 deletions Makefile.cross-compiles
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,34 @@ export PATH := $(PATH):`go env GOPATH`/bin
export GO111MODULE=on
LDFLAGS := -s -w

os-archs=darwin:amd64 darwin:arm64 freebsd:amd64 linux:amd64 linux:arm linux:arm64 windows:amd64 windows:arm64 linux:mips64 linux:mips64le linux:mips:softfloat linux:mipsle:softfloat linux:riscv64 android:arm64
os-archs=darwin:amd64 darwin:arm64 freebsd:amd64 openbsd:amd64 linux:amd64 linux:arm:7 linux:arm:5 linux:arm64 windows:amd64 windows:arm64 linux:mips64 linux:mips64le linux:mips:softfloat linux:mipsle:softfloat linux:riscv64 linux:loong64 android:arm64

all: build

build: app

app:
@$(foreach n, $(os-archs),\
os=$(shell echo "$(n)" | cut -d : -f 1);\
arch=$(shell echo "$(n)" | cut -d : -f 2);\
gomips=$(shell echo "$(n)" | cut -d : -f 3);\
target_suffix=$${os}_$${arch};\
echo "Build $${os}-$${arch}...";\
env CGO_ENABLED=0 GOOS=$${os} GOARCH=$${arch} GOMIPS=$${gomips} go build -trimpath -ldflags "$(LDFLAGS)" -tags frpc -o ./release/frpc_$${target_suffix} ./cmd/frpc;\
env CGO_ENABLED=0 GOOS=$${os} GOARCH=$${arch} GOMIPS=$${gomips} go build -trimpath -ldflags "$(LDFLAGS)" -tags frps -o ./release/frps_$${target_suffix} ./cmd/frps;\
echo "Build $${os}-$${arch} done";\
@$(foreach n, $(os-archs), \
os=$(shell echo "$(n)" | cut -d : -f 1); \
arch=$(shell echo "$(n)" | cut -d : -f 2); \
extra=$(shell echo "$(n)" | cut -d : -f 3); \
flags=''; \
target_suffix=$${os}_$${arch}; \
if [ "$${os}" = "linux" ] && [ "$${arch}" = "arm" ] && [ "$${extra}" != "" ] ; then \
if [ "$${extra}" = "7" ]; then \
flags=GOARM=7; \
target_suffix=$${os}_arm_hf; \
elif [ "$${extra}" = "5" ]; then \
flags=GOARM=5; \
target_suffix=$${os}_arm; \
fi; \
elif [ "$${os}" = "linux" ] && ([ "$${arch}" = "mips" ] || [ "$${arch}" = "mipsle" ]) && [ "$${extra}" != "" ] ; then \
flags=GOMIPS=$${extra}; \
fi; \
echo "Build $${os}-$${arch}$${extra:+ ($${extra})}..."; \
env CGO_ENABLED=0 GOOS=$${os} GOARCH=$${arch} $${flags} go build -trimpath -ldflags "$(LDFLAGS)" -tags frpc -o ./release/frpc_$${target_suffix} ./cmd/frpc; \
env CGO_ENABLED=0 GOOS=$${os} GOARCH=$${arch} $${flags} go build -trimpath -ldflags "$(LDFLAGS)" -tags frps -o ./release/frps_$${target_suffix} ./cmd/frps; \
echo "Build $${os}-$${arch}$${extra:+ ($${extra})} done"; \
)
@mv ./release/frpc_windows_amd64 ./release/frpc_windows_amd64.exe
@mv ./release/frps_windows_amd64 ./release/frps_windows_amd64.exe
Expand Down
Loading