Compare commits

..

1 Commits

Author SHA1 Message Date
M1Screw
05b4d98852 feat: sentry debug 2023-11-05 17:15:15 +08:00
264 changed files with 2946 additions and 5297 deletions

View File

@@ -44,7 +44,12 @@ body:
attributes: attributes:
label: Version label: Version
description: If you are using the original command line program, please provide the output of the `sing-box version` command. description: If you are using the original command line program, please provide the output of the `sing-box version` command.
render: shell value: |-
<details>
```console
# Replace this line with the output
```
</details>
- type: textarea - type: textarea
attributes: attributes:
label: Description label: Description
@@ -61,22 +66,12 @@ body:
attributes: attributes:
label: Logs label: Logs
description: |- description: |-
In addition, if you encounter a crash with the graphical client, please also provide crash logs. If you encounter a crash with the graphical client, please provide crash logs.
For Apple platform clients, please check `Settings - View Service Log` for crash logs. For Apple platform clients, please check `Settings - View Service Log` for crash logs.
For the Android client, please check the `/sdcard/Android/data/io.nekohasekai.sfa/files/stderr.log` file for crash logs. For the Android client, please check the `/sdcard/Android/data/io.nekohasekai.sfa/files/stderr.log` file for crash logs.
render: shell value: |-
- type: checkboxes <details>
attributes: ```console
label: Integrity requirements # Replace this line with logs
description: |- ```
Please check all of the following options to prove that you have read and understood the requirements, otherwise this issue will be closed. </details>
Sing-box is not a project aimed to please users who can't make any meaningful contributions and gain unethical influence. If you deceive here to deliberately waste the time of the developers, you will be permanently blocked.
options:
- label: I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
required: true
- label: I confirm that I have provided the server and client configuration files and process that can be reproduced locally, instead of a complicated client configuration file that has been stripped of sensitive data.
required: true
- label: I confirm that I have provided the simplest configuration that can be used to reproduce the error I reported, instead of depending on remote servers, TUN, graphical interface clients, or other closed-source software.
required: true
- label: I confirm that I have provided the complete configuration files and logs, rather than just providing parts I think are useful out of confidence in my own intelligence.
required: true

View File

@@ -44,7 +44,12 @@ body:
attributes: attributes:
label: 版本 label: 版本
description: 如果您使用原始命令行程序,请提供 `sing-box version` 命令的输出。 description: 如果您使用原始命令行程序,请提供 `sing-box version` 命令的输出。
render: shell value: |-
<details>
```console
# 使用输出内容覆盖此行
```
</details>
- type: textarea - type: textarea
attributes: attributes:
label: 描述 label: 描述
@@ -61,22 +66,12 @@ body:
attributes: attributes:
label: 日志 label: 日志
description: |- description: |-
此外,如果您遭遇图形界面应用程序崩溃,请附加提供崩溃日志。 如果您遭遇图形界面应用程序崩溃,请提供崩溃日志。
对于 Apple 平台图形客户端程序,请检查 `Settings - View Service Log` 以导出崩溃日志。 对于 Apple 平台图形客户端程序,请检查 `Settings - View Service Log` 以导出崩溃日志。
对于 Android 图形客户端程序,请检查 `/sdcard/Android/data/io.nekohasekai.sfa/files/stderr.log` 文件以导出崩溃日志。 对于 Android 图形客户端程序,请检查 `/sdcard/Android/data/io.nekohasekai.sfa/files/stderr.log` 文件以导出崩溃日志。
render: shell value: |-
- type: checkboxes <details>
attributes: ```console
label: 完整性要求 # 使用日志内容覆盖此行
description: |- ```
请勾选以下所有选项以证明您已经阅读并理解了以下要求,否则该 issue 将被关闭。 </details>
sing-box 不是讨好无法作出任何意义上的贡献的最终用户并获取非道德影响力的项目,如果您在此处欺骗以故意浪费开发者的时间,您将被永久封锁。
options:
- label: 我保证阅读了文档,了解所有我编写的配置文件项的含义,而不是大量堆砌看似有用的选项或默认值。
required: true
- label: 我保证提供了可以在本地重现该问题的服务器、客户端配置文件与流程,而不是一个脱敏的复杂客户端配置文件。
required: true
- label: 我保证提供了可用于重现我报告的错误的最简配置而不是依赖远程服务器、TUN、图形界面客户端或者其他闭源软件。
required: true
- label: 我保证提供了完整的配置文件与日志,而不是出于对自身智力的自信而仅提供了部分认为有用的部分。
required: true

View File

@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Get latest go version - name: Get latest go version
@@ -30,7 +30,7 @@ jobs:
run: | run: |
echo go_version=$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g') >> $GITHUB_OUTPUT echo go_version=$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g') >> $GITHUB_OUTPUT
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v5 uses: actions/setup-go@v4
with: with:
go-version: ${{ steps.version.outputs.go_version }} go-version: ${{ steps.version.outputs.go_version }}
- name: Add cache to Go proxy - name: Add cache to Go proxy
@@ -50,11 +50,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v5 uses: actions/setup-go@v4
with: with:
go-version: 1.18.10 go-version: 1.18.10
- name: Cache go module - name: Cache go module
@@ -70,11 +70,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v5 uses: actions/setup-go@v4
with: with:
go-version: 1.20.7 go-version: 1.20.7
- name: Cache go module - name: Cache go module
@@ -201,7 +201,7 @@ jobs:
TAGS: with_clash_api,with_quic TAGS: with_clash_api,with_quic
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Get latest go version - name: Get latest go version
@@ -209,14 +209,14 @@ jobs:
run: | run: |
echo go_version=$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g') >> $GITHUB_OUTPUT echo go_version=$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g') >> $GITHUB_OUTPUT
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v5 uses: actions/setup-go@v4
with: with:
go-version: ${{ steps.version.outputs.go_version }} go-version: ${{ steps.version.outputs.go_version }}
- name: Build - name: Build
id: build id: build
run: make run: make
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v3
with: with:
name: sing-box-${{ matrix.name }} name: sing-box-${{ matrix.name }}
path: sing-box* path: sing-box*

View File

@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- name: Setup Docker Buildx - name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Setup QEMU for Docker Buildx - name: Setup QEMU for Docker Buildx
@@ -39,8 +39,6 @@ jobs:
with: with:
platforms: linux/386,linux/amd64,linux/arm64,linux/s390x platforms: linux/386,linux/amd64,linux/arm64,linux/s390x
target: dist target: dist
build-args: |
BUILDKIT_CONTEXT_KEEP_GIT_DIR=1
tags: | tags: |
${{ steps.tag.outputs.latest }} ${{ steps.tag.outputs.latest }}
${{ steps.tag.outputs.versioned }} ${{ steps.tag.outputs.versioned }}

View File

@@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Get latest go version - name: Get latest go version
@@ -30,7 +30,7 @@ jobs:
run: | run: |
echo go_version=$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g') >> $GITHUB_OUTPUT echo go_version=$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g') >> $GITHUB_OUTPUT
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v5 uses: actions/setup-go@v4
with: with:
go-version: ${{ steps.version.outputs.go_version }} go-version: ${{ steps.version.outputs.go_version }}
- name: golangci-lint - name: golangci-lint

View File

@@ -8,7 +8,7 @@ jobs:
stale: stale:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/stale@v9 - uses: actions/stale@v8
with: with:
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days' stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days'
days-before-stale: 60 days-before-stale: 60

View File

@@ -19,12 +19,10 @@ builds:
- with_ech - with_ech
- with_utls - with_utls
- with_reality_server - with_reality_server
- with_acme
- with_clash_api - with_clash_api
env: env:
- CGO_ENABLED=0 - CGO_ENABLED=0
targets: targets:
- linux_386
- linux_amd64_v1 - linux_amd64_v1
- linux_amd64_v3 - linux_amd64_v3
- linux_arm64 - linux_arm64
@@ -57,12 +55,11 @@ builds:
- with_ech - with_ech
- with_utls - with_utls
- with_reality_server - with_reality_server
- with_acme
- with_clash_api - with_clash_api
env: env:
- CGO_ENABLED=0 - CGO_ENABLED=0
- GOROOT=/nix/store/kg6i737jjqs923jcijnm003h68c1dghj-go-1.20.11/share/go - GOROOT=/nix/store/5h8gjl89zx8qxgc572wa3k81zplv8v4z-go-1.20.10/share/go
gobinary: /nix/store/kg6i737jjqs923jcijnm003h68c1dghj-go-1.20.11/bin/go gobinary: /nix/store/5h8gjl89zx8qxgc572wa3k81zplv8v4z-go-1.20.10/bin/go
targets: targets:
- windows_amd64_v1 - windows_amd64_v1
- windows_386 - windows_386
@@ -86,8 +83,6 @@ builds:
- with_wireguard - with_wireguard
- with_ech - with_ech
- with_utls - with_utls
- with_reality_server
- with_acme
- with_clash_api - with_clash_api
env: env:
- CGO_ENABLED=1 - CGO_ENABLED=1
@@ -158,7 +153,6 @@ nfpms:
formats: formats:
- deb - deb
- rpm - rpm
- archlinux
priority: extra priority: extra
contents: contents:
- src: release/config/config.json - src: release/config/config.json

View File

@@ -1,23 +1,19 @@
FROM --platform=$BUILDPLATFORM golang:1.21-alpine AS builder FROM golang:1.21-alpine AS builder
LABEL maintainer="nekohasekai <contact-git@sekai.icu>" LABEL maintainer="nekohasekai <contact-git@sekai.icu>"
COPY . /go/src/github.com/sagernet/sing-box COPY . /go/src/github.com/sagernet/sing-box
WORKDIR /go/src/github.com/sagernet/sing-box WORKDIR /go/src/github.com/sagernet/sing-box
ARG TARGETOS TARGETARCH
ARG GOPROXY="" ARG GOPROXY=""
ENV GOPROXY ${GOPROXY} ENV GOPROXY ${GOPROXY}
ENV CGO_ENABLED=0 ENV CGO_ENABLED=0
ENV GOOS=$TARGETOS
ENV GOARCH=$TARGETARCH
RUN set -ex \ RUN set -ex \
&& apk add git build-base \ && apk add git build-base \
&& export COMMIT=$(git rev-parse --short HEAD) \ && export COMMIT=$(git rev-parse --short HEAD) \
&& export VERSION=$(go run ./cmd/internal/read_tag) \ && export VERSION=$(go run ./cmd/internal/read_tag) \
&& go build -v -trimpath -tags \ && go build -v -trimpath -tags with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_clash_api,with_acme \
"with_gvisor,with_quic,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api" \
-o /go/bin/sing-box \ -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=" \
./cmd/sing-box ./cmd/sing-box
FROM --platform=$TARGETPLATFORM alpine AS dist FROM alpine AS dist
LABEL maintainer="nekohasekai <contact-git@sekai.icu>" LABEL maintainer="nekohasekai <contact-git@sekai.icu>"
RUN set -ex \ RUN set -ex \
&& apk upgrade \ && apk upgrade \

View File

