Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Release/v1.7.0 into Master #1211

Merged
merged 82 commits into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
2095c6b
typo: fix docs/example markdown lint
kwanhur Feb 8, 2022
59879a3
typo: code span on function prototype of bfe callback
kwanhur Feb 8, 2022
105b909
typo: fix docs/introduction markdown lint and syntax
kwanhur Feb 9, 2022
668eeaf
typo: fix docs/installation markdown lint and syntax
kwanhur Feb 9, 2022
5f002a8
typo: fix docs/faq markdown lint and syntax
kwanhur Feb 9, 2022
e4fc6d0
typo: fix docs/modules markdown lint
kwanhur Feb 9, 2022
df96c07
typo: fix docs/operation markdown lint
kwanhur Feb 9, 2022
79959f5
typo: fix docs/monitor markdown lint and syntax
kwanhur Feb 9, 2022
6859359
Add en_us/condition/request/context.md
iyangsj Feb 11, 2022
6bac047
Add zh_cn/condition/request/context.md
iyangsj Feb 11, 2022
2f7516f
add req_context_value_in() to condition_primitive_index.md and adjust…
mileszhang2016 Feb 11, 2022
4e99c85
ci: add markdown lint action
kwanhur Feb 11, 2022
1a98cce
typo: fix docs/condition markdown lints
kwanhur Feb 11, 2022
8733dbb
Revert "chore: add typos in pre-commit"
mileszhang2016 Feb 14, 2022
68b140d
typo: fix bfe_balance spelling
kwanhur Feb 28, 2022
1fa0240
typo: fix bfe_basic BOM
kwanhur Feb 28, 2022
83d2699
typo: fix bfe_config spelling
kwanhur Feb 28, 2022
8307517
typo: fix bfe_fcgi spelling
kwanhur Feb 28, 2022
e2e2916
typo: fix bfe_http bfe_server spelling
kwanhur Feb 28, 2022
f6ec011
typo: fix bfe_http2 spelling
kwanhur Feb 28, 2022
0b75da9
typo: fix bfe_module spelling
kwanhur Feb 28, 2022
308c3ed
typo: format bfe_modules/mod_userid
kwanhur Feb 28, 2022
f5e27a8
typo: fix bfe_route spelling
kwanhur Feb 28, 2022
5d81115
typo: fix bfe_spdy spelling
kwanhur Feb 28, 2022
76d70ab
typo: fix bfe_tls spelling
kwanhur Feb 28, 2022
2031195
typo: format bfe_util/socket_util
kwanhur Feb 28, 2022
485ba30
chore: ignore log rotate files
kwanhur Feb 28, 2022
547ef8d
typo: remove dot at the end
kwanhur Mar 2, 2022
3ce72c6
Fix typo in mod_geo (#1029)
blinkbean Mar 11, 2022
334db33
Add staticcheck pre-commit hook (#1019)
kwanhur Apr 6, 2022
b7c1324
Add precommit hook for markdownlint (#1038)
kwanhur Apr 28, 2022
eca1a8a
Evict the oldest conn when the conn pool exceeds its limit (#1044)
ccqy66 May 27, 2022
17ecf4c
import code-lint workflow job (#1037)
kwanhur May 28, 2022
fa9d4c0
fix go.yaml dependency
daimg May 28, 2022
3421e3a
fix arm build error in golang1.18
daimg Jun 6, 2022
bcf1991
refactor: replace strings.Replace with strings.ReplaceAll
Juneezee Jun 6, 2022
fc6cd2a
Create some slices with enough capacity (#1054)
ccqy66 Jun 22, 2022
4ba930b
Update ci.yml (#1061)
kezhenxu94 Jul 17, 2022
948447e
fix build failed on macos (#1067)
supermario1990 Jul 24, 2022
e2284f4
Make some optimization for leastConnsBalance (#1062)
cooper-li Jul 29, 2022
5b72fcc
Fix some unreachable code in unit tests (#1068)
Abirdcfly Aug 22, 2022
3c90fde
Support HTTP/2 fingerprint (#1072)
xqbumu Sep 13, 2022
1697301
update v1.6.0 changelog
clarinette9 Oct 21, 2022
159c0e8
update changelog and version file
clarinette9 Oct 21, 2022
c9f23d5
Update CHANGELOG.md
clarinette9 Oct 21, 2022
982f37b
Update condition_grammar.md
mileszhang2016 Jan 10, 2023
2b50bfd
Update README.md
mileszhang2016 Feb 3, 2023
2d25362
update mkdocs yml and download link for v1.5 and v1.6 (#1084)
clarinette9 Mar 2, 2023
76da81b
Resolved #800 support test configuration
kwanhur Sep 25, 2021
4bf7bb4
Update MAINTAINERS.md
clarinette9 Jun 1, 2023
c24ab64
Update MAINTAINERS.md
clarinette9 Jun 1, 2023
ee21224
update maintainers.md
clarinette9 Jun 1, 2023
52fc18a
fix some typo (#1113)
cuishuang Sep 29, 2023
e84862e
Update ci.yml
iyangsj Sep 29, 2023
6900bd1
Update ADOPTERS.md (#1123)
pheianox Sep 29, 2023
9a6fbf1
build(deps): bump golang.org/x/sys (#1101)
dependabot[bot] Dec 9, 2023
6ce727a
remove TestSetKeepAlive
Mar 12, 2024
afb3175
remove TestSetKeepAlive
Mar 13, 2024
7c03108
Resubmit with Signed-off-by line
Mar 13, 2024
944a2d9
Resubmit with Signed-off-by line
Mar 13, 2024
4bc7fe2
http2: close connections when receiving too many headers (#1156)
z8n24 May 16, 2024
da41348
Update Dockerfile to support multiarch build (#1120)
watchword Oct 4, 2024
26035c7
Fix format issue in bfe_http/request_test.go (#1163)
cuishuang Oct 4, 2024
7fb0998
Temporarily remove some test cases using legacy test data (#1193)
iyangsj Oct 5, 2024
ba47dbb
The experimental `dynamic plugin` is deprecated (#1197)
iyangsj Oct 5, 2024
47831d8
Update versions of some thirdpaty modules (#1198)
iyangsj Oct 8, 2024
7f3ee83
Upgrade third-party modules for security reasons (#1201)
iyangsj Oct 22, 2024
575075b
bfe_wasm
Nov 30, 2024
5d3eb4d
remove v2
Dec 1, 2024
bd5297d
remove redundant codes
Dec 1, 2024
c9e8250
fix OnPluginStart
Dec 3, 2024
5ed7d4a
refine codes
Dec 3, 2024
7addfdc
fix.
Dec 3, 2024
f8023f5
fix nil
Dec 3, 2024
90864cf
rename package & remove some obsolete lines.
Dec 4, 2024
3de19c7
refine
Dec 4, 2024
3c7980e
fix & refine
Dec 5, 2024
680b986
docs of mod_wasmplugin
Dec 30, 2024
39f22bf
add link in summary.md to mod_wasmplugin
Dec 31, 2024
50fc88f
fix "bfe_http : readloop goroutine leak #1209"
Jan 13, 2025
428b8a2
update changlog and version file for v1.7.0
Jan 19, 2025
ff98694
Resolve merge conflict by incorporating both suggestions
Jan 19, 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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.21

# Build
- name: Build
Expand All @@ -75,8 +75,8 @@ jobs:
- name: setup Python
uses: actions/setup-python@v2
with:
python-version: '2.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
- run: python -m SimpleHTTPServer 8181&
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
- run: python3 -m http.server 8181&

# Modify Conf and Run
- name: Run
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ coverage.txt
.vscode/*
bfe
dist/*
conf/wasm_plugin

.DS_Store
32 changes: 0 additions & 32 deletions .markdownlint.yml

This file was deleted.

2 changes: 2 additions & 0 deletions ADOPTERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Some of our users include:

* [Haier](https://www.haier.com)

* [PITS Global Data Recovery Services](https://pitsdatarecovery.net/)

* [Postal Savings Bank of China](https://www.psbc.com)

* [Resolink](https://www.crresolink.com.cn)
Expand Down
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,46 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v1.7.0] - 2025-01-19

### Added

- Support building docker images for multiple architectures
- Support WASM to allow dynamic plugin

### Fixed

- Upgrade versions of some third-paty modules for security reasons
- Fix format issue in bfe_http/request_test.go
- Temporarily remove some test cases using legacy test data
- mod_tcp_keepalive: fix broken unit tests
- http2: close connections when receiving too many headers
- Fix readloop goroutine leak

### Removed

- The previous experimental dynamic plugin is deprecated

## [v1.6.0] - 2022-10-21

### Added

- Allow user to disable monitor port ([Issue #936](/~https://github.com/bfenetworks/bfe/issues/936))
- Support HTTP2 fingerprint ([Issue #1071](/~https://github.com/bfenetworks/bfe/issues/1071))
- Documents optimization

### Changed

- Optimize idle connection handling ([Pull #1044](/~https://github.com/bfenetworks/bfe/pull/1044))
- Performance optimize in smooth least connection balancing algorithm([Pull #1062](/~https://github.com/bfenetworks/bfe/pull/1062))
- Miscellaneous golang dependency updates
- Miscellaneous improvements in makefile and other CI tools

### Fixed

- mod_trust_clientip: fix incorrect private IP address range ([Issue #856](/~https://github.com/bfenetworks/bfe/issues/856))
- arm build error in golang 1.18

## [v1.6.0] - 2022-10-21

### Added
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM golang:1.17.5-alpine3.15 AS build
FROM --platform=${BUILDPLATFORM} golang:1.17.5-alpine3.15 AS build
ARG TARGETARCH
ARG TARGETOS

WORKDIR /bfe
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=`cat VERSION`"
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags "-X main.version=`cat VERSION`"

FROM alpine:3.15 AS run
RUN apk update && apk add --no-cache ca-certificates
Expand Down
14 changes: 9 additions & 5 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,25 @@ This file lists who are the maintainers of the BFE project. The responsibilities

| Name | GitHub ID | Affiliation |
| ---- | --------- | ----------- |
| [Miao Zhang](mailto:zhangmiao02@baidu.com) | [mileszhang2016](/~https://github.com/mileszhang2016) | Baidu |
| [Sijie Yang](mailto:iyangsj@gmail.com) | [iyangsj](/~https://github.com/iyangsj) | Baidu |
| [Miao Zhang](mailto:zhangmiao@yf-networks.com) | [mileszhang2016](/~https://github.com/mileszhang2016) | Yingfei Networks |
| [Sijie Yang](mailto:iyangsj@gmail.com) | [iyangsj](/~https://github.com/iyangsj) | Tencent |

## Senior Maintainers

| Name | GitHub ID | Affiliation |
| ---- | --------- | ----------- |
| [Sijie Yang](mailto:iyangsj@gmail.com) | [iyangsj](/~https://github.com/iyangsj) | Baidu |
| [Sijie Yang](mailto:iyangsj@gmail.com) | [iyangsj](/~https://github.com/iyangsj) | Tencent |

## Maintainers

| Name | GitHub ID | Affiliation |
| ---- | --------- | ----------- |
| [Derek Zheng](mailto:shanhu5739@gmail.com) | [shanhuhai5739](/~https://github.com/shanhuhai5739) | Kuaishou |
| [Xiaofei Yu](mailto:nemo_00o@hotmail.com) | [xiaofei0800](/~https://github.com/xiaofei0800) | Baidu |
| [Xiaofei Yu](mailto:nemo_00o@hotmail.com) | [xiaofei0800](/~https://github.com/xiaofei0800) | Tencent |
| [Wensi Yang](mailto:tianxinheihei@gmail.com) | [tianxinheihei](/~https://github.com/tianxinheihei) | ByteDance |
| [Kaiyu Zheng](mailto:412674752@qq.com) | [kaiyuzheng](/~https://github.com/kaiyuzheng) | ByteDance |
| [Yuqi Xiao](mailto:xiao19910705@163.com) | [Yuqi Xiao](/~https://github.com/YuqiXiao) | Baidu |
| [Yuqi Xiao](mailto:xiao19910705@163.com) | [YuqiXiao](/~https://github.com/YuqiXiao) | ByteDance |
| [Wei Wei](mailto:ww990114@gmail.com) | [weiwei99](/~https://github.com/weiwei99) | Baidu |
| [Andy Liang](mailto:lianglei@yf-networks.com) | [andyxmu](/~https://github.com/andyxmu) | Yingfei Networks |
| [Leiming Xu](mailto:xuleiming@yf-networks.com) | [xuleiming](/~https://github.com/xuleiming) | Yingfei Networks |
| [Jian Song](mailto:songjian@yf-networks.com) | [clarinette9](/~https://github.com/clarinette9) | Yingfei Networks |
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ strip: prepare compile-strip package
# make prepare, download dependencies
prepare: prepare-dep prepare-gen
prepare-dep:
$(call INSTALL_PKG, goyacc, golang.org/x/tools/cmd/goyacc)
$(call INSTALL_PKG, goyacc, golang.org/x/tools/cmd/goyacc@latest)
prepare-gen:
cd "bfe_basic/condition/parser" && $(GOGEN)

Expand Down Expand Up @@ -117,7 +117,7 @@ package:
# make deps
deps:
$(call PIP_INSTALL_PKG, pre-commit)
$(call INSTALL_PKG, goyacc, golang.org/x/tools/cmd/goyacc)
$(call INSTALL_PKG, goyacc, golang.org/x/tools/cmd/goyacc@latest)
$(call INSTALL_PKG, staticcheck, honnef.co/go/tools/cmd/staticcheck)
$(call INSTALL_PKG, license-eye, github.com/apache/skywalking-eyes/cmd/license-eye@latest)

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ Besides, we also implement [BFE Ingress Controller](/~https://github.com/bfenetwor
- [English version](https://www.bfe-networks.net/en_us/ABOUT/)
- [Chinese version](https://www.bfe-networks.net/zh_cn/ABOUT/)

## Book

- [In-depth Understanding of BFE](/~https://github.com/baidu/bfe-book) (Released in Feb 2023)

This book focuses on BFE open source project, introduces the relevant technical principles of network access, explains the design idea of BFE open source software, and how to build a network front-end platform based on BFE open source software. Readers with development capabilities can also develop BFE extension modules according to their own needs or contribute code to BFE open source projects according to the instructions in this book.


## Contributing

- Please create an issue in [issue list](http://github.com/bfenetworks/bfe/issues).
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.0
1.7.0
28 changes: 24 additions & 4 deletions bfe.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ var (
showVersion = flag.Bool("v", false, "to show version of bfe")
showVerbose = flag.Bool("V", false, "to show verbose information about bfe")
debugLog = flag.Bool("d", false, "to show debug log (otherwise >= info)")
testConf = flag.Bool("t", false, "test configuration and exit")
)

var version string
Expand Down Expand Up @@ -74,7 +75,12 @@ func main() {
logSwitch = "DEBUG"
bfe_debug.DebugIsOpen = true
} else {
logSwitch = "INFO"
// ignore under ERROR level
if *testConf {
logSwitch = "ERROR"
} else {
logSwitch = "INFO"
}
bfe_debug.DebugIsOpen = false
}

Expand All @@ -84,7 +90,7 @@ func main() {
log4go.SetLogFormat(log4go.FORMAT_DEFAULT_WITH_PID)
log4go.SetSrcLineForBinLog(false)

err = log.Init("bfe", logSwitch, *logPath, *stdOut, "midnight", 7)
err = log.Init("bfe", logSwitch, *logPath, *stdOut || *testConf, "midnight", 7)
if err != nil {
fmt.Printf("bfe: err in log.Init():%s\n", err.Error())
bfe_util.AbnormalExit()
Expand All @@ -97,10 +103,13 @@ func main() {
config, err = bfe_conf.BfeConfigLoad(confPath, *confRoot)
if err != nil {
log.Logger.Error("main(): in BfeConfigLoad():%s", err.Error())
if *testConf {
fmt.Printf("bfe: configuration file %s test failed\n", confPath)
}
bfe_util.AbnormalExit()
}

// maximum number of CPUs (GOMAXPROCS) defaults to runtime.CPUNUM
// maximum number of CPUs (GOMAXPROCS) defaults to runtime.CPUNUM
// if running on machine, or CPU quota if running on container
// (with the help of "go.uber.org/automaxprocs").
// here, we change maximum number of cpus if the MaxCpus is positive.
Expand All @@ -112,11 +121,22 @@ func main() {
bfe_debug.SetDebugFlag(config.Server)

// start and serve
if err = bfe_server.StartUp(config, version, *confRoot); err != nil {
if err = bfe_server.StartUp(config, version, *confRoot, *testConf); err != nil {
log.Logger.Error("main(): bfe_server.StartUp(): %s", err.Error())
}

// waiting for logger finish jobs
time.Sleep(1 * time.Second)
log.Logger.Close()

// output final configuration test result
if *testConf {
if err != nil {
fmt.Printf("bfe: configuration file %s test failed\n", confPath)
bfe_util.AbnormalExit()
} else {
fmt.Printf("bfe: configuration file %s test is successful\n", confPath)
bfe_util.NormalExit()
}
}
}
Loading