-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
metric-api: Add prometheus metrics #2060
Open
juvenn
wants to merge
31
commits into
SagerNet:dev-next
Choose a base branch
from
juvenn:feat/metric-api
base: dev-next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
a3c2fa6
wireguard: Fix events chan leak
nekohasekai 5a184b8
Update workflow to go1.23
nekohasekai ecdaac1
Introduce bittorrent related protocol sniffers
iosmanthus f4cd036
Introduce DTLS sniffer
nekohasekai 10d33ee
Drop support for go1.18 and go1.19
nekohasekai e413f84
platform: Prepare connections list
nekohasekai cbadd7a
platform: Add log update interval
nekohasekai e889c0c
platform: Fix clash server reload on android
nekohasekai 318c1f1
WTF is this
nekohasekai defa521
Implement read deadline for QUIC based UDP inbounds
nekohasekai 6c96e81
Bump rule-set version
nekohasekai b67eb68
Improve usages of `json.Unmarshal`
nekohasekai 8593c8e
Add IP address support for `rule-set match` match
nekohasekai b253e22
Add `rule-set decompile` command
nekohasekai 8c60321
Add auto-redirect & Improve auto-route
nekohasekai f08a46f
Improve base DNS transports & Minor fixes
nekohasekai 345cf67
Add custom options for TUN `auto-route` and `auto-redirect`
nekohasekai 79dece9
Add accept empty DNS rule option
nekohasekai 45eb3b9
Unique rule-set names
nekohasekai 33ce490
Add inline rule-set & Add reload for local rule-set
nekohasekai 75f9b22
Improve QUIC sniffer
nekohasekai 7f45055
Add AdGuard DNS filter support
nekohasekai 15f66ef
Write close error to log
nekohasekai f6a0194
Introduce SSH sniffer
nekohasekai 7007fec
clash-api: Fix bad redirect
nekohasekai 6dfa5e8
clash-api: Add PNA support
nekohasekai 05c4f94
documentation: Bump version
nekohasekai 08e72b1
metric-api: Add prometheus metrics
juvenn 3c6173d
metric-api: Fix include
juvenn 7363f49
metric-api: http server error handling
juvenn d98115d
metric-api: Add config options doc
juvenn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
release: | ||
types: | ||
- released | ||
- prereleased | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM --platform=$BUILDPLATFORM golang:1.22-alpine AS builder | ||
FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS builder | ||
LABEL maintainer="nekohasekai <[email protected]>" | ||
COPY . /go/src/github.com/sagernet/sing-box | ||
WORKDIR /go/src/github.com/sagernet/sing-box | ||
|
@@ -13,15 +13,15 @@ RUN set -ex \ | |
&& export COMMIT=$(git rev-parse --short HEAD) \ | ||
&& export VERSION=$(go run ./cmd/internal/read_tag) \ | ||
&& go build -v -trimpath -tags \ | ||
"with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api" \ | ||
"with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api,with_metric_api" \ | ||
-o /go/bin/sing-box \ | ||
-ldflags "-X \"github.com/sagernet/sing-box/constant.Version=$VERSION\" -s -w -buildid=" \ | ||
-ldflags "-X \"github.com/sagernet/sing-box/constant.Version=$VERSION\" -s -w -buildid= -checklinkname=0" \ | ||
./cmd/sing-box | ||
FROM --platform=$TARGETPLATFORM alpine AS dist | ||
LABEL maintainer="nekohasekai <[email protected]>" | ||
RUN set -ex \ | ||
&& apk upgrade \ | ||
&& apk add bash tzdata ca-certificates \ | ||
&& apk add bash tzdata ca-certificates nftables \ | ||
&& rm -rf /var/cache/apk/* | ||
COPY --from=builder /go/bin/sing-box /usr/local/bin/sing-box | ||
ENTRYPOINT ["sing-box"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it is a good name, suggestions are welcome.