@@ -3,7 +3,7 @@ COMMIT = $(shell git rev-parse --short HEAD)
TAGS_GO118 = with_gvisor,with_dhcp,with_wireguard,with_utls,with_reality_server,with_clash_api TAGS_GO118 = with_gvisor,with_dhcp,with_wireguard,with_utls,with_reality_server,with_clash_api
TAGS_GO120 = with_quic,with_ech TAGS_GO120 = with_quic,with_ech
TAGS ?= $(TAGS_GO118),$(TAGS_GO120) TAGS ?= $(TAGS_GO118),$(TAGS_GO120)
TAGS_TEST ?= with_gvisor,with_quic,with_wireguard,with_grpc,with_ech,with_utls,with_reality_server TAGS_TEST ?= with_gvisor,with_quic,with_wireguard,with_grpc,with_ech,with_utls,with_reality_server,with_shadowsocksr
GOHOSTOS = $(shell go env GOHOSTOS) GOHOSTOS = $(shell go env GOHOSTOS)
GOHOSTARCH = $(shell go env GOHOSTARCH) GOHOSTARCH = $(shell go env GOHOSTARCH)
@@ -14,7 +14,7 @@ MAIN_PARAMS = $(PARAMS) -tags $(TAGS)
MAIN = ./cmd/sing-box MAIN = ./cmd/sing-box
PREFIX ?= $(shell go env GOPATH) PREFIX ?= $(shell go env GOPATH)
.PHONY: test release docs .PHONY: test release
build: build:
go build $(MAIN_PARAMS) $(MAIN) go build $(MAIN_PARAMS) $(MAIN)
@@ -61,7 +61,7 @@ proto_install:
release: release:
go run ./cmd/internal/build goreleaser release --clean --skip-publish || exit 1 go run ./cmd/internal/build goreleaser release --clean --skip-publish || exit 1
mkdir dist/release mkdir dist/release
mv dist/*.tar.gz dist/*.zip dist/*.deb dist/*.rpm dist/*.pkg.tar.zst dist/release mv dist/*.tar.gz dist/*.zip dist/*.deb dist/*.rpm dist/release
ghr --replace --draft --prerelease -p 3 "v${VERSION}" dist/release ghr --replace --draft --prerelease -p 3 "v${VERSION}" dist/release
rm -r dist/release rm -r dist/release
@@ -73,21 +73,18 @@ update_android_version:
go run ./cmd/internal/update_android_version go run ./cmd/internal/update_android_version
build_android: build_android:
cd ../sing-box-for-android && ./gradlew :app:assemblePlayRelease && ./gradlew --stop cd ../sing-box-for-android && ./gradlew :app:assembleRelease && ./gradlew --stop
upload_android: upload_android:
mkdir -p dist/release_android mkdir -p dist/release_android
cp ../sing-box-for-android/app/build/outputs/apk/play/release/*.apk dist/release_android cp ../sing-box-for-android/app/build/outputs/apk/release/*.apk dist/release_android
ghr --replace --draft --prerelease -p 3 "v${VERSION}" dist/release_android ghr --replace --draft --prerelease -p 3 "v${VERSION}" dist/release_android
rm -rf dist/release_android rm -rf dist/release_android
release_android: lib_android update_android_version build_android upload_android release_android: lib_android update_android_version build_android upload_android
publish_android: publish_android:
cd ../sing-box-for-android && ./gradlew :app:publishPlayReleaseBundle cd ../sing-box-for-android && ./gradlew :app:appCenterAssembleAndUploadRelease
publish_android_appcenter:
cd ../sing-box-for-android && ./gradlew :app:appCenterAssembleAndUploadPlayRelease
build_ios: build_ios:
cd ../sing-box-for-apple && \ cd ../sing-box-for-apple && \
@@ -152,8 +149,10 @@ update_apple_version:
go run ./cmd/internal/update_apple_version go run ./cmd/internal/update_apple_version
release_apple: lib_ios update_apple_version release_ios release_macos release_tvos release_macos_independent release_apple: lib_ios update_apple_version release_ios release_macos release_tvos release_macos_independent
rm -rf dist
release_apple_beta: update_apple_version release_ios release_macos release_tvos release_apple_beta: update_apple_version release_ios release_macos release_tvos
rm -rf dist
test: test:
@go test -v ./... && \ @go test -v ./... && \
@@ -182,14 +181,6 @@ lib_install:
go install -v github.com/sagernet/gomobile/cmd/gomobile@v0.0.0-20230915142329-c6740b6d2950 go install -v github.com/sagernet/gomobile/cmd/gomobile@v0.0.0-20230915142329-c6740b6d2950
go install -v github.com/sagernet/gomobile/cmd/gobind@v0.0.0-20230915142329-c6740b6d2950 go install -v github.com/sagernet/gomobile/cmd/gobind@v0.0.0-20230915142329-c6740b6d2950
docs:
mkdocs serve
publish_docs:
mkdocs gh-deploy -m "Update" --force --ignore-version --no-history
docs_install:
pip install --force-reinstall mkdocs-material=="9.*" mkdocs-static-i18n=="1.2.*"
clean: clean:
rm -rf bin dist sing-box rm -rf bin dist sing-box
rm -f $(shell go env GOPATH)/sing-box rm -f $(shell go env GOPATH)/sing-box

View File

@@ -1,104 +0,0 @@
package adapter
import (
"context"
"net"
"github.com/sagernet/sing/common/logger"
M "github.com/sagernet/sing/common/metadata"
N "github.com/sagernet/sing/common/network"
)
type ConnectionRouter interface {
RouteConnection(ctx context.Context, conn net.Conn, metadata InboundContext) error
RoutePacketConnection(ctx context.Context, conn N.PacketConn, metadata InboundContext) error
}
func NewRouteHandler(
metadata InboundContext,
router ConnectionRouter,
logger logger.ContextLogger,
) UpstreamHandlerAdapter {
return &routeHandlerWrapper{
metadata: metadata,
router: router,
logger: logger,
}
}
func NewRouteContextHandler(
router ConnectionRouter,
logger logger.ContextLogger,
) UpstreamHandlerAdapter {
return &routeContextHandlerWrapper{
router: router,
logger: logger,
}
}
var _ UpstreamHandlerAdapter = (*routeHandlerWrapper)(nil)
type routeHandlerWrapper struct {
metadata InboundContext
router ConnectionRouter
logger logger.ContextLogger
}
func (w *routeHandlerWrapper) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error {
myMetadata := w.metadata
if metadata.Source.IsValid() {
myMetadata.Source = metadata.Source
}
if metadata.Destination.IsValid() {
myMetadata.Destination = metadata.Destination
}
return w.router.RouteConnection(ctx, conn, myMetadata)
}
func (w *routeHandlerWrapper) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata M.Metadata) error {
myMetadata := w.metadata
if metadata.Source.IsValid() {
myMetadata.Source = metadata.Source
}
if metadata.Destination.IsValid() {
myMetadata.Destination = metadata.Destination
}
return w.router.RoutePacketConnection(ctx, conn, myMetadata)
}
func (w *routeHandlerWrapper) NewError(ctx context.Context, err error) {
w.logger.ErrorContext(ctx, err)
}
var _ UpstreamHandlerAdapter = (*routeContextHandlerWrapper)(nil)
type routeContextHandlerWrapper struct {
router ConnectionRouter
logger logger.ContextLogger
}
func (w *routeContextHandlerWrapper) NewConnection(ctx context.Context, conn net.Conn, metadata M.Metadata) error {
myMetadata := ContextFrom(ctx)
if metadata.Source.IsValid() {
myMetadata.Source = metadata.Source
}
if metadata.Destination.IsValid() {
myMetadata.Destination = metadata.Destination
}
return w.router.RouteConnection(ctx, conn, *myMetadata)
}
func (w *routeContextHandlerWrapper) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata M.Metadata) error {
myMetadata := ContextFrom(ctx)
if metadata.Source.IsValid() {
myMetadata.Source = metadata.Source
}
if metadata.Destination.IsValid() {
myMetadata.Destination = metadata.Destination
}
return w.router.RoutePacketConnection(ctx, conn, *myMetadata)
}
func (w *routeContextHandlerWrapper) NewError(ctx context.Context, err error) {
w.logger.ErrorContext(ctx, err)
}

View File

@@ -43,7 +43,7 @@ type OutboundGroup interface {
type URLTestGroup interface { type URLTestGroup interface {
OutboundGroup OutboundGroup
URLTest(ctx context.Context) (map[string]uint16, error) URLTest(ctx context.Context, url string) (map[string]uint16, error)
} }
func OutboundTag(detour Outbound) string { func OutboundTag(detour Outbound) string {

View File

@@ -2,12 +2,14 @@ package adapter
import ( import (
"context" "context"
"net"
"net/netip" "net/netip"
"github.com/sagernet/sing-box/common/geoip" "github.com/sagernet/sing-box/common/geoip"
"github.com/sagernet/sing-dns" "github.com/sagernet/sing-dns"
"github.com/sagernet/sing-tun" "github.com/sagernet/sing-tun"
"github.com/sagernet/sing/common/control" "github.com/sagernet/sing/common/control"
N "github.com/sagernet/sing/common/network"
"github.com/sagernet/sing/service" "github.com/sagernet/sing/service"
mdns "github.com/miekg/dns" mdns "github.com/miekg/dns"
@@ -15,7 +17,6 @@ import (
type Router interface { type Router interface {
Service Service
PostStarter
Outbounds() []Outbound Outbounds() []Outbound
Outbound(tag string) (Outbound, bool) Outbound(tag string) (Outbound, bool)
@@ -23,7 +24,8 @@ type Router interface {
FakeIPStore() FakeIPStore FakeIPStore() FakeIPStore
ConnectionRouter RouteConnection(ctx context.Context, conn net.Conn, metadata InboundContext) error
RoutePacketConnection(ctx context.Context, conn N.PacketConn, metadata InboundContext) error
GeoIPReader() *geoip.Reader GeoIPReader() *geoip.Reader
LoadGeosite(code string) (Rule, error) LoadGeosite(code string) (Rule, error)
@@ -42,7 +44,6 @@ type Router interface {
NetworkMonitor() tun.NetworkUpdateMonitor NetworkMonitor() tun.NetworkUpdateMonitor
InterfaceMonitor() tun.DefaultInterfaceMonitor InterfaceMonitor() tun.DefaultInterfaceMonitor
PackageManager() tun.PackageManager PackageManager() tun.PackageManager
WIFIState() WIFIState
Rules() []Rule Rules() []Rule
ClashServer() ClashServer ClashServer() ClashServer
@@ -80,8 +81,3 @@ type DNSRule interface {
type InterfaceUpdateListener interface { type InterfaceUpdateListener interface {
InterfaceUpdated() InterfaceUpdated()
} }
type WIFIState struct {
SSID string
BSSID string
}

20
box.go
View File

@@ -41,7 +41,6 @@ type Options struct {
option.Options option.Options
Context context.Context Context context.Context
PlatformInterface platform.Interface PlatformInterface platform.Interface
PlatformLogWriter log.PlatformWriter
} }
func New(options Options) (*Box, error) { func New(options Options) (*Box, error) {
@@ -56,7 +55,7 @@ func New(options Options) (*Box, error) {
applyDebugOptions(common.PtrValueOrDefault(experimentalOptions.Debug)) applyDebugOptions(common.PtrValueOrDefault(experimentalOptions.Debug))
var needClashAPI bool var needClashAPI bool
var needV2RayAPI bool var needV2RayAPI bool
if experimentalOptions.ClashAPI != nil || options.PlatformLogWriter != nil { if experimentalOptions.ClashAPI != nil || options.PlatformInterface != nil {
needClashAPI = true needClashAPI = true
} }
if experimentalOptions.V2RayAPI != nil && experimentalOptions.V2RayAPI.Listen != "" { if experimentalOptions.V2RayAPI != nil && experimentalOptions.V2RayAPI.Listen != "" {
@@ -72,7 +71,7 @@ func New(options Options) (*Box, error) {
Observable: needClashAPI, Observable: needClashAPI,
DefaultWriter: defaultLogWriter, DefaultWriter: defaultLogWriter,
BaseTime: createdAt, BaseTime: createdAt,
PlatformWriter: options.PlatformLogWriter, PlatformWriter: options.PlatformInterface,
}) })
if err != nil { if err != nil {
return nil, E.Cause(err, "create log factory") return nil, E.Cause(err, "create log factory")
@@ -258,7 +257,7 @@ func (s *Box) start() error {
return E.Cause(err, "initialize inbound/", in.Type(), "[", tag, "]") return E.Cause(err, "initialize inbound/", in.Type(), "[", tag, "]")
} }
} }
return s.postStart() return nil
} }
func (s *Box) postStart() error { func (s *Box) postStart() error {
@@ -269,17 +268,16 @@ func (s *Box) postStart() error {
return E.Cause(err, "start ", serviceName) return E.Cause(err, "start ", serviceName)
} }
} }
for _, outbound := range s.outbounds { for serviceName, service := range s.outbounds {
if lateOutbound, isLateOutbound := outbound.(adapter.PostStarter); isLateOutbound { if lateService, isLateService := service.(adapter.PostStarter); isLateService {
s.logger.Trace("post-starting outbound/", outbound.Tag()) s.logger.Trace("post-starting ", service)
err := lateOutbound.PostStart() err := lateService.PostStart()
if err != nil { if err != nil {
return E.Cause(err, "post-start outbound/", outbound.Tag()) return E.Cause(err, "post-start ", serviceName)
} }
} }
} }
s.logger.Trace("post-starting router") return nil
return s.router.PostStart()
} }
func (s *Box) Close() error { func (s *Box) Close() error {

View File

@@ -12,7 +12,7 @@ import (
func main() { func main() {
build_shared.FindSDK() build_shared.FindSDK()
if os.Getenv("GOPATH") == "" { if os.Getenv("build.Default.GOPATH") == "" {
os.Setenv("GOPATH", build.Default.GOPATH) os.Setenv("GOPATH", build.Default.GOPATH)
} }

View File

@@ -17,6 +17,9 @@ func ReadTag() (string, error) {
} }
shortCommit, _ := shell.Exec("git", "rev-parse", "--short", "HEAD").ReadOutput() shortCommit, _ := shell.Exec("git", "rev-parse", "--short", "HEAD").ReadOutput()
version := badversion.Parse(currentTagRev[1:]) version := badversion.Parse(currentTagRev[1:])
if version.PreReleaseIdentifier == "" {
version.Patch++
}
return version.String() + "-" + shortCommit, nil return version.String() + "-" + shortCommit, nil
} }

View File

@@ -1,6 +1,7 @@
package main package main
import ( import (
"github.com/getsentry/sentry-go"
"os" "os"
"time" "time"
@@ -15,6 +16,7 @@ var (
configDirectories []string configDirectories []string
workingDir string workingDir string
disableColor bool disableColor bool
enableDebug bool
) )
var mainCommand = &cobra.Command{ var mainCommand = &cobra.Command{
@@ -27,12 +29,25 @@ func init() {
mainCommand.PersistentFlags().StringArrayVarP(&configDirectories, "config-directory", "C", nil, "set configuration directory path") mainCommand.PersistentFlags().StringArrayVarP(&configDirectories, "config-directory", "C", nil, "set configuration directory path")
mainCommand.PersistentFlags().StringVarP(&workingDir, "directory", "D", "", "set working directory") mainCommand.PersistentFlags().StringVarP(&workingDir, "directory", "D", "", "set working directory")
mainCommand.PersistentFlags().BoolVarP(&disableColor, "disable-color", "", false, "disable color output") mainCommand.PersistentFlags().BoolVarP(&disableColor, "disable-color", "", false, "disable color output")
mainCommand.PersistentFlags().BoolVarP(&enableDebug, "debug", "", false, "enable sentry debug mode")
} }
func main() { func main() {
if err := mainCommand.Execute(); err != nil { if err := mainCommand.Execute(); err != nil {
log.Fatal(err) log.Fatal(err)
} }
if enableDebug {
err := sentry.Init(sentry.ClientOptions{
Dsn: "",
})
if err != nil {
log.Fatal("sentry.Init: %s", err)
}
defer sentry.Flush(2 * time.Second)
}
} }
func preRun(cmd *cobra.Command, args []string) { func preRun(cmd *cobra.Command, args []string) {

View File

@@ -1,42 +1,21 @@
package mux package mux
import ( import (
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/option" "github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-mux" "github.com/sagernet/sing-mux"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/logger"
N "github.com/sagernet/sing/common/network" N "github.com/sagernet/sing/common/network"
) )
type Client = mux.Client func NewClientWithOptions(dialer N.Dialer, options option.MultiplexOptions) (*Client, error) {
func NewClientWithOptions(dialer N.Dialer, logger logger.Logger, options option.OutboundMultiplexOptions) (*Client, error) {
if !options.Enabled { if !options.Enabled {
return nil, nil return nil, nil
} }
var brutalOptions mux.BrutalOptions
if options.Brutal != nil && options.Brutal.Enabled {
brutalOptions = mux.BrutalOptions{
Enabled: true,
SendBPS: uint64(options.Brutal.UpMbps * C.MbpsToBps),
ReceiveBPS: uint64(options.Brutal.DownMbps * C.MbpsToBps),
}
if brutalOptions.SendBPS < mux.BrutalMinSpeedBPS {
return nil, E.New("brutal: invalid upload speed")
}
if brutalOptions.ReceiveBPS < mux.BrutalMinSpeedBPS {
return nil, E.New("brutal: invalid download speed")
}
}
return mux.NewClient(mux.Options{ return mux.NewClient(mux.Options{
Dialer: dialer, Dialer: dialer,
Logger: logger,
Protocol: options.Protocol, Protocol: options.Protocol,
MaxConnections: options.MaxConnections, MaxConnections: options.MaxConnections,
MinStreams: options.MinStreams, MinStreams: options.MinStreams,
MaxStreams: options.MaxStreams, MaxStreams: options.MaxStreams,
Padding: options.Padding, Padding: options.Padding,
Brutal: brutalOptions,
}) })
} }

14
common/mux/protocol.go Normal file
View File

@@ -0,0 +1,14 @@
package mux
import (
"github.com/sagernet/sing-mux"
)
type (
Client = mux.Client
)
var (
Destination = mux.Destination
HandleConnection = mux.HandleConnection
)

View File

@@ -1,65 +0,0 @@
package mux
import (
"context"
"net"
"github.com/sagernet/sing-box/adapter"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-mux"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/logger"
N "github.com/sagernet/sing/common/network"
)
type Router struct {
router adapter.ConnectionRouter
service *mux.Service
}
func NewRouterWithOptions(router adapter.ConnectionRouter, logger logger.ContextLogger, options option.InboundMultiplexOptions) (adapter.ConnectionRouter, error) {
if !options.Enabled {
return router, nil
}
var brutalOptions mux.BrutalOptions
if options.Brutal != nil && options.Brutal.Enabled {
brutalOptions = mux.BrutalOptions{
Enabled: true,
SendBPS: uint64(options.Brutal.UpMbps * C.MbpsToBps),
ReceiveBPS: uint64(options.Brutal.DownMbps * C.MbpsToBps),
}
if brutalOptions.SendBPS < mux.BrutalMinSpeedBPS {
return nil, E.New("brutal: invalid upload speed")
}
if brutalOptions.ReceiveBPS < mux.BrutalMinSpeedBPS {
return nil, E.New("brutal: invalid download speed")
}
}
service, err := mux.NewService(mux.ServiceOptions{
NewStreamContext: func(ctx context.Context, conn net.Conn) context.Context {
return log.ContextWithNewID(ctx)
},
Logger: logger,
Handler: adapter.NewRouteContextHandler(router, logger),
Padding: options.Padding,
Brutal: brutalOptions,
})
if err != nil {
return nil, err
}
return &Router{router, service}, nil
}
func (r *Router) RouteConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error {
if metadata.Destination == mux.Destination {
return r.service.NewConnection(adapter.WithContext(ctx, &metadata), conn, adapter.UpstreamMetadata(metadata))
} else {
return r.router.RouteConnection(ctx, conn, metadata)
}
}
func (r *Router) RoutePacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error {
return r.router.RoutePacketConnection(ctx, conn, metadata)
}

View File

@@ -1,32 +0,0 @@
package mux
import (
"context"
"net"
"github.com/sagernet/sing-box/adapter"
vmess "github.com/sagernet/sing-vmess"
"github.com/sagernet/sing/common/logger"
N "github.com/sagernet/sing/common/network"
)
type V2RayLegacyRouter struct {
router adapter.ConnectionRouter
logger logger.ContextLogger
}
func NewV2RayLegacyRouter(router adapter.ConnectionRouter, logger logger.ContextLogger) adapter.ConnectionRouter {
return &V2RayLegacyRouter{router, logger}
}
func (r *V2RayLegacyRouter) RouteConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error {
if metadata.Destination.Fqdn == vmess.MuxDestination.Fqdn {
r.logger.InfoContext(ctx, "inbound legacy multiplex connection")
return vmess.HandleMuxConnection(ctx, conn, adapter.NewRouteHandler(metadata, r.router, r.logger))
}
return r.router.RouteConnection(ctx, conn, metadata)
}
func (r *V2RayLegacyRouter) RoutePacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error {
return r.router.RoutePacketConnection(ctx, conn, metadata)
}

View File

@@ -182,52 +182,11 @@ func QUICClientHello(ctx context.Context, packet []byte) (*adapter.InboundContex
break break
} }
switch frameType { switch frameType {
case 0x00: // PADDING case 0x0:
continue continue
case 0x01: // PING case 0x1:
continue continue
case 0x02, 0x03: // ACK case 0x6:
_, err = qtls.ReadUvarint(decryptedReader) // Largest Acknowledged
if err != nil {
return nil, err
}
_, err = qtls.ReadUvarint(decryptedReader) // ACK Delay
if err != nil {
return nil, err
}
ackRangeCount, err := qtls.ReadUvarint(decryptedReader) // ACK Range Count
if err != nil {
return nil, err
}
_, err = qtls.ReadUvarint(decryptedReader) // First ACK Range
if err != nil {
return nil, err
}
for i := 0; i < int(ackRangeCount); i++ {
_, err = qtls.ReadUvarint(decryptedReader) // Gap
if err != nil {
return nil, err
}
_, err = qtls.ReadUvarint(decryptedReader) // ACK Range Length
if err != nil {
return nil, err
}
}
if frameType == 0x03 {
_, err = qtls.ReadUvarint(decryptedReader) // ECT0 Count
if err != nil {
return nil, err
}
_, err = qtls.ReadUvarint(decryptedReader) // ECT1 Count
if err != nil {
return nil, err
}
_, err = qtls.ReadUvarint(decryptedReader) // ECN-CE Count
if err != nil {
return nil, err
}
}
case 0x06: // CRYPTO
var offset uint64 var offset uint64
offset, err = qtls.ReadUvarint(decryptedReader) offset, err = qtls.ReadUvarint(decryptedReader)
if err != nil { if err != nil {
@@ -249,26 +208,8 @@ func QUICClientHello(ctx context.Context, packet []byte) (*adapter.InboundContex
if err != nil { if err != nil {
return nil, err return nil, err
} }
case 0x1c: // CONNECTION_CLOSE
_, err = qtls.ReadUvarint(decryptedReader) // Error Code
if err != nil {
return nil, err
}
_, err = qtls.ReadUvarint(decryptedReader) // Frame Type
if err != nil {
return nil, err
}
var length uint64
length, err = qtls.ReadUvarint(decryptedReader) // Reason Phrase Length
if err != nil {
return nil, err
}
_, err = decryptedReader.Seek(int64(length), io.SeekCurrent) // Reason Phrase
if err != nil {
return nil, err
}
default: default:
return nil, os.ErrInvalid // ignore unknown frame type
} }
} }
tlsHdr := make([]byte, 5) tlsHdr := make([]byte, 5)

View File

@@ -105,16 +105,5 @@ func startACME(ctx context.Context, options option.InboundACMEOptions) (*tls.Con
}, },
}) })
config = certmagic.New(cache, *config) config = certmagic.New(cache, *config)
var tlsConfig *tls.Config return config.TLSConfig(), &acmeWrapper{ctx: ctx, cfg: config, cache: cache, domain: options.Domain}, nil
if acmeConfig.DisableTLSALPNChallenge || acmeConfig.DNS01Solver != nil {
tlsConfig = &tls.Config{
GetCertificate: config.GetCertificate,
}
} else {
tlsConfig = &tls.Config{
GetCertificate: config.GetCertificate,
NextProtos: []string{ACMETLS1Protocol},
}
}
return tlsConfig, &acmeWrapper{ctx: ctx, cfg: config, cache: cache, domain: options.Domain}, nil
} }

View File

@@ -1,3 +0,0 @@
package tls
const ACMETLS1Protocol = "acme-tls/1"

View File

@@ -39,19 +39,11 @@ func (c *STDServerConfig) SetServerName(serverName string) {
} }
func (c *STDServerConfig) NextProtos() []string { func (c *STDServerConfig) NextProtos() []string {
if c.acmeService != nil && len(c.config.NextProtos) > 1 && c.config.NextProtos[0] == ACMETLS1Protocol {
return c.config.NextProtos[1:]
} else {
return c.config.NextProtos return c.config.NextProtos
}
} }
func (c *STDServerConfig) SetNextProtos(nextProto []string) { func (c *STDServerConfig) SetNextProtos(nextProto []string) {
if c.acmeService != nil && len(c.config.NextProtos) > 1 && c.config.NextProtos[0] == ACMETLS1Protocol {
c.config.NextProtos = append(c.config.NextProtos[:1], nextProto...)
} else {
c.config.NextProtos = nextProto c.config.NextProtos = nextProto
}
} }
func (c *STDServerConfig) Config() (*STDConfig, error) { func (c *STDServerConfig) Config() (*STDConfig, error) {

View File

@@ -1,53 +0,0 @@
package uot
import (
"context"
"net"
"net/netip"
"github.com/sagernet/sing-box/adapter"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/logger"
M "github.com/sagernet/sing/common/metadata"
N "github.com/sagernet/sing/common/network"
"github.com/sagernet/sing/common/uot"
)
var _ adapter.ConnectionRouter = (*Router)(nil)
type Router struct {
router adapter.ConnectionRouter
logger logger.ContextLogger
}
func NewRouter(router adapter.ConnectionRouter, logger logger.ContextLogger) *Router {
return &Router{router, logger}
}
func (r *Router) RouteConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error {
switch metadata.Destination.Fqdn {
case uot.MagicAddress:
request, err := uot.ReadRequest(conn)
if err != nil {
return E.Cause(err, "read UoT request")
}
if request.IsConnect {
r.logger.InfoContext(ctx, "inbound UoT connect connection to ", request.Destination)
} else {
r.logger.InfoContext(ctx, "inbound UoT connection to ", request.Destination)
}
metadata.Domain = metadata.Destination.Fqdn
metadata.Destination = request.Destination
return r.router.RoutePacketConnection(ctx, uot.NewConn(conn, *request), metadata)
case uot.LegacyMagicAddress:
r.logger.InfoContext(ctx, "inbound legacy UoT connection")
metadata.Domain = metadata.Destination.Fqdn
metadata.Destination = M.Socksaddr{Addr: netip.IPv4Unspecified()}
return r.RoutePacketConnection(ctx, uot.NewConn(conn, uot.Request{}), metadata)
}
return r.router.RouteConnection(ctx, conn, metadata)
}
func (r *Router) RoutePacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error {
return r.router.RoutePacketConnection(ctx, conn, metadata)
}

View File

@@ -1,3 +0,0 @@
package constant
const MbpsToBps = 125000

View File

@@ -5,5 +5,4 @@ const (
V2RayTransportTypeWebsocket = "ws" V2RayTransportTypeWebsocket = "ws"
V2RayTransportTypeQUIC = "quic" V2RayTransportTypeQUIC = "quic"
V2RayTransportTypeGRPC = "grpc" V2RayTransportTypeGRPC = "grpc"
V2RayTransportTypeHTTPUpgrade = "httpupgrade"
) )

View File

@@ -5,7 +5,6 @@ import (
"net/http/pprof" "net/http/pprof"
"runtime" "runtime"
"runtime/debug" "runtime/debug"
"strings"
"github.com/sagernet/sing-box/common/badjson" "github.com/sagernet/sing-box/common/badjson"
"github.com/sagernet/sing-box/common/humanize" "github.com/sagernet/sing-box/common/humanize"
@@ -48,20 +47,12 @@ func applyDebugListenOption(options option.DebugOptions) {
encoder.SetIndent("", " ") encoder.SetIndent("", " ")
encoder.Encode(memObject) encoder.Encode(memObject)
}) })
r.Route("/pprof", func(r chi.Router) { r.HandleFunc("/pprof", pprof.Index)
r.HandleFunc("/", func(writer http.ResponseWriter, request *http.Request) { r.HandleFunc("/pprof/*", pprof.Index)
if !strings.HasSuffix(request.URL.Path, "/") { r.HandleFunc("/pprof/cmdline", pprof.Cmdline)
http.Redirect(writer, request, request.URL.Path+"/", http.StatusMovedPermanently) r.HandleFunc("/pprof/profile", pprof.Profile)
} else { r.HandleFunc("/pprof/symbol", pprof.Symbol)
pprof.Index(writer, request) r.HandleFunc("/pprof/trace", pprof.Trace)
}
})
r.HandleFunc("/*", pprof.Index)
r.HandleFunc("/cmdline", pprof.Cmdline)
r.HandleFunc("/profile", pprof.Profile)
r.HandleFunc("/symbol", pprof.Symbol)
r.HandleFunc("/trace", pprof.Trace)
})
}) })
debugHTTPServer = &http.Server{ debugHTTPServer = &http.Server{
Addr: options.Listen, Addr: options.Listen,

View File

@@ -1,5 +1,3 @@
//go:build linux || darwin
package box package box
import ( import (

View File

@@ -1,4 +1,4 @@
//go:build !(linux || darwin) //go:build !linux
package box package box

View File

@@ -1,213 +1,16 @@
---
icon: material/alert-decagram
---
# ChangeLog
#### 1.7.7
* Fix V2Ray transport `path` validation behavior **1**
* Fixes and improvements
**1**:
See [V2Ray transport](/configuration/shared/v2ray-transport/).
#### 1.7.6
* Fixes and improvements
#### 1.7.5
* Fixes and improvements
#### 1.7.4
* Fixes and improvements
_Due to the long waiting time, this version is no longer waiting for approval
by the Apple App Store, so updates to Apple Platforms will be delayed._
#### 1.7.2
* Fixes and improvements
#### 1.7.1
* Fixes and improvements
#### 1.7.0
* Fixes and improvements
Important changes since 1.6:
* Add [exclude route support](/configuration/inbound/tun/) for TUN inbound
* Add `udp_disable_domain_unmapping` [inbound listen option](/configuration/shared/listen/) **1**
* Add [HTTPUpgrade V2Ray transport](/configuration/shared/v2ray-transport#HTTPUpgrade) support **2**
* Migrate multiplex and UoT server to inbound **3**
* Add TCP Brutal support for multiplex **4**
* Add `wifi_ssid` and `wifi_bssid` route and DNS rules **5**
* Update quic-go to v0.40.0
* Update gVisor to 20231113.0
**1**:
If enabled, for UDP proxy requests addressed to a domain,
the original packet address will be sent in the response instead of the mapped domain.
This option is used for compatibility with clients that
do not support receiving UDP packets with domain addresses, such as Surge.
**2**:
Introduced in V2Ray 5.10.0.
The new HTTPUpgrade transport has better performance than WebSocket and is better suited for CDN abuse.
**3**:
Starting in 1.7.0, multiplexing support is no longer enabled by default
and needs to be turned on explicitly in inbound options.
**4**
Hysteria Brutal Congestion Control Algorithm in TCP. A kernel module needs to be installed on the Linux server,
see [TCP Brutal](/configuration/shared/tcp-brutal/) for details.
**5**:
Only supported in graphical clients on Android and iOS.
#### 1.7.0-rc.3
* Fixes and improvements
#### 1.6.7
* macOS: Add button for uninstall SystemExtension in the standalone graphical client
* Fix missing UDP user context on TUIC/Hysteria2 inbounds
* Fixes and improvements
#### 1.7.0-rc.2
* Fix missing UDP user context on TUIC/Hysteria2 inbounds
* macOS: Add button for uninstall SystemExtension in the standalone graphical client
#### 1.6.6
* Fixes and improvements
#### 1.7.0-rc.1
* Fixes and improvements
#### 1.7.0-beta.5
* Update gVisor to 20231113.0
* Fixes and improvements
#### 1.7.0-beta.4
* Add `wifi_ssid` and `wifi_bssid` route and DNS rules **1**
* Fixes and improvements
**1**:
Only supported in graphical clients on Android and iOS.
#### 1.7.0-beta.3
* Fix zero TTL was incorrectly reset
* Fixes and improvements
#### 1.6.5
* Fix crash if TUIC inbound authentication failed
* Fixes and improvements
#### 1.7.0-beta.2
* Fix crash if TUIC inbound authentication failed
* Update quic-go to v0.40.0
* Fixes and improvements
#### 1.6.4
* Fixes and improvements
#### 1.7.0-beta.1
* Fixes and improvements
#### 1.6.3
* iOS/Android: Fix profile auto update
* Fixes and improvements
#### 1.7.0-alpha.11
* iOS/Android: Fix profile auto update
* Fixes and improvements
#### 1.7.0-alpha.10
* Fix tcp-brutal not working with TLS
* Fix Android client not closing in some cases
* Fixes and improvements
#### 1.6.2
* Fixes and improvements
#### 1.6.1
* Our [Android client](/installation/clients/sfa/) is now available in the Google Play Store ▶️
* Fixes and improvements
#### 1.7.0-alpha.6
* Fixes and improvements
#### 1.7.0-alpha.4
* Migrate multiplex and UoT server to inbound **1**
* Add TCP Brutal support for multiplex **2**
**1**:
Starting in 1.7.0, multiplexing support is no longer enabled by default and needs to be turned on explicitly in inbound
options.
**2**
Hysteria Brutal Congestion Control Algorithm in TCP. A kernel module needs to be installed on the Linux server,
see [TCP Brutal](/configuration/shared/tcp-brutal/) for details.
#### 1.7.0-alpha.3
* Add [HTTPUpgrade V2Ray transport](/configuration/shared/v2ray-transport#HTTPUpgrade) support **1**
* Fixes and improvements
**1**:
Introduced in V2Ray 5.10.0.
The new HTTPUpgrade transport has better performance than WebSocket and is better suited for CDN abuse.
#### 1.6.0 #### 1.6.0
* Fixes and improvements * Fixes and improvements
Important changes since 1.5: Important changes since 1.5:
* Our [Apple tvOS client](/installation/clients/sft/) is now available in the App Store 🍎 * Our [Apple tvOS client](/installation/clients/sft) is now available in the App Store 🍎
* Update BBR congestion control for TUIC and Hysteria2 **1** * Update BBR congestion control for TUIC and Hysteria2 **1**
* Update brutal congestion control for Hysteria2 * Update brutal congestion control for Hysteria2
* Add `brutal_debug` option for Hysteria2 * Add `brutal_debug` option for Hysteria2
* Update legacy Hysteria protocol **2** * Update legacy Hysteria protocol **2**
* Add TLS self sign key pair generate command * Add TLS self sign key pair generate command
* Remove [Deprecated Features](/deprecated/) by agreement * Remove [Deprecated Features](/deprecated) by agreement
**1**: **1**:
@@ -219,23 +22,6 @@ This update is intended to address the multi-send defects of the old implementat
Based on discussions with the original author, the brutal CC and QUIC protocol parameters of Based on discussions with the original author, the brutal CC and QUIC protocol parameters of
the old protocol (Hysteria 1) have been updated to be consistent with Hysteria 2 the old protocol (Hysteria 1) have been updated to be consistent with Hysteria 2
#### 1.7.0-alpha.2
* Fix bugs introduced in 1.7.0-alpha.1
#### 1.7.0-alpha.1
* Add [exclude route support](/configuration/inbound/tun/) for TUN inbound
* Add `udp_disable_domain_unmapping` [inbound listen option](/configuration/shared/listen/) **1**
* Fixes and improvements
**1**:
If enabled, for UDP proxy requests addressed to a domain,
the original packet address will be sent in the response instead of the mapped domain.
This option is used for compatibility with clients that
do not support receiving UDP packets with domain addresses, such as Surge.
#### 1.5.5 #### 1.5.5
@@ -249,8 +35,8 @@ When `auto_route` is enabled and `strict_route` is disabled, the device can now
**2**: **2**:
Built using Go 1.20, the last version that will run on Built using Go 1.20, the last version that will run on Windows 7, 8, Server 2008, Server 2012 and macOS 10.13 High Sierra, 10.14 Mojave.
Windows 7, 8, Server 2008, Server 2012 and macOS 10.13 High Sierra, 10.14 Mojave.
#### 1.6.0-rc.4 #### 1.6.0-rc.4
@@ -263,8 +49,7 @@ Windows 7, 8, Server 2008, Server 2012 and macOS 10.13 High Sierra, 10.14 Mojave
**1**: **1**:
Built using Go 1.20, the last version that will run on Built using Go 1.20, the last version that will run on Windows 7, 8, Server 2008, Server 2012 and macOS 10.13 High Sierra, 10.14 Mojave.
Windows 7, 8, Server 2008, Server 2012 and macOS 10.13 High Sierra, 10.14 Mojave.
#### 1.6.0-beta.4 #### 1.6.0-beta.4
@@ -298,24 +83,6 @@ the old protocol (Hysteria 1) have been updated to be consistent with Hysteria 2
* Update golang.org/x/net to v0.17.0 * Update golang.org/x/net to v0.17.0
* Fixes and improvements * Fixes and improvements
#### 1.6.0-beta.3
* Update the legacy Hysteria protocol **1**
* Fixes and improvements
**1**
Based on discussions with the original author, the brutal CC and QUIC protocol parameters of
the old protocol (Hysteria 1) have been updated to be consistent with Hysteria 2
#### 1.6.0-beta.2
* Add TLS self sign key pair generate command
* Update brutal congestion control for Hysteria2
* Fix Clash cache crash on arm32 devices
* Update golang.org/x/net to v0.17.0
* Fixes and improvements
#### 1.5.3 #### 1.5.3
* Fix compatibility with Android 14 * Fix compatibility with Android 14
@@ -344,7 +111,7 @@ introduce new issues.
#### 1.5.2 #### 1.5.2
* Our [Apple tvOS client](/installation/clients/sft/) is now available in the App Store 🍎 * Our [Apple tvOS client](/installation/clients/sft) is now available in the App Store 🍎
* Fixes and improvements * Fixes and improvements
#### 1.6.0-alpha.3 #### 1.6.0-alpha.3
@@ -364,7 +131,7 @@ introduce new issues.
* Update BBR congestion control for TUIC and Hysteria2 **1** * Update BBR congestion control for TUIC and Hysteria2 **1**
* Update quic-go to v0.39.0 * Update quic-go to v0.39.0
* Update gVisor to 20230814.0 * Update gVisor to 20230814.0
* Remove [Deprecated Features](/deprecated/) by agreement * Remove [Deprecated Features](/deprecated) by agreement
* Fixes and improvements * Fixes and improvements
**1**: **1**:
@@ -378,7 +145,7 @@ This update is intended to address the multi-send defects of the old implementat
Important changes since 1.4: Important changes since 1.4:
* Add TLS [ECH server](/configuration/shared/tls/) support * Add TLS [ECH server](/configuration/shared/tls) support
* Improve TLS TCH client configuration * Improve TLS TCH client configuration
* Add TLS ECH key pair generator **1** * Add TLS ECH key pair generator **1**
* Add TLS ECH support for QUIC based protocols **2** * Add TLS ECH support for QUIC based protocols **2**
@@ -387,7 +154,7 @@ Important changes since 1.4:
* Add `interrupt_exist_connections` option for `Selector` and `URLTest` outbounds **4** * Add `interrupt_exist_connections` option for `Selector` and `URLTest` outbounds **4**
* Add DNS01 challenge support for ACME TLS certificate issuer **5** * Add DNS01 challenge support for ACME TLS certificate issuer **5**
* Add `merge` command **6** * Add `merge` command **6**
* Mark [Deprecated Features](/deprecated/) * Mark [Deprecated Features](/deprecated)
**1**: **1**:
@@ -399,7 +166,7 @@ All inbounds and outbounds are supported, including `Naiveproxy`, `Hysteria[/2]`
**3**: **3**:
See [Hysteria2 inbound](/configuration/inbound/hysteria2/) and [Hysteria2 outbound](/configuration/outbound/hysteria2/) See [Hysteria2 inbound](/configuration/inbound/hysteria2) and [Hysteria2 outbound](/configuration/outbound/hysteria2)
For protocol description, please refer to [https://v2.hysteria.network](https://v2.hysteria.network) For protocol description, please refer to [https://v2.hysteria.network](https://v2.hysteria.network)
@@ -412,7 +179,7 @@ Only inbound connections are affected by this setting, internal connections will
**5**: **5**:
Only `Alibaba Cloud DNS` and `Cloudflare` are supported, see [ACME Fields](/configuration/shared/tls#acme-fields) Only `Alibaba Cloud DNS` and `Cloudflare` are supported, see [ACME Fields](/configuration/shared/tls#acme-fields)
and [DNS01 Challenge Fields](/configuration/shared/dns01_challenge/). and [DNS01 Challenge Fields](/configuration/shared/dns01_challenge).
**6**: **6**:
@@ -494,7 +261,7 @@ Global Flags:
Only `Alibaba Cloud DNS` and `Cloudflare` are supported, Only `Alibaba Cloud DNS` and `Cloudflare` are supported,
see [ACME Fields](/configuration/shared/tls#acme-fields) see [ACME Fields](/configuration/shared/tls#acme-fields)
and [DNS01 Challenge Fields](/configuration/shared/dns01_challenge/). and [DNS01 Challenge Fields](/configuration/shared/dns01_challenge).
#### 1.5.0-beta.10 #### 1.5.0-beta.10
@@ -523,7 +290,7 @@ Only inbound connections are affected by this setting, internal connections will
* Fix compatibility issues with official Hysteria2 server and client * Fix compatibility issues with official Hysteria2 server and client
* Fixes and improvements * Fixes and improvements
* Mark [deprecated features](/deprecated/) * Mark [deprecated features](/deprecated)
#### 1.5.0-beta.3 #### 1.5.0-beta.3
@@ -542,13 +309,13 @@ Hysteria2 server and client when using `fastOpen=false` or UDP MTU >= 1200.
**1**: **1**:
See [Hysteria2 inbound](/configuration/inbound/hysteria2/) and [Hysteria2 outbound](/configuration/outbound/hysteria2/) See [Hysteria2 inbound](/configuration/inbound/hysteria2) and [Hysteria2 outbound](/configuration/outbound/hysteria2)
For protocol description, please refer to [https://v2.hysteria.network](https://v2.hysteria.network) For protocol description, please refer to [https://v2.hysteria.network](https://v2.hysteria.network)
#### 1.5.0-beta.1 #### 1.5.0-beta.1
* Add TLS [ECH server](/configuration/shared/tls/) support * Add TLS [ECH server](/configuration/shared/tls) support
* Improve TLS TCH client configuration * Improve TLS TCH client configuration
* Add TLS ECH key pair generator **1** * Add TLS ECH key pair generator **1**
* Add TLS ECH support for QUIC based protocols **2** * Add TLS ECH support for QUIC based protocols **2**
@@ -581,12 +348,12 @@ Important changes since 1.3:
*1*: *1*:
See [TUIC inbound](/configuration/inbound/tuic/) See [TUIC inbound](/configuration/inbound/tuic)
and [TUIC outbound](/configuration/outbound/tuic/) and [TUIC outbound](/configuration/outbound/tuic)
**2**: **2**:
This is the TUIC port of the [UDP over TCP protocol](/configuration/shared/udp-over-tcp/), designed to provide a QUIC This is the TUIC port of the [UDP over TCP protocol](/configuration/shared/udp-over-tcp), designed to provide a QUIC
stream based UDP relay mode that TUIC does not provide. Since it is an add-on protocol, you will need to use sing-box or stream based UDP relay mode that TUIC does not provide. Since it is an add-on protocol, you will need to use sing-box or
another program compatible with the protocol as a server. another program compatible with the protocol as a server.
@@ -617,7 +384,7 @@ Requires sing-box to be compiled with Go 1.21.
**1**: **1**:
This is the TUIC port of the [UDP over TCP protocol](/configuration/shared/udp-over-tcp/), designed to provide a QUIC This is the TUIC port of the [UDP over TCP protocol](/configuration/shared/udp-over-tcp), designed to provide a QUIC
stream based UDP relay mode that TUIC does not provide. Since it is an add-on protocol, you will need to use sing-box or stream based UDP relay mode that TUIC does not provide. Since it is an add-on protocol, you will need to use sing-box or
another program compatible with the protocol as a server. another program compatible with the protocol as a server.
@@ -655,8 +422,8 @@ Requires sing-box to be compiled with Go 1.21.
*1*: *1*:
See [TUIC inbound](/configuration/inbound/tuic/) See [TUIC inbound](/configuration/inbound/tuic)
and [TUIC outbound](/configuration/outbound/tuic/) and [TUIC outbound](/configuration/outbound/tuic)
#### 1.3.6 #### 1.3.6
@@ -665,7 +432,7 @@ and [TUIC outbound](/configuration/outbound/tuic/)
#### 1.3.5 #### 1.3.5
* Fixes and improvements * Fixes and improvements
* Introducing our [Apple tvOS](/installation/clients/sft/) client applications **1** * Introducing our [Apple tvOS](/installation/clients/sft) client applications **1**
* Add per app proxy and app installed/updated trigger support for Android client * Add per app proxy and app installed/updated trigger support for Android client
* Add profile sharing support for Android/iOS/macOS clients * Add profile sharing support for Android/iOS/macOS clients
@@ -692,7 +459,7 @@ downloaded through TestFlight.
#### 1.3.1-beta.3 #### 1.3.1-beta.3
* Introducing our [new iOS](/installation/clients/sfi/) and [macOS](/installation/clients/sfm/) client applications **1** * Introducing our [new iOS](/installation/clients/sfi) and [macOS](/installation/clients/sfm) client applications **1**
* Fixes and improvements * Fixes and improvements
**1**: **1**:
@@ -713,7 +480,7 @@ The old testflight link and app are no longer valid.
Important changes since 1.2: Important changes since 1.2:
* Add [FakeIP](/configuration/dns/fakeip/) support **1** * Add [FakeIP](/configuration/dns/fakeip) support **1**
* Improve multiplex **2** * Improve multiplex **2**
* Add [DNS reverse mapping](/configuration/dns#reverse_mapping) support * Add [DNS reverse mapping](/configuration/dns#reverse_mapping) support
* Add `rewrite_ttl` DNS rule action * Add `rewrite_ttl` DNS rule action
@@ -740,11 +507,11 @@ Important changes since 1.2:
*1*: *1*:
See [FAQ](/faq/fakeip/) for more information. See [FAQ](/faq/fakeip) for more information.
*2*: *2*:
Added new `h2mux` multiplex protocol and `padding` multiplex option, see [Multiplex](/configuration/shared/multiplex/). Added new `h2mux` multiplex protocol and `padding` multiplex option, see [Multiplex](/configuration/shared/multiplex).
#### 1.3-rc2 #### 1.3-rc2
@@ -806,7 +573,7 @@ Improved performance and reduced memory usage.
*1*: *1*:
Added new `h2mux` multiplex protocol and `padding` multiplex option, see [Multiplex](/configuration/shared/multiplex/). Added new `h2mux` multiplex protocol and `padding` multiplex option, see [Multiplex](/configuration/shared/multiplex).
#### 1.2.6 #### 1.2.6
@@ -858,25 +625,25 @@ This is an incompatible update for XUDP in VLESS if vision flow is enabled.
#### 1.3-beta1 #### 1.3-beta1
* Add [DNS reverse mapping](/configuration/dns#reverse_mapping) support * Add [DNS reverse mapping](/configuration/dns#reverse_mapping) support
* Add [L3 routing](/configuration/route/ip-rule/) support **1** * Add [L3 routing](/configuration/route/ip-rule) support **1**
* Add `rewrite_ttl` DNS rule action * Add `rewrite_ttl` DNS rule action
* Add [FakeIP](/configuration/dns/fakeip/) support **2** * Add [FakeIP](/configuration/dns/fakeip) support **2**
* Add `store_fakeip` Clash API option * Add `store_fakeip` Clash API option
* Add multi-peer support for [WireGuard](/configuration/outbound/wireguard#peers) outbound * Add multi-peer support for [WireGuard](/configuration/outbound/wireguard#peers) outbound
* Add loopback detect * Add loopback detect
*1*: *1*:
It can currently be used to [route connections directly to WireGuard](/examples/wireguard-direct/) or block connections It can currently be used to [route connections directly to WireGuard](/examples/wireguard-direct) or block connections
at the IP layer. at the IP layer.
*2*: *2*:
See [FAQ](/faq/fakeip/) for more information. See [FAQ](/faq/fakeip) for more information.
#### 1.2.3 #### 1.2.3
* Introducing our [new Android client application](/installation/clients/sfa/) * Introducing our [new Android client application](/installation/clients/sfa)
* Improve UDP domain destination NAT * Improve UDP domain destination NAT
* Update reality protocol * Update reality protocol
* Fix TTL calculation for DNS response * Fix TTL calculation for DNS response
@@ -905,16 +672,16 @@ to `domain` rule.
Important changes since 1.1: Important changes since 1.1:
* Introducing our [new iOS client application](/installation/clients/sfi/) * Introducing our [new iOS client application](/installation/clients/sfi)
* Introducing [UDP over TCP protocol version 2](/configuration/shared/udp-over-tcp/) * Introducing [UDP over TCP protocol version 2](/configuration/shared/udp-over-tcp)
* Add [platform options](/configuration/inbound/tun#platform) for tun inbound * Add [platform options](/configuration/inbound/tun#platform) for tun inbound
* Add [ShadowTLS protocol v3](https://github.com/ihciah/shadow-tls/blob/master/docs/protocol-v3-en.md) * Add [ShadowTLS protocol v3](https://github.com/ihciah/shadow-tls/blob/master/docs/protocol-v3-en.md)
* Add [VLESS server](/configuration/inbound/vless/) and [vision](/configuration/outbound/vless#flow) support * Add [VLESS server](/configuration/inbound/vless) and [vision](/configuration/outbound/vless#flow) support
* Add [reality TLS](/configuration/shared/tls/) support * Add [reality TLS](/configuration/shared/tls) support
* Add [NTP service](/configuration/ntp/) * Add [NTP service](/configuration/ntp)
* Add [DHCP DNS server](/configuration/dns/server/) support * Add [DHCP DNS server](/configuration/dns/server) support
* Add SSH [host key validation](/configuration/outbound/ssh/) support * Add SSH [host key validation](/configuration/outbound/ssh) support
* Add [query_type](/configuration/dns/rule/) DNS rule item * Add [query_type](/configuration/dns/rule) DNS rule item
* Add fallback support for v2ray transport * Add fallback support for v2ray transport
* Add custom TLS server support for http based v2ray transports * Add custom TLS server support for http based v2ray transports
* Add health check support for http-based v2ray transports * Add health check support for http-based v2ray transports
@@ -945,7 +712,7 @@ name.
#### 1.2-beta9 #### 1.2-beta9
* Introducing the [UDP over TCP protocol version 2](/configuration/shared/udp-over-tcp/) * Introducing the [UDP over TCP protocol version 2](/configuration/shared/udp-over-tcp)
* Add health check support for http-based v2ray transports * Add health check support for http-based v2ray transports
* Remove length limit on short_id for reality TLS config * Remove length limit on short_id for reality TLS config
* Fix bugs and update dependencies * Fix bugs and update dependencies
@@ -962,7 +729,7 @@ name.
#### 1.2-beta6 #### 1.2-beta6
* Introducing our [new iOS client application](/installation/clients/sfi/) * Introducing our [new iOS client application](/installation/clients/sfi)
* Add [platform options](/configuration/inbound/tun#platform) for tun inbound * Add [platform options](/configuration/inbound/tun#platform) for tun inbound
* Add custom TLS server support for http based v2ray transports * Add custom TLS server support for http based v2ray transports
* Add generate commands * Add generate commands
@@ -975,8 +742,8 @@ name.
#### 1.2-beta5 #### 1.2-beta5
* Add [VLESS server](/configuration/inbound/vless/) and [vision](/configuration/outbound/vless#flow) support * Add [VLESS server](/configuration/inbound/vless) and [vision](/configuration/outbound/vless#flow) support
* Add [reality TLS](/configuration/shared/tls/) support * Add [reality TLS](/configuration/shared/tls) support
* Fix match private address * Fix match private address
#### 1.1.6 #### 1.1.6
@@ -991,7 +758,7 @@ name.
#### 1.2-beta4 #### 1.2-beta4
* Add [NTP service](/configuration/ntp/) * Add [NTP service](/configuration/ntp)
* Add Add multiple server names and multi-user support for shadowtls * Add Add multiple server names and multi-user support for shadowtls
* Add strict mode support for shadowtls v3 * Add strict mode support for shadowtls v3
* Add uTLS support for shadowtls v3 * Add uTLS support for shadowtls v3
@@ -1011,9 +778,9 @@ name.
#### 1.2-beta1 #### 1.2-beta1
* Add [DHCP DNS server](/configuration/dns/server/) support * Add [DHCP DNS server](/configuration/dns/server) support
* Add SSH [host key validation](/configuration/outbound/ssh/) support * Add SSH [host key validation](/configuration/outbound/ssh) support
* Add [query_type](/configuration/dns/rule/) DNS rule item * Add [query_type](/configuration/dns/rule) DNS rule item
* Add v2ray [user stats](/configuration/experimental#statsusers) api * Add v2ray [user stats](/configuration/experimental#statsusers) api
* Add new clash DNS query api * Add new clash DNS query api
* Improve vmess request * Improve vmess request
@@ -1242,7 +1009,7 @@ and [ShadowTLS outbound](/configuration/outbound/shadowtls#version)
#### 1.1-beta6 #### 1.1-beta6
* Add [URLTest outbound](/configuration/outbound/urltest/) * Add [URLTest outbound](/configuration/outbound/urltest)
* Fix bugs in 1.1-beta5 * Fix bugs in 1.1-beta5
#### 1.1-beta5 #### 1.1-beta5
@@ -1274,8 +1041,8 @@ The default tun stack is changed to system.
#### 1.1-beta4 #### 1.1-beta4
* Add internal simple-obfs and v2ray-plugin [Shadowsocks plugins](/configuration/outbound/shadowsocks#plugin) * Add internal simple-obfs and v2ray-plugin [Shadowsocks plugins](/configuration/outbound/shadowsocks#plugin)
* Add [ShadowsocksR outbound](/configuration/outbound/shadowsocksr/) * Add [ShadowsocksR outbound](/configuration/outbound/shadowsocksr)
* Add [VLESS outbound and XUDP](/configuration/outbound/vless/) * Add [VLESS outbound and XUDP](/configuration/outbound/vless)
* Skip wait for hysteria tcp handshake response * Skip wait for hysteria tcp handshake response
* Fix socks4 client * Fix socks4 client
* Fix hysteria inbound * Fix hysteria inbound
@@ -1302,7 +1069,7 @@ The default tun stack is changed to system.
*1*: *1*:
Switching modes using the Clash API, and `store-selected` are now supported, Switching modes using the Clash API, and `store-selected` are now supported,
see [Experimental](/configuration/experimental/). see [Experimental](/configuration/experimental).
*2*: *2*:
@@ -1383,15 +1150,15 @@ and [Listen Fields](/configuration/shared/listen#udp_fragment).
* Fix write trojan udp * Fix write trojan udp
* Fix DNS routing * Fix DNS routing
* Add attribute support for geosite * Add attribute support for geosite
* Update documentation for [Dial Fields](/configuration/shared/dial/) * Update documentation for [Dial Fields](/configuration/shared/dial)
#### 1.0-beta3 #### 1.0-beta3
* Add [chained inbound](/configuration/shared/listen#detour) support * Add [chained inbound](/configuration/shared/listen#detour) support
* Add process_path rule item * Add process_path rule item
* Add macOS redirect support * Add macOS redirect support
* Add ShadowTLS [Inbound](/configuration/inbound/shadowtls/), [Outbound](/configuration/outbound/shadowtls/) * Add ShadowTLS [Inbound](/configuration/inbound/shadowtls), [Outbound](/configuration/outbound/shadowtls)
and [Examples](/examples/shadowtls/) and [Examples](/examples/shadowtls)
* Fix search android package in non-owner users * Fix search android package in non-owner users
* Fix socksaddr type condition * Fix socksaddr type condition
* Fix smux session status * Fix smux session status
@@ -1435,7 +1202,7 @@ and [Listen Fields](/configuration/shared/listen#udp_fragment).
##### 2022/08/23 ##### 2022/08/23
* Add [V2Ray Transport](/configuration/shared/v2ray-transport/) support for VMess and Trojan * Add [V2Ray Transport](/configuration/shared/v2ray-transport) support for VMess and Trojan
* Allow plain http request in Naive inbound (It can now be used with nginx) * Allow plain http request in Naive inbound (It can now be used with nginx)
* Add proxy protocol support * Add proxy protocol support
* Free memory after start * Free memory after start
@@ -1444,13 +1211,13 @@ and [Listen Fields](/configuration/shared/listen#udp_fragment).
##### 2022/08/22 ##### 2022/08/22
* Add strategy setting for each [DNS server](/configuration/dns/server/) * Add strategy setting for each [DNS server](/configuration/dns/server)
* Add bind address to outbound options * Add bind address to outbound options
##### 2022/08/21 ##### 2022/08/21
* Add [Tor outbound](/configuration/outbound/tor/) * Add [Tor outbound](/configuration/outbound/tor)
* Add [SSH outbound](/configuration/outbound/ssh/) * Add [SSH outbound](/configuration/outbound/ssh)
##### 2022/08/20 ##### 2022/08/20
@@ -1464,8 +1231,8 @@ and [Listen Fields](/configuration/shared/listen#udp_fragment).
##### 2022/08/19 ##### 2022/08/19
* Add Hysteria [Inbound](/configuration/inbound/hysteria/) and [Outbund](/configuration/outbound/hysteria/) * Add Hysteria [Inbound](/configuration/inbound/hysteria) and [Outbund](/configuration/outbound/hysteria)
* Add [ACME TLS certificate issuer](/configuration/shared/tls/) * Add [ACME TLS certificate issuer](/configuration/shared/tls)
* Allow read config from stdin (-c stdin) * Allow read config from stdin (-c stdin)
* Update gVisor to 20220815.0 * Update gVisor to 20220815.0
@@ -1483,11 +1250,11 @@ and [Listen Fields](/configuration/shared/listen#udp_fragment).
##### 2022/08/16 ##### 2022/08/16
* Add ip_version (route/dns) rule item * Add ip_version (route/dns) rule item
* Add [WireGuard](/configuration/outbound/wireguard/) outbound * Add [WireGuard](/configuration/outbound/wireguard) outbound
##### 2022/08/15 ##### 2022/08/15
* Add uid, android user and package rules support in [Tun](/configuration/inbound/tun/) routing. * Add uid, android user and package rules support in [Tun](/configuration/inbound/tun) routing.
##### 2022/08/13 ##### 2022/08/13
@@ -1496,15 +1263,15 @@ and [Listen Fields](/configuration/shared/listen#udp_fragment).
##### 2022/08/12 ##### 2022/08/12
* Performance improvements * Performance improvements
* Add UoT option for [SOCKS](/configuration/outbound/socks/) outbound * Add UoT option for [SOCKS](/configuration/outbound/socks) outbound
##### 2022/08/11 ##### 2022/08/11
* Add UoT option for [Shadowsocks](/configuration/outbound/shadowsocks/) outbound, UoT support for all inbounds * Add UoT option for [Shadowsocks](/configuration/outbound/shadowsocks) outbound, UoT support for all inbounds
##### 2022/08/10 ##### 2022/08/10
* Add full-featured [Naive](/configuration/inbound/naive/) inbound * Add full-featured [Naive](/configuration/inbound/naive) inbound
* Fix default dns server option [#9] by iKirby * Fix default dns server option [#9] by iKirby
##### 2022/08/09 ##### 2022/08/09

View File

@@ -1,64 +0,0 @@
# :material-decagram: Features
#### UI options
* Display realtime network speed in the notification
#### Service
SFA allows you to run sing-box through ForegroundService or VpnService (when TUN is required).
#### TUN
SFA provides an unprivileged TUN implementation through Android VpnService.
| TUN inbound option | Available | Note |
|-------------------------------|------------------|--------------------|
| `interface_name` | :material-close: | Managed by Android |
| `inet4_address` | :material-check: | / |
| `inet6_address` | :material-check: | / |
| `mtu` | :material-check: | / |
| `auto_route` | :material-check: | / |
| `strict_route` | :material-close: | Not implemented |
| `inet4_route_address` | :material-check: | / |
| `inet6_route_address` | :material-check: | / |
| `inet4_route_exclude_address` | :material-check: | / |
| `inet6_route_exclude_address` | :material-check: | / |
| `endpoint_independent_nat` | :material-check: | / |
| `stack` | :material-check: | / |
| `include_interface` | :material-close: | No permission |
| `exclude_interface` | :material-close: | No permission |
| `include_uid` | :material-close: | No permission |
| `exclude_uid` | :material-close: | No permission |
| `include_android_user` | :material-close: | No permission |
| `include_package` | :material-check: | / |
| `exclude_package` | :material-check: | / |
| `platform` | :material-check: | / |
| Route/DNS rule option | Available | Note |
|-----------------------|------------------|-----------------------------------|
| `process_name` | :material-close: | No permission |
| `process_path` | :material-close: | No permission |
| `package_name` | :material-check: | / |
| `user` | :material-close: | Use `package_name` instead |
| `user_id` | :material-close: | Use `package_name` instead |
| `wifi_ssid` | :material-check: | Fine location permission required |
| `wifi_bssid` | :material-check: | Fine location permission required |
### Override
Overrides profile configuration items with platform-specific values.
#### Per-app proxy
SFA allows you to select a list of Android apps that require proxying or bypassing in the graphical interface to
override the `include_package` and `exclude_package` configuration items.
In particular, the selector also provides the “China apps” scanning feature, providing Chinese users with an excellent
experience to bypass apps that do not require a proxy. Specifically, by scanning China application or SDK
characteristics through dex class path and other means, there will be almost no missed reports.
### Chore
* The working directory is located at `/sdcard/Android/data/io.nekohasekai.sfa/files` (External files directory)
* Crash logs is located in `$working_directory/stderr.log`

View File

@@ -1,22 +0,0 @@
---
icon: material/android
---
# sing-box for Android
SFA allows users to manage and run local or remote sing-box configuration files, and provides
platform-specific function implementation, such as TUN transparent proxy implementation.
## :material-graph: Requirements
* Android 5.0+
## :material-download: Download
* [Play Store](https://play.google.com/store/apps/details?id=io.nekohasekai.sfa)
* [Play Store (Beta)](https://play.google.com/apps/testing/io.nekohasekai.sfa)
* [GitHub Releases](https://github.com/SagerNet/sing-box/releases)
## :material-source-repository: Source code
* [GitHub](https://github.com/SagerNet/sing-box-for-android)

View File

@@ -1,52 +0,0 @@
# :material-decagram: Features
#### UI options
* Always On
* Include All Networks (Proxy traffic for LAN and cellular services)
* (Apple tvOS) Import profile from iPhone/iPad
#### Service
SFI/SFM/SFT allows you to run sing-box through NetworkExtension with Application Extension or System Extension.
#### TUN
SFI/SFM/SFT provides an unprivileged TUN implementation through NetworkExtension.
| TUN inbound option | Available | Note |
|-------------------------------|-----------|-------------------|
| `interface_name` | ✖️ | Managed by Darwin |
| `inet4_address` | ✔️ | / |
| `inet6_address` | ✔️ | / |
| `mtu` | ✔️ | / |
| `auto_route` | ✔️ | / |
| `strict_route` | ✖️ | Not implemented |
| `inet4_route_address` | ✔️ | / |
| `inet6_route_address` | ✔️ | / |
| `inet4_route_exclude_address` | ✔️ | / |
| `inet6_route_exclude_address` | ✔️ | / |
| `endpoint_independent_nat` | ✔️ | / |
| `stack` | ✔️ | / |
| `include_interface` | ✖️ | Not implemented |
| `exclude_interface` | ✖️ | Not implemented |
| `include_uid` | ✖️ | Not implemented |
| `exclude_uid` | ✖️ | Not implemented |
| `include_android_user` | ✖️ | Not implemented |
| `include_package` | ✖️ | Not implemented |
| `exclude_package` | ✖️ | Not implemented |
| `platform` | ✔️ | / |
| Route/DNS rule option | Available | Note |
|-----------------------|------------------|-----------------------|
| `process_name` | :material-close: | No permission |
| `process_path` | :material-close: | No permission |
| `package_name` | :material-close: | / |
| `user` | :material-close: | No permission |
| `user_id` | :material-close: | No permission |
| `wifi_ssid` | :material-alert: | Only supported on iOS |
| `wifi_bssid` | :material-alert: | Only supported on iOS |
### Chore
* Crash logs is located in `Settings` -> `View Service Log`

View File

@@ -1,32 +0,0 @@
---
icon: material/apple
---
# sing-box for Apple platforms
SFI/SFM/SFT allows users to manage and run local or remote sing-box configuration files, and provides
platform-specific function implementation, such as TUN transparent proxy implementation.
## :material-graph: Requirements
* iOS 15.0+ / macOS 13.0+ / Apple tvOS 17.0+
* An Apple account outside of mainland China
## :material-download: Download
* [App Store](https://apps.apple.com/us/app/sing-box/id6451272673)
* [TestFlight (Beta)](https://testflight.apple.com/join/AcqO44FH)
## :material-file-download: Download (macOS standalone version)
* [Homebrew Cask](https://formulae.brew.sh/cask/sfm)
```bash
brew install sfm
```
* [GitHub Releases](https://github.com/SagerNet/sing-box/releases)
## :material-source-repository: Source code
* [GitHub](https://github.com/SagerNet/sing-box-for-apple)

View File

@@ -1,63 +0,0 @@
---
icon: material/pencil-ruler
---
# General
Describes and explains the functions implemented uniformly by sing-box graphical clients.
### Profile
Profile describes a sing-box configuration file and its state.
#### Local
* Local Profile represents a local sing-box configuration with minimal state
* The graphical client must provide an editor to modify configuration content
#### iCloud (on iOS and macOS)
* iCloud Profile represents a remote sing-box configuration with iCloud as the update source
* The configuration file is stored in the sing-box folder under iCloud
* The graphical client must provide an editor to modify configuration content
#### Remote
* Remote Profile represents a remote sing-box configuration with a URL as the update source.
* The graphical client should provide a configuration content viewer
* The graphical client must implement automatic profile update (default interval is 60 minutes) and HTTP Basic
authorization.
At the same time, the graphical client must provide support for importing remote profiles
through a specific URL Scheme. The URL is defined as follows:
```
sing-box://import-remote-profile?url=urlEncodedURL#urlEncodedName
```
### Dashboard
While the sing-box service is running, the graphical client should provide a Dashboard interface to manage the service.
#### Status
Dashboard should display status information such as memory, connection, and traffic.
#### Mode
Dashboard should provide a Mode selector for switching when the configuration uses at least two `clash_mode` values.
#### Groups
When the configuration includes group outbounds (specifically, Selector or URLTest),
the dashboard should provide a Group selector for status display or switching.
### Chore
#### Core
Graphical clients should provide a Core region:
* Display the current sing-box version
* Provides a button to clean the working directory
* Provides a memory limiter switch

View File

@@ -1,13 +0,0 @@
# :material-cellphone-link: Graphical Clients
Maintained by Project S to provide a unified experience and platform-specific functionality.
| Platform | Client |
|---------------------------------------|------------------------------------------|
| :material-android: Android | [sing-box for Android](./android/) |
| :material-apple: iOS/macOS/Apple tvOS | [sing-box for Apple platforms](./apple/) |
| :material-laptop: Desktop | Working in progress |
Some third-party projects that claim to use sing-box or use sing-box as a selling point are not listed here. The core
motivation of the maintainers of such projects is to acquire more users, and even though they provide friendly VPN
client features, the code is usually of poor quality and contains ads.

View File

@@ -1,12 +0,0 @@
# :material-cellphone-link: 图形界面客户端
由 Project S 维护,提供统一的体验与平台特定的功能。
| 平台 | 客户端 |
|---------------------------------------|-----------------------------------------|
| :material-android: Android | [sing-box for Android](./android/) |
| :material-apple: iOS/macOS/Apple tvOS | [sing-box for Apple platforms](./apple/) |
| :material-laptop: Desktop | 施工中 |
此处没有列出一些声称使用或以 sing-box 为卖点的第三方项目。此类项目维护者的动机是获得更多用户,即使它们提供友好的商业
VPN 客户端功能, 但代码质量很差且包含广告。

View File

@@ -1,8 +0,0 @@
---
icon: material/security
---
# Privacy policy
sing-box and official graphics clients do not collect or share personal data,
and the data generated by the software is always on your device.

View File

@@ -23,9 +23,9 @@
| Key | Format | | Key | Format |
|----------|--------------------------------| |----------|--------------------------------|
| `server` | List of [DNS Server](./server/) | | `server` | List of [DNS Server](./server) |
| `rules` | List of [DNS Rule](./rule/) | | `rules` | List of [DNS Rule](./rule) |
| `fakeip` | [FakeIP](./fakeip/) | | `fakeip` | [FakeIP](./fakeip) |
#### final #### final
@@ -62,4 +62,4 @@ problematic in environments such as macOS, where DNS is proxied and cached by th
#### fakeip #### fakeip
[FakeIP](./fakeip/) settings. [FakeIP](./fakeip) settings.

View File

@@ -22,9 +22,9 @@
### 字段 ### 字段
| 键 | 格式 | | 键 | 格式 |
|----------|-------------------------| |----------|------------------------|
| `server` | 一组 [DNS 服务器](./server/) | | `server` | 一组 [DNS 服务器](./server) |
| `rules` | 一组 [DNS 规则](./rule/) | | `rules` | 一组 [DNS 规则](./rule) |
#### final #### final
@@ -60,4 +60,4 @@
#### fakeip #### fakeip
[FakeIP](./fakeip/) 设置。 [FakeIP](./fakeip) 设置。

View File

@@ -79,12 +79,6 @@
1000 1000
], ],
"clash_mode": "direct", "clash_mode": "direct",
"wifi_ssid": [
"My WIFI"
],
"wifi_bssid": [
"00:00:00:00:00:00"
],
"invert": false, "invert": false,
"outbound": [ "outbound": [
"direct" "direct"
@@ -124,7 +118,7 @@
#### inbound #### inbound
Tags of [Inbound](/configuration/inbound/). Tags of [Inbound](/configuration/inbound).
#### ip_version #### ip_version
@@ -194,7 +188,7 @@ Match port range.
#### process_name #### process_name
!!! quote "" !!! error ""
Only supported on Linux, Windows, and macOS. Only supported on Linux, Windows, and macOS.
@@ -202,7 +196,7 @@ Match process name.
#### process_path #### process_path
!!! quote "" !!! error ""
Only supported on Linux, Windows, and macOS. Only supported on Linux, Windows, and macOS.
@@ -214,7 +208,7 @@ Match android package name.
#### user #### user
!!! quote "" !!! error ""
Only supported on Linux. Only supported on Linux.
@@ -222,7 +216,7 @@ Match user name.
#### user_id #### user_id
!!! quote "" !!! error ""
Only supported on Linux. Only supported on Linux.
@@ -232,24 +226,6 @@ Match user id.
Match Clash mode. Match Clash mode.
#### wifi_ssid
<!-- md:version 1.7.0-beta.4 -->
!!! quote ""
Only supported in graphical clients on Android and iOS.
Match WiFi SSID.
#### wifi_bssid
!!! quote ""
Only supported in graphical clients on Android and iOS.
Match WiFi BSSID.
#### invert #### invert
Invert match result. Invert match result.

View File

@@ -78,12 +78,6 @@
1000 1000
], ],
"clash_mode": "direct", "clash_mode": "direct",
"wifi_ssid": [
"My WIFI"
],
"wifi_bssid": [
"00:00:00:00:00:00"
],
"invert": false, "invert": false,
"outbound": [ "outbound": [
"direct" "direct"
@@ -121,7 +115,7 @@
#### inbound #### inbound
[入站](/zh/configuration/inbound/) 标签. [入站](/zh/configuration/inbound) 标签.
#### ip_version #### ip_version
@@ -191,7 +185,7 @@ DNS 查询类型。值可以为整数或者类型名称字符串。
#### process_name #### process_name
!!! quote "" !!! error ""
仅支持 Linux、Windows 和 macOS. 仅支持 Linux、Windows 和 macOS.
@@ -199,7 +193,7 @@ DNS 查询类型。值可以为整数或者类型名称字符串。
#### process_path #### process_path
!!! quote "" !!! error ""
仅支持 Linux、Windows 和 macOS. 仅支持 Linux、Windows 和 macOS.
@@ -211,7 +205,7 @@ DNS 查询类型。值可以为整数或者类型名称字符串。
#### user #### user
!!! quote "" !!! error ""
仅支持 Linux。 仅支持 Linux。
@@ -219,7 +213,7 @@ DNS 查询类型。值可以为整数或者类型名称字符串。
#### user_id #### user_id
!!! quote "" !!! error ""
仅支持 Linux。 仅支持 Linux。
@@ -229,22 +223,6 @@ DNS 查询类型。值可以为整数或者类型名称字符串。
匹配 Clash 模式。 匹配 Clash 模式。
#### wifi_ssid
!!! quote ""
仅在 Android 与 iOS 的图形客户端中支持。
匹配 WiFi SSID。
#### wifi_bssid
!!! quote ""
仅在 Android 与 iOS 的图形客户端中支持。
匹配 WiFi BSSID。
#### invert #### invert
反选匹配结果。 反选匹配结果。

View File

@@ -31,7 +31,7 @@ The tag of the dns server.
The address of the dns server. The address of the dns server.
| Protocol | Format | | Protocol | Format |
|--------------------------------------|-------------------------------| |-------------------------------------|-------------------------------|
| `System` | `local` | | `System` | `local` |
| `TCP` | `tcp://1.0.0.1` | | `TCP` | `tcp://1.0.0.1` |
| `UDP` | `8.8.8.8` `udp://8.8.4.4` | | `UDP` | `8.8.8.8` `udp://8.8.4.4` |
@@ -41,7 +41,7 @@ The address of the dns server.
| `HTTP3` | `h3://8.8.8.8/dns-query` | | `HTTP3` | `h3://8.8.8.8/dns-query` |
| `RCode` | `rcode://refused` | | `RCode` | `rcode://refused` |
| `DHCP` | `dhcp://auto` or `dhcp://en0` | | `DHCP` | `dhcp://auto` or `dhcp://en0` |
| [FakeIP](/configuration/dns/fakeip/) | `fakeip` | | [FakeIP](/configuration/dns/fakeip) | `fakeip` |
!!! warning "" !!! warning ""
@@ -49,7 +49,7 @@ The address of the dns server.
!!! warning "" !!! warning ""
QUIC and HTTP3 transport is not included by default, see [Installation](./#installation). QUIC and HTTP3 transport is not included by default, see [Installation](/#installation).
!!! info "" !!! info ""
@@ -57,7 +57,7 @@ The address of the dns server.
!!! warning "" !!! warning ""
DHCP transport is not included by default, see [Installation](./#installation). DHCP transport is not included by default, see [Installation](/#installation).
| RCode | Description | | RCode | Description |
|-------------------|-----------------------| |-------------------|-----------------------|

View File

@@ -31,7 +31,7 @@ DNS 服务器的标签。
DNS 服务器的地址。 DNS 服务器的地址。
| 协议 | 格式 | | 协议 | 格式 |
|--------------------------------------|------------------------------| |-------------------------------------|------------------------------|
| `System` | `local` | | `System` | `local` |
| `TCP` | `tcp://1.0.0.1` | | `TCP` | `tcp://1.0.0.1` |
| `UDP` | `8.8.8.8` `udp://8.8.4.4` | | `UDP` | `8.8.8.8` `udp://8.8.4.4` |
@@ -41,7 +41,7 @@ DNS 服务器的地址。
| `HTTP3` | `h3://8.8.8.8/dns-query` | | `HTTP3` | `h3://8.8.8.8/dns-query` |
| `RCode` | `rcode://refused` | | `RCode` | `rcode://refused` |
| `DHCP` | `dhcp://auto``dhcp://en0` | | `DHCP` | `dhcp://auto``dhcp://en0` |
| [FakeIP](/configuration/dns/fakeip/) | `fakeip` | | [FakeIP](/configuration/dns/fakeip) | `fakeip` |
!!! warning "" !!! warning ""

View File

@@ -44,9 +44,9 @@
### Clash API Fields ### Clash API Fields
!!! quote "" !!! error ""
Clash API is not included by default, see [Installation](./#installation). Clash API is not included by default, see [Installation](/#installation).
#### external_controller #### external_controller
@@ -110,9 +110,9 @@ If not empty, `store_selected` will use a separate store keyed by it.
### V2Ray API Fields ### V2Ray API Fields
!!! quote "" !!! error ""
V2Ray API is not included by default, see [Installation](./#installation). V2Ray API is not included by default, see [Installation](/#installation).
#### listen #### listen

View File

@@ -44,7 +44,7 @@
### Clash API 字段 ### Clash API 字段
!!! quote "" !!! error ""
默认安装不包含 Clash API参阅 [安装](/zh/#_2)。 默认安装不包含 Clash API参阅 [安装](/zh/#_2)。
@@ -108,7 +108,7 @@ Clash 中的默认模式,默认使用 `Rule`。
### V2Ray API 字段 ### V2Ray API 字段
!!! quote "" !!! error ""
默认安装不包含 V2Ray API参阅 [安装](/zh/#_2)。 默认安装不包含 V2Ray API参阅 [安装](/zh/#_2)。

View File

@@ -17,7 +17,7 @@
### Listen Fields ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen) for details.
### Fields ### Fields

View File

@@ -20,7 +20,7 @@
### Listen Fields ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen) for details.
### Fields ### Fields
@@ -36,7 +36,7 @@ No authentication required if empty.
#### set_system_proxy #### set_system_proxy
!!! quote "" !!! error ""
Only supported on Linux, Android, Windows, and macOS. Only supported on Linux, Android, Windows, and macOS.

View File

@@ -36,7 +36,7 @@ HTTP 用户
#### set_system_proxy #### set_system_proxy
!!! quote "" !!! error ""
仅支持 Linux、Android、Windows 和 macOS。 仅支持 Linux、Android、Windows 和 macOS。

View File

@@ -31,11 +31,11 @@
!!! warning "" !!! warning ""
QUIC, which is required by hysteria is not included by default, see [Installation](./#installation). QUIC, which is required by hysteria is not included by default, see [Installation](/#installation).
### Listen Fields ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen) for details.
### Fields ### Fields

View File

@@ -4,8 +4,8 @@
{ {
"type": "hysteria2", "type": "hysteria2",
"tag": "hy2-in", "tag": "hy2-in",
...
// Listen Fields ... // Listen Fields
"up_mbps": 100, "up_mbps": 100,
"down_mbps": 100, "down_mbps": 100,
@@ -28,18 +28,11 @@
!!! warning "" !!! warning ""
QUIC, which is required by Hysteria2 is not included by default, see [Installation](./#installation). QUIC, which is required by Hysteria2 is not included by default, see [Installation](/#installation).
!!! warning "Difference from official Hysteria2"
The official program supports an authentication method called **userpass**,
which essentially uses a combination of `<username>:<password>` as the actual password,
while sing-box does not provide this alias.
To use sing-box with the official program, you need to fill in that combination as the actual password.
### Listen Fields ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen) for details.
### Fields ### Fields

View File

@@ -4,8 +4,8 @@
{ {
"type": "hysteria2", "type": "hysteria2",
"tag": "hy2-in", "tag": "hy2-in",
...
// 监听字段 ... // 监听字段
"up_mbps": 100, "up_mbps": 100,
"down_mbps": 100, "down_mbps": 100,
@@ -30,12 +30,6 @@
默认安装不包含被 Hysteria2 依赖的 QUIC参阅 [安装](/zh/#_2)。 默认安装不包含被 Hysteria2 依赖的 QUIC参阅 [安装](/zh/#_2)。
!!! warning "与官方 Hysteria2 的区别"
官方程序支持一种名为 **userpass** 的验证方式,
本质上上是将用户名与密码的组合 `<username>:<password>` 作为实际上的密码,而 sing-box 不提供此别名。
要将 sing-box 与官方程序一起使用, 您需要填写该组合作为实际密码。
### 监听字段 ### 监听字段
参阅 [监听字段](/zh/configuration/shared/listen/)。 参阅 [监听字段](/zh/configuration/shared/listen/)。
@@ -68,7 +62,7 @@ Hysteria 用户
#### ignore_client_bandwidth #### ignore_client_bandwidth
命令客户端使用 BBR 拥塞控制算法而不是 Hysteria CC。 命令客户端使用 BBR 流量控制算法而不是 Hysteria CC。
`up_mbps``down_mbps` 冲突。 `up_mbps``down_mbps` 冲突。

View File

@@ -16,23 +16,23 @@
### Fields ### Fields
| Type | Format | Injectable | | Type | Format | Injectable |
|---------------|-------------------------------|------------| |---------------|------------------------------|------------|
| `direct` | [Direct](./direct/) | X | | `direct` | [Direct](./direct) | X |
| `mixed` | [Mixed](./mixed/) | TCP | | `mixed` | [Mixed](./mixed) | TCP |
| `socks` | [SOCKS](./socks/) | TCP | | `socks` | [SOCKS](./socks) | TCP |
| `http` | [HTTP](./http/) | TCP | | `http` | [HTTP](./http) | TCP |
| `shadowsocks` | [Shadowsocks](./shadowsocks/) | TCP | | `shadowsocks` | [Shadowsocks](./shadowsocks) | TCP |
| `vmess` | [VMess](./vmess/) | TCP | | `vmess` | [VMess](./vmess) | TCP |
| `trojan` | [Trojan](./trojan/) | TCP | | `trojan` | [Trojan](./trojan) | TCP |
| `naive` | [Naive](./naive/) | X | | `naive` | [Naive](./naive) | X |
| `hysteria` | [Hysteria](./hysteria/) | X | | `hysteria` | [Hysteria](./hysteria) | X |
| `shadowtls` | [ShadowTLS](./shadowtls/) | TCP | | `shadowtls` | [ShadowTLS](./shadowtls) | TCP |
| `tuic` | [TUIC](./tuic/) | X | | `tuic` | [TUIC](./tuic) | X |
| `hysteria2` | [Hysteria2](./hysteria2/) | X | | `hysteria2` | [Hysteria2](./hysteria2) | X |
| `vless` | [VLESS](./vless/) | TCP | | `vless` | [VLESS](./vless) | TCP |
| `tun` | [Tun](./tun/) | X | | `tun` | [Tun](./tun) | X |
| `redirect` | [Redirect](./redirect/) | X | | `redirect` | [Redirect](./redirect) | X |
| `tproxy` | [TProxy](./tproxy/) | X | | `tproxy` | [TProxy](./tproxy) | X |
#### tag #### tag

View File

@@ -17,22 +17,22 @@
| 类型 | 格式 | 注入支持 | | 类型 | 格式 | 注入支持 |
|---------------|------------------------------|------| |---------------|------------------------------|------|
| `direct` | [Direct](./direct/) | X | | `direct` | [Direct](./direct) | X |
| `mixed` | [Mixed](./mixed/) | TCP | | `mixed` | [Mixed](./mixed) | TCP |
| `socks` | [SOCKS](./socks/) | TCP | | `socks` | [SOCKS](./socks) | TCP |
| `http` | [HTTP](./http/) | TCP | | `http` | [HTTP](./http) | TCP |
| `shadowsocks` | [Shadowsocks](./shadowsocks/) | TCP | | `shadowsocks` | [Shadowsocks](./shadowsocks) | TCP |
| `vmess` | [VMess](./vmess/) | TCP | | `vmess` | [VMess](./vmess) | TCP |
| `trojan` | [Trojan](./trojan/) | TCP | | `trojan` | [Trojan](./trojan) | TCP |
| `naive` | [Naive](./naive/) | X | | `naive` | [Naive](./naive) | X |
| `hysteria` | [Hysteria](./hysteria/) | X | | `hysteria` | [Hysteria](./hysteria) | X |
| `shadowtls` | [ShadowTLS](./shadowtls/) | TCP | | `shadowtls` | [ShadowTLS](./shadowtls) | TCP |
| `tuic` | [TUIC](./tuic/) | X | | `tuic` | [TUIC](./tuic) | X |
| `hysteria2` | [Hysteria2](./hysteria2/) | X | | `hysteria2` | [Hysteria2](./hysteria2) | X |
| `vless` | [VLESS](./vless/) | TCP | | `vless` | [VLESS](./vless) | TCP |
| `tun` | [Tun](./tun/) | X | | `tun` | [Tun](./tun) | X |
| `redirect` | [Redirect](./redirect/) | X | | `redirect` | [Redirect](./redirect) | X |
| `tproxy` | [TProxy](./tproxy/) | X | | `tproxy` | [TProxy](./tproxy) | X |
#### tag #### tag

View File

@@ -21,7 +21,7 @@
### Listen Fields ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen) for details.
### Fields ### Fields
@@ -33,7 +33,7 @@ No authentication required if empty.
#### set_system_proxy #### set_system_proxy
!!! quote "" !!! error ""
Only supported on Linux, Android, Windows, and macOS. Only supported on Linux, Android, Windows, and macOS.

View File

@@ -33,7 +33,7 @@ SOCKS 和 HTTP 用户
#### set_system_proxy #### set_system_proxy
!!! quote "" !!! error ""
仅支持 Linux、Android、Windows 和 macOS。 仅支持 Linux、Android、Windows 和 macOS。

View File

@@ -20,11 +20,11 @@
!!! warning "" !!! warning ""
HTTP3 transport is not included by default, see [Installation](./#installation). HTTP3 transport is not included by default, see [Installation](/#installation).
### Listen Fields ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen) for details.
### Fields ### Fields

View File

@@ -1,4 +1,4 @@
!!! quote "" !!! error ""
Only supported on Linux and macOS. Only supported on Linux and macOS.
@@ -15,4 +15,4 @@
### Listen Fields ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen) for details.

View File

@@ -1,4 +1,4 @@
!!! quote "" !!! error ""
仅支持 Linux 和 macOS。 仅支持 Linux 和 macOS。

View File

@@ -8,8 +8,7 @@
... // Listen Fields ... // Listen Fields
"method": "2022-blake3-aes-128-gcm", "method": "2022-blake3-aes-128-gcm",
"password": "8JCsPssfgS8tiRwiMlhARg==", "password": "8JCsPssfgS8tiRwiMlhARg=="
"multiplex": {}
} }
``` ```
@@ -24,8 +23,7 @@
"name": "sekai", "name": "sekai",
"password": "PCD2Z4o12bKUoFa3cC97Hw==" "password": "PCD2Z4o12bKUoFa3cC97Hw=="
} }
], ]
"multiplex": {}
} }
``` ```
@@ -43,14 +41,13 @@
"server_port": 8080, "server_port": 8080,
"password": "PCD2Z4o12bKUoFa3cC97Hw==" "password": "PCD2Z4o12bKUoFa3cC97Hw=="
} }
], ]
"multiplex": {}
} }
``` ```
### Listen Fields ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen) for details.
### Fields ### Fields
@@ -85,7 +82,3 @@ Both if empty.
| none | / | | none | / |
| 2022 methods | `sing-box generate rand --base64 <Key Length>` | | 2022 methods | `sing-box generate rand --base64 <Key Length>` |
| other methods | any string | | other methods | any string |
#### multiplex
See [Multiplex](/configuration/shared/multiplex#inbound) for details.

View File

@@ -8,8 +8,7 @@
... // 监听字段 ... // 监听字段
"method": "2022-blake3-aes-128-gcm", "method": "2022-blake3-aes-128-gcm",
"password": "8JCsPssfgS8tiRwiMlhARg==", "password": "8JCsPssfgS8tiRwiMlhARg=="
"multiplex": {}
} }
``` ```
@@ -24,8 +23,7 @@
"name": "sekai", "name": "sekai",
"password": "PCD2Z4o12bKUoFa3cC97Hw==" "password": "PCD2Z4o12bKUoFa3cC97Hw=="
} }
], ]
"multiplex": {}
} }
``` ```
@@ -43,14 +41,13 @@
"server_port": 8080, "server_port": 8080,
"password": "PCD2Z4o12bKUoFa3cC97Hw==" "password": "PCD2Z4o12bKUoFa3cC97Hw=="
} }
], ]
"multiplex": {}
} }
``` ```
### Listen Fields ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen) for details.
### 字段 ### 字段
@@ -85,7 +82,3 @@ See [Listen Fields](/configuration/shared/listen/) for details.
| none | / | | none | / |
| 2022 methods | `sing-box generate rand --base64 <密钥长度>` | | 2022 methods | `sing-box generate rand --base64 <密钥长度>` |
| other methods | 任意字符串 | | other methods | 任意字符串 |
#### multiplex
参阅 [多路复用](/zh/configuration/shared/multiplex#inbound)。

View File

@@ -35,7 +35,7 @@
### Listen Fields ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen) for details.
### Fields ### Fields
@@ -66,11 +66,11 @@ Only available in the ShadowTLS protocol 3.
==Required== ==Required==
Handshake server address and [Dial options](/configuration/shared/dial/). Handshake server address and [Dial options](/configuration/shared/dial).
#### handshake_for_server_name #### handshake_for_server_name
Handshake server address and [Dial options](/configuration/shared/dial/) for specific server name. Handshake server address and [Dial options](/configuration/shared/dial) for specific server name.
Only available in the ShadowTLS protocol 2/3. Only available in the ShadowTLS protocol 2/3.

View File

@@ -20,7 +20,7 @@
### Listen Fields ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen) for details.
### Fields ### Fields

View File

@@ -1,4 +1,4 @@
!!! quote "" !!! error ""
Only supported on Linux. Only supported on Linux.
@@ -17,7 +17,7 @@
### Listen Fields ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen) for details.
### Fields ### Fields

View File

@@ -1,4 +1,4 @@
!!! quote "" !!! error ""
仅支持 Linux。 仅支持 Linux。

View File

@@ -24,14 +24,13 @@
"server_port": 8081 "server_port": 8081
} }
}, },
"multiplex": {},
"transport": {} "transport": {}
} }
``` ```
### Listen Fields ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen) for details.
### Fields ### Fields
@@ -47,7 +46,7 @@ TLS configuration, see [TLS](/configuration/shared/tls/#inbound).
#### fallback #### fallback
!!! quote "" !!! error ""
There is no evidence that GFW detects and blocks Trojan servers based on HTTP responses, and opening the standard http/s port on the server is a much bigger signature. There is no evidence that GFW detects and blocks Trojan servers based on HTTP responses, and opening the standard http/s port on the server is a much bigger signature.
@@ -59,10 +58,6 @@ Fallback server configuration for specified ALPN.
If not empty, TLS fallback requests with ALPN not in this table will be rejected. If not empty, TLS fallback requests with ALPN not in this table will be rejected.
#### multiplex
See [Multiplex](/configuration/shared/multiplex#inbound) for details.
#### transport #### transport
V2Ray Transport configuration, see [V2Ray Transport](/configuration/shared/v2ray-transport/). V2Ray Transport configuration, see [V2Ray Transport](/configuration/shared/v2ray-transport).

View File

@@ -24,7 +24,6 @@
"server_port": 8081 "server_port": 8081
} }
}, },
"multiplex": {},
"transport": {} "transport": {}
} }
``` ```
@@ -49,7 +48,7 @@ TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#inbound)。
#### fallback #### fallback
!!! quote "" !!! error ""
没有证据表明 GFW 基于 HTTP 响应检测并阻止 Trojan 服务器,并且在服务器上打开标准 http/s 端口是一个更大的特征。 没有证据表明 GFW 基于 HTTP 响应检测并阻止 Trojan 服务器,并且在服务器上打开标准 http/s 端口是一个更大的特征。
@@ -61,10 +60,6 @@ TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#inbound)。
如果不为空ALPN 不在此列表中的 TLS 回退请求将被拒绝。 如果不为空ALPN 不在此列表中的 TLS 回退请求将被拒绝。
#### multiplex
参阅 [多路复用](/zh/configuration/shared/multiplex#inbound)。
#### transport #### transport
V2Ray 传输配置,参阅 [V2Ray 传输层](/zh/configuration/shared/v2ray-transport/)。 V2Ray 传输配置,参阅 [V2Ray 传输层](/zh/configuration/shared/v2ray-transport)。

View File

@@ -24,11 +24,11 @@
!!! warning "" !!! warning ""
QUIC, which is required by TUIC is not included by default, see [Installation](./#installation). QUIC, which is required by TUIC is not included by default, see [Installation](/#installation).
### Listen Fields ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen) for details.
### Fields ### Fields

View File

@@ -48,7 +48,7 @@ TUIC 用户密码
#### congestion_control #### congestion_control
QUIC 拥塞控制算法 QUIC 流量控制算法
可选值: `cubic`, `new_reno`, `bbr` 可选值: `cubic`, `new_reno`, `bbr`

View File

@@ -1,4 +1,4 @@
!!! quote "" !!! error ""
Only supported on Linux, Windows and macOS. Only supported on Linux, Windows and macOS.
@@ -22,14 +22,7 @@
"::/1", "::/1",
"8000::/1" "8000::/1"
], ],
"inet4_route_exclude_address": [
"192.168.0.0/16"
],
"inet6_route_exclude_address": [
"fc00::/7"
],
"endpoint_independent_nat": false, "endpoint_independent_nat": false,
"udp_timeout": "5m",
"stack": "system", "stack": "system",
"include_interface": [ "include_interface": [
"lan0" "lan0"
@@ -103,7 +96,7 @@ The maximum transmission unit.
Set the default route to the Tun. Set the default route to the Tun.
!!! quote "" !!! error ""
To avoid traffic loopback, set `route.auto_detect_interface` or `route.default_interface` or `outbound.bind_interface` To avoid traffic loopback, set `route.auto_detect_interface` or `route.default_interface` or `outbound.bind_interface`
@@ -137,14 +130,6 @@ Use custom routes instead of default when `auto_route` is enabled.
Use custom routes instead of default when `auto_route` is enabled. Use custom routes instead of default when `auto_route` is enabled.
#### inet4_route_exclude_address
Exclude custom routes when `auto_route` is enabled.
#### inet6_route_exclude_address
Exclude custom routes when `auto_route` is enabled.
#### endpoint_independent_nat #### endpoint_independent_nat
!!! info "" !!! info ""
@@ -172,11 +157,11 @@ TCP/IP stack.
!!! warning "" !!! warning ""
gVisor and LWIP stacks is not included by default, see [Installation](./#installation). gVisor and LWIP stacks is not included by default, see [Installation](/#installation).
#### include_interface #### include_interface
!!! quote "" !!! error ""
Interface rules are only supported on Linux and require auto_route. Interface rules are only supported on Linux and require auto_route.
@@ -192,7 +177,7 @@ Conflict with `include_interface`.
#### include_uid #### include_uid
!!! quote "" !!! error ""
UID rules are only supported on Linux and require auto_route. UID rules are only supported on Linux and require auto_route.
@@ -212,7 +197,7 @@ Exclude users in route, but in range.
#### include_android_user #### include_android_user
!!! quote "" !!! error ""
Android user and package rules are only supported on Android and require auto_route. Android user and package rules are only supported on Android and require auto_route.
@@ -241,4 +226,4 @@ System HTTP proxy settings.
### Listen Fields ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen) for details.

View File

@@ -1,4 +1,4 @@
!!! quote "" !!! error ""
仅支持 Linux、Windows 和 macOS。 仅支持 Linux、Windows 和 macOS。
@@ -22,14 +22,7 @@
"::/1", "::/1",
"8000::/1" "8000::/1"
], ],
"inet4_route_exclude_address": [
"192.168.0.0/16"
],
"inet6_route_exclude_address": [
"fc00::/7"
],
"endpoint_independent_nat": false, "endpoint_independent_nat": false,
"udp_timeout": "5m",
"stack": "system", "stack": "system",
"include_interface": [ "include_interface": [
"lan0" "lan0"
@@ -103,7 +96,7 @@ tun 接口的 IPv6 前缀。
设置到 Tun 的默认路由。 设置到 Tun 的默认路由。
!!! quote "" !!! error ""
为避免流量环回,请设置 `route.auto_detect_interface``route.default_interface``outbound.bind_interface` 为避免流量环回,请设置 `route.auto_detect_interface``route.default_interface``outbound.bind_interface`
@@ -138,14 +131,6 @@ tun 接口的 IPv6 前缀。
启用 `auto_route` 时使用自定义路由而不是默认路由。 启用 `auto_route` 时使用自定义路由而不是默认路由。
#### inet4_route_exclude_address
启用 `auto_route` 时排除自定义路由。
#### inet6_route_exclude_address
启用 `auto_route` 时排除自定义路由。
#### endpoint_independent_nat #### endpoint_independent_nat
启用独立于端点的 NAT。 启用独立于端点的 NAT。
@@ -172,7 +157,7 @@ TCP/IP 栈。
#### include_interface #### include_interface
!!! quote "" !!! error ""
接口规则仅在 Linux 下被支持,并且需要 `auto_route` 接口规则仅在 Linux 下被支持,并且需要 `auto_route`
@@ -188,7 +173,7 @@ TCP/IP 栈。
#### include_uid #### include_uid
!!! quote "" !!! error ""
UID 规则仅在 Linux 下被支持,并且需要 `auto_route` UID 规则仅在 Linux 下被支持,并且需要 `auto_route`
@@ -208,7 +193,7 @@ TCP/IP 栈。
#### include_android_user #### include_android_user
!!! quote "" !!! error ""
Android 用户和应用规则仅在 Android 下被支持,并且需要 `auto_route` Android 用户和应用规则仅在 Android 下被支持,并且需要 `auto_route`

View File

@@ -15,14 +15,13 @@
} }
], ],
"tls": {}, "tls": {},
"multiplex": {},
"transport": {} "transport": {}
} }
``` ```
### Listen Fields ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen) for details.
### Fields ### Fields
@@ -50,10 +49,6 @@ Available values:
TLS configuration, see [TLS](/configuration/shared/tls/#inbound). TLS configuration, see [TLS](/configuration/shared/tls/#inbound).
#### multiplex
See [Multiplex](/configuration/shared/multiplex#inbound) for details.
#### transport #### transport
V2Ray Transport configuration, see [V2Ray Transport](/configuration/shared/v2ray-transport/). V2Ray Transport configuration, see [V2Ray Transport](/configuration/shared/v2ray-transport).

View File

@@ -15,7 +15,6 @@
} }
], ],
"tls": {}, "tls": {},
"multiplex": {},
"transport": {} "transport": {}
} }
``` ```
@@ -50,10 +49,6 @@ VLESS 子协议。
TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#inbound)。 TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#inbound)。
#### multiplex
参阅 [多路复用](/zh/configuration/shared/multiplex#inbound)。
#### transport #### transport
V2Ray 传输配置,参阅 [V2Ray 传输层](/zh/configuration/shared/v2ray-transport/)。 V2Ray 传输配置,参阅 [V2Ray 传输层](/zh/configuration/shared/v2ray-transport)。

View File

@@ -15,14 +15,13 @@
} }
], ],
"tls": {}, "tls": {},
"multiplex": {},
"transport": {} "transport": {}
} }
``` ```
### Listen Fields ### Listen Fields
See [Listen Fields](/configuration/shared/listen/) for details. See [Listen Fields](/configuration/shared/listen) for details.
### Fields ### Fields
@@ -45,10 +44,6 @@ VMess users.
TLS configuration, see [TLS](/configuration/shared/tls/#inbound). TLS configuration, see [TLS](/configuration/shared/tls/#inbound).
#### multiplex
See [Multiplex](/configuration/shared/multiplex#inbound) for details.
#### transport #### transport
V2Ray Transport configuration, see [V2Ray Transport](/configuration/shared/v2ray-transport/). V2Ray Transport configuration, see [V2Ray Transport](/configuration/shared/v2ray-transport).

View File

@@ -15,7 +15,6 @@
} }
], ],
"tls": {}, "tls": {},
"multiplex": {},
"transport": {} "transport": {}
} }
``` ```
@@ -45,10 +44,6 @@ VMess 用户。
TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#inbound)。 TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#inbound)。
#### multiplex
参阅 [多路复用](/zh/configuration/shared/multiplex#inbound)。
#### transport #### transport
V2Ray 传输配置,参阅 [V2Ray 传输层](/zh/configuration/shared/v2ray-transport/)。 V2Ray 传输配置,参阅 [V2Ray 传输层](/zh/configuration/shared/v2ray-transport)。

View File

@@ -19,14 +19,14 @@ sing-box uses JSON for configuration files.
### Fields ### Fields
| Key | Format | | Key | Format |
|----------------|---------------------------------| |----------------|--------------------------------|
| `log` | [Log](./log/) | | `log` | [Log](./log) |
| `dns` | [DNS](./dns/) | | `dns` | [DNS](./dns) |
| `ntp` | [NTP](./ntp/) | | `ntp` | [NTP](./ntp) |
| `inbounds` | [Inbound](./inbound/) | | `inbounds` | [Inbound](./inbound) |
| `outbounds` | [Outbound](./outbound/) | | `outbounds` | [Outbound](./outbound) |
| `route` | [Route](./route/) | | `route` | [Route](./route) |
| `experimental` | [Experimental](./experimental/) | | `experimental` | [Experimental](./experimental) |
### Check ### Check

View File

@@ -18,13 +18,13 @@ sing-box 使用 JSON 作为配置文件格式。
### 字段 ### 字段
| Key | Format | | Key | Format |
|----------------|------------------------| |----------------|-----------------------|
| `log` | [日志](./log/) | | `log` | [日志](./log) |
| `dns` | [DNS](./dns/) | | `dns` | [DNS](./dns) |
| `inbounds` | [入站](./inbound/) | | `inbounds` | [入站](./inbound) |
| `outbounds` | [出站](./outbound/) | | `outbounds` | [出站](./outbound) |
| `route` | [路由](./route/) | | `route` | [路由](./route) |
| `experimental` | [实验性](./experimental/) | | `experimental` | [实验性](./experimental) |
### 检查 ### 检查

View File

@@ -47,4 +47,4 @@ Time synchronization interval.
### Dial Fields ### Dial Fields
See [Dial Fields](/configuration/shared/dial/) for details. See [Dial Fields](/configuration/shared/dial) for details.

View File

@@ -33,4 +33,4 @@ Protocol value can be `1` or `2`.
### Dial Fields ### Dial Fields
See [Dial Fields](/configuration/shared/dial/) for details. See [Dial Fields](/configuration/shared/dial) for details.

View File

@@ -55,4 +55,4 @@ TLS configuration, see [TLS](/configuration/shared/tls/#outbound).
### Dial Fields ### Dial Fields
See [Dial Fields](/configuration/shared/dial/) for details. See [Dial Fields](/configuration/shared/dial) for details.

View File

@@ -26,7 +26,7 @@
!!! warning "" !!! warning ""
QUIC, which is required by hysteria is not included by default, see [Installation](./#installation). QUIC, which is required by hysteria is not included by default, see [Installation](/#installation).
### Fields ### Fields
@@ -113,4 +113,4 @@ TLS configuration, see [TLS](/configuration/shared/tls/#outbound).
### Dial Fields ### Dial Fields
See [Dial Fields](/configuration/shared/dial/) for details. See [Dial Fields](/configuration/shared/dial) for details.

View File

@@ -24,15 +24,7 @@
!!! warning "" !!! warning ""
QUIC, which is required by Hysteria2 is not included by default, see [Installation](./#installation). QUIC, which is required by Hysteria2 is not included by default, see [Installation](/#installation).
!!! warning "Difference from official Hysteria2"
The official Hysteria2 supports an authentication method called **userpass**,
which essentially uses a combination of `<username>:<password>` as the actual password,
while sing-box does not provide this alias.
If you are planning to use sing-box with the official program,
please note that you will need to fill the combination as the password.
### Fields ### Fields
@@ -88,4 +80,4 @@ Enable debug information logging for Hysteria Brutal CC.
### Dial Fields ### Dial Fields
See [Dial Fields](/configuration/shared/dial/) for details. See [Dial Fields](/configuration/shared/dial) for details.

View File

@@ -26,12 +26,6 @@
默认安装不包含被 Hysteria2 依赖的 QUIC参阅 [安装](/zh/#_2)。 默认安装不包含被 Hysteria2 依赖的 QUIC参阅 [安装](/zh/#_2)。
!!! warning "与官方 Hysteria2 的区别"
官方程序支持一种名为 **userpass** 的验证方式,
本质上上是将用户名与密码的组合 `<username>:<password>` 作为实际上的密码,而 sing-box 不提供此别名。
要将 sing-box 与官方程序一起使用, 您需要填写该组合作为实际密码。
### 字段 ### 字段
#### server #### server
@@ -50,7 +44,7 @@
最大带宽。 最大带宽。
如果为空,将使用 BBR 拥塞控制算法而不是 Hysteria CC。 如果为空,将使用 BBR 流量控制算法而不是 Hysteria CC。
#### obfs.type #### obfs.type

View File

@@ -16,26 +16,26 @@
### Fields ### Fields
| Type | Format | | Type | Format |
|----------------|---------------------------------| |----------------|--------------------------------|
| `direct` | [Direct](./direct/) | | `direct` | [Direct](./direct) |
| `block` | [Block](./block/) | | `block` | [Block](./block) |
| `socks` | [SOCKS](./socks/) | | `socks` | [SOCKS](./socks) |
| `http` | [HTTP](./http/) | | `http` | [HTTP](./http) |
| `shadowsocks` | [Shadowsocks](./shadowsocks/) | | `shadowsocks` | [Shadowsocks](./shadowsocks) |
| `vmess` | [VMess](./vmess/) | | `vmess` | [VMess](./vmess) |
| `trojan` | [Trojan](./trojan/) | | `trojan` | [Trojan](./trojan) |
| `wireguard` | [Wireguard](./wireguard/) | | `wireguard` | [Wireguard](./wireguard) |
| `hysteria` | [Hysteria](./hysteria/) | | `hysteria` | [Hysteria](./hysteria) |
| `shadowsocksr` | [ShadowsocksR](./shadowsocksr/) | | `shadowsocksr` | [ShadowsocksR](./shadowsocksr) |
| `vless` | [VLESS](./vless/) | | `vless` | [VLESS](./vless) |
| `shadowtls` | [ShadowTLS](./shadowtls/) | | `shadowtls` | [ShadowTLS](./shadowtls) |
| `tuic` | [TUIC](./tuic/) | | `tuic` | [TUIC](./tuic) |
| `hysteria2` | [Hysteria2](./hysteria2/) | | `hysteria2` | [Hysteria2](./hysteria2) |
| `tor` | [Tor](./tor/) | | `tor` | [Tor](./tor) |
| `ssh` | [SSH](./ssh/) | | `ssh` | [SSH](./ssh) |
| `dns` | [DNS](./dns/) | | `dns` | [DNS](./dns) |
| `selector` | [Selector](./selector/) | | `selector` | [Selector](./selector) |
| `urltest` | [URLTest](./urltest/) | | `urltest` | [URLTest](./urltest) |
#### tag #### tag

View File

@@ -16,26 +16,26 @@
### 字段 ### 字段
| 类型 | 格式 | | 类型 | 格式 |
|----------------|---------------------------------| |----------------|--------------------------------|
| `direct` | [Direct](./direct/) | | `direct` | [Direct](./direct) |
| `block` | [Block](./block/) | | `block` | [Block](./block) |
| `socks` | [SOCKS](./socks/) | | `socks` | [SOCKS](./socks) |
| `http` | [HTTP](./http/) | | `http` | [HTTP](./http) |
| `shadowsocks` | [Shadowsocks](./shadowsocks/) | | `shadowsocks` | [Shadowsocks](./shadowsocks) |
| `vmess` | [VMess](./vmess/) | | `vmess` | [VMess](./vmess) |
| `trojan` | [Trojan](./trojan/) | | `trojan` | [Trojan](./trojan) |
| `wireguard` | [Wireguard](./wireguard/) | | `wireguard` | [Wireguard](./wireguard) |
| `hysteria` | [Hysteria](./hysteria/) | | `hysteria` | [Hysteria](./hysteria) |
| `shadowsocksr` | [ShadowsocksR](./shadowsocksr/) | | `shadowsocksr` | [ShadowsocksR](./shadowsocksr) |
| `vless` | [VLESS](./vless/) | | `vless` | [VLESS](./vless) |
| `shadowtls` | [ShadowTLS](./shadowtls/) | | `shadowtls` | [ShadowTLS](./shadowtls) |
| `tuic` | [TUIC](./tuic/) | | `tuic` | [TUIC](./tuic) |
| `hysteria2` | [Hysteria2](./hysteria2/) | | `hysteria2` | [Hysteria2](./hysteria2) |
| `tor` | [Tor](./tor/) | | `tor` | [Tor](./tor) |
| `ssh` | [SSH](./ssh/) | | `ssh` | [SSH](./ssh) |
| `dns` | [DNS](./dns/) | | `dns` | [DNS](./dns) |
| `selector` | [Selector](./selector/) | | `selector` | [Selector](./selector) |
| `urltest` | [URLTest](./urltest/) | | `urltest` | [URLTest](./urltest) |
#### tag #### tag

View File

@@ -15,7 +15,7 @@
} }
``` ```
!!! quote "" !!! error ""
The selector can only be controlled through the [Clash API](/configuration/experimental#clash-api-fields) currently. The selector can only be controlled through the [Clash API](/configuration/experimental#clash-api-fields) currently.

View File

@@ -15,7 +15,7 @@
} }
``` ```
!!! quote "" !!! error ""
选择器目前只能通过 [Clash API](/zh/configuration/experimental#clash-api) 来控制。 选择器目前只能通过 [Clash API](/zh/configuration/experimental#clash-api) 来控制。

View File

@@ -89,14 +89,14 @@ Both is enabled by default.
UDP over TCP configuration. UDP over TCP configuration.
See [UDP Over TCP](/configuration/shared/udp-over-tcp/) for details. See [UDP Over TCP](/configuration/shared/udp-over-tcp) for details.
Conflict with `multiplex`. Conflict with `multiplex`.
#### multiplex #### multiplex
See [Multiplex](/configuration/shared/multiplex#outbound) for details. Multiplex configuration, see [Multiplex](/configuration/shared/multiplex).
### Dial Fields ### Dial Fields
See [Dial Fields](/configuration/shared/dial/) for details. See [Dial Fields](/configuration/shared/dial) for details.

View File

@@ -89,13 +89,13 @@ Shadowsocks SIP003 插件参数。
UDP over TCP 配置。 UDP over TCP 配置。
参阅 [UDP Over TCP](/zh/configuration/shared/udp-over-tcp/)。 参阅 [UDP Over TCP](/zh/configuration/shared/udp-over-tcp)。
`multiplex` 冲突。 `multiplex` 冲突。
#### multiplex #### multiplex
参阅 [多路复用](/zh/configuration/shared/multiplex#outbound)。 多路复用配置, 参阅 [多路复用](/zh/configuration/shared/multiplex)。
### 拨号字段 ### 拨号字段

View File

@@ -25,7 +25,7 @@
!!! warning "" !!! warning ""
ShadowsocksR is not included by default, see [Installation](./#installation). ShadowsocksR is not included by default, see [Installation](/#installation).
### Fields ### Fields
@@ -103,4 +103,4 @@ Both is enabled by default.
### Dial Fields ### Dial Fields
See [Dial Fields](/configuration/shared/dial/) for details. See [Dial Fields](/configuration/shared/dial) for details.

View File

@@ -53,4 +53,4 @@ TLS configuration, see [TLS](/configuration/shared/tls/#outbound).
### Dial Fields ### Dial Fields
See [Dial Fields](/configuration/shared/dial/) for details. See [Dial Fields](/configuration/shared/dial) for details.

View File

@@ -59,8 +59,8 @@ Both is enabled by default.
UDP over TCP protocol settings. UDP over TCP protocol settings.
See [UDP Over TCP](/configuration/shared/udp-over-tcp/) for details. See [UDP Over TCP](/configuration/shared/udp-over-tcp) for details.
### Dial Fields ### Dial Fields
See [Dial Fields](/configuration/shared/dial/) for details. See [Dial Fields](/configuration/shared/dial) for details.

View File

@@ -59,7 +59,7 @@ SOCKS5 密码。
UDP over TCP 配置。 UDP over TCP 配置。
参阅 [UDP Over TCP](/zh/configuration/shared/udp-over-tcp/)。 参阅 [UDP Over TCP](/zh/configuration/shared/udp-over-tcp)。
### 拨号字段 ### 拨号字段

View File

@@ -68,4 +68,4 @@ Client version. Random version will be used if empty.
### Dial Fields ### Dial Fields
See [Dial Fields](/configuration/shared/dial/) for details. See [Dial Fields](/configuration/shared/dial) for details.

View File

@@ -18,7 +18,7 @@
!!! info "" !!! info ""
Embedded tor is not included by default, see [Installation](./#installation). Embedded tor is not included by default, see [Installation](/#installation).
### Fields ### Fields
@@ -48,4 +48,4 @@ See [tor(1)](https://linux.die.net/man/1/tor) for details.
### Dial Fields ### Dial Fields
See [Dial Fields](/configuration/shared/dial/) for details. See [Dial Fields](/configuration/shared/dial) for details.

View File

@@ -51,12 +51,12 @@ TLS configuration, see [TLS](/configuration/shared/tls/#outbound).
#### multiplex #### multiplex
See [Multiplex](/configuration/shared/multiplex#outbound) for details. Multiplex configuration, see [Multiplex](/configuration/shared/multiplex).
#### transport #### transport
V2Ray Transport configuration, see [V2Ray Transport](/configuration/shared/v2ray-transport/). V2Ray Transport configuration, see [V2Ray Transport](/configuration/shared/v2ray-transport).
### Dial Fields ### Dial Fields
See [Dial Fields](/configuration/shared/dial/) for details. See [Dial Fields](/configuration/shared/dial) for details.

View File

@@ -51,11 +51,11 @@ TLS 配置, 参阅 [TLS](/zh/configuration/shared/tls/#outbound)。
#### multiplex #### multiplex
参阅 [多路复用](/zh/configuration/shared/multiplex#outbound)。 多路复用配置, 参阅 [多路复用](/zh/configuration/shared/multiplex)。
#### transport #### transport
V2Ray 传输配置,参阅 [V2Ray 传输层](/zh/configuration/shared/v2ray-transport/)。 V2Ray 传输配置,参阅 [V2Ray 传输层](/zh/configuration/shared/v2ray-transport)。
### 拨号字段 ### 拨号字段

View File

@@ -23,7 +23,7 @@
!!! warning "" !!! warning ""
QUIC, which is required by TUIC is not included by default, see [Installation](./#installation). QUIC, which is required by TUIC is not included by default, see [Installation](/#installation).
### Fields ### Fields
@@ -72,7 +72,7 @@ Conflict with `udp_over_stream`.
#### udp_over_stream #### udp_over_stream
This is the TUIC port of the [UDP over TCP protocol](/configuration/shared/udp-over-tcp/), designed to provide a QUIC This is the TUIC port of the [UDP over TCP protocol](/configuration/shared/udp-over-tcp), designed to provide a QUIC
stream based UDP relay mode that TUIC does not provide. Since it is an add-on protocol, you will need to use sing-box or stream based UDP relay mode that TUIC does not provide. Since it is an add-on protocol, you will need to use sing-box or
another program compatible with the protocol as a server. another program compatible with the protocol as a server.
@@ -97,4 +97,4 @@ TLS configuration, see [TLS](/configuration/shared/tls/#outbound).
### Dial Fields ### Dial Fields
See [Dial Fields](/configuration/shared/dial/) for details. See [Dial Fields](/configuration/shared/dial) for details.

View File

@@ -51,7 +51,7 @@ TUIC 用户密码
#### congestion_control #### congestion_control
QUIC 拥塞控制算法 QUIC 流量控制算法
可选值: `cubic`, `new_reno`, `bbr` 可选值: `cubic`, `new_reno`, `bbr`
@@ -70,7 +70,7 @@ UDP 包中继模式
#### udp_over_stream #### udp_over_stream
这是 TUIC 的 [UDP over TCP 协议](/configuration/shared/udp-over-tcp/) 移植, 旨在提供 TUIC 不提供的 基于 QUIC 流的 UDP 中继模式。 由于它是一个附加协议,因此您需要使用 sing-box 或其他兼容的程序作为服务器。 这是 TUIC 的 [UDP over TCP 协议](/configuration/shared/udp-over-tcp) 移植, 旨在提供 TUIC 不提供的 基于 QUIC 流的 UDP 中继模式。 由于它是一个附加协议,因此您需要使用 sing-box 或其他兼容的程序作为服务器。
此模式在正确的 UDP 代理场景中没有任何积极作用,仅适用于中继流式 UDP 流量(基本上是 QUIC 流)。 此模式在正确的 UDP 代理场景中没有任何积极作用,仅适用于中继流式 UDP 流量(基本上是 QUIC 流)。

Some files were not shown because too many files have changed in this diff Show More