Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d530c724c0 | ||
|
|
7f698c1104 | ||
|
|
7a4a44c6d2 | ||
|
|
44277e5dd2 | ||
|
|
1f470c69c4 |
29
.github/workflows/docker.yml
vendored
29
.github/workflows/docker.yml
vendored
@@ -4,13 +4,35 @@ on:
|
|||||||
release:
|
release:
|
||||||
types:
|
types:
|
||||||
- released
|
- released
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: "The tag version you want to build"
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Get commit to build
|
||||||
|
id: ref
|
||||||
|
run: |-
|
||||||
|
if [[ -z "${{ github.event.inputs.tag }}" ]]; then
|
||||||
|
ref="${{ github.ref_name }}"
|
||||||
|
else
|
||||||
|
ref="${{ github.event.inputs.tag }}"
|
||||||
|
fi
|
||||||
|
echo "ref=$ref"
|
||||||
|
echo "ref=$ref" >> $GITHUB_OUTPUT
|
||||||
|
if [[ $ref == *"-"* ]]; then
|
||||||
|
latest=latest-beta
|
||||||
|
else
|
||||||
|
latest=latest
|
||||||
|
fi
|
||||||
|
echo "latest=$latest"
|
||||||
|
echo "latest=$latest" >> $GITHUB_OUTPUT
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
|
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
|
||||||
|
with:
|
||||||
|
ref: ${{ steps.ref.outputs.ref }}
|
||||||
- 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
|
||||||
@@ -30,10 +52,11 @@ jobs:
|
|||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
platforms: linux/386,linux/amd64,linux/arm64,linux/s390x
|
platforms: linux/386,linux/amd64,linux/arm64,linux/s390x
|
||||||
|
context: .
|
||||||
target: dist
|
target: dist
|
||||||
build-args: |
|
build-args: |
|
||||||
BUILDKIT_CONTEXT_KEEP_GIT_DIR=1
|
BUILDKIT_CONTEXT_KEEP_GIT_DIR=1
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/sagernet/sing-box:latest
|
ghcr.io/sagernet/sing-box:${{ steps.ref.outputs.latest }}
|
||||||
ghcr.io/sagernet/sing-box:${{ github.ref_name }}
|
ghcr.io/sagernet/sing-box:${{ steps.ref.outputs.ref }}
|
||||||
push: true
|
push: true
|
||||||
|
|||||||
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: ^1.22
|
go-version: ^1.22
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@v5
|
uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
args: --timeout=30m
|
args: --timeout=30m
|
||||||
|
|||||||
Submodule clients/android updated: c0ce4cc97d...9d463b269a
@@ -2,6 +2,11 @@
|
|||||||
icon: material/alert-decagram
|
icon: material/alert-decagram
|
||||||
---
|
---
|
||||||
|
|
||||||
|
#### 1.8.14
|
||||||
|
|
||||||
|
* Fix hysteria2 panic
|
||||||
|
* Fixes and improvements
|
||||||
|
|
||||||
#### 1.8.13
|
#### 1.8.13
|
||||||
|
|
||||||
* Fix fake-ip mapping
|
* Fix fake-ip mapping
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -29,7 +29,7 @@ require (
|
|||||||
github.com/sagernet/sing v0.3.8
|
github.com/sagernet/sing v0.3.8
|
||||||
github.com/sagernet/sing-dns v0.1.14
|
github.com/sagernet/sing-dns v0.1.14
|
||||||
github.com/sagernet/sing-mux v0.2.0
|
github.com/sagernet/sing-mux v0.2.0
|
||||||
github.com/sagernet/sing-quic v0.1.12
|
github.com/sagernet/sing-quic v0.1.15
|
||||||
github.com/sagernet/sing-shadowsocks v0.2.6
|
github.com/sagernet/sing-shadowsocks v0.2.6
|
||||||
github.com/sagernet/sing-shadowsocks2 v0.2.0
|
github.com/sagernet/sing-shadowsocks2 v0.2.0
|
||||||
github.com/sagernet/sing-shadowtls v0.1.4
|
github.com/sagernet/sing-shadowtls v0.1.4
|
||||||
|
|||||||
6
go.sum
6
go.sum
@@ -112,8 +112,10 @@ github.com/sagernet/sing-dns v0.1.14 h1:kxE/Ik3jMXmD3sXsdt9MgrNzLFWt64mghV+MQqzy
|
|||||||
github.com/sagernet/sing-dns v0.1.14/go.mod h1:AA+vZMNovuPN5i/sPnfF6756Nq94nzb5nXodMWbta5w=
|
github.com/sagernet/sing-dns v0.1.14/go.mod h1:AA+vZMNovuPN5i/sPnfF6756Nq94nzb5nXodMWbta5w=
|
||||||
github.com/sagernet/sing-mux v0.2.0 h1:4C+vd8HztJCWNYfufvgL49xaOoOHXty2+EAjnzN3IYo=
|
github.com/sagernet/sing-mux v0.2.0 h1:4C+vd8HztJCWNYfufvgL49xaOoOHXty2+EAjnzN3IYo=
|
||||||
github.com/sagernet/sing-mux v0.2.0/go.mod h1:khzr9AOPocLa+g53dBplwNDz4gdsyx/YM3swtAhlkHQ=
|
github.com/sagernet/sing-mux v0.2.0/go.mod h1:khzr9AOPocLa+g53dBplwNDz4gdsyx/YM3swtAhlkHQ=
|
||||||
github.com/sagernet/sing-quic v0.1.12 h1:4KjG7LASZck0svGDfzf3aVNidRRQRC/w2HUMk/PHiNE=
|
github.com/sagernet/sing-quic v0.1.14 h1:gzQAuvxDyh9oz3J595KchYpi0HcHOvQWeUG20FWc45A=
|
||||||
github.com/sagernet/sing-quic v0.1.12/go.mod h1:L+VtzvuPbf8VW8F4R7KiygqpXY4lO7t2wwcQuHjh8Ew=
|
github.com/sagernet/sing-quic v0.1.14/go.mod h1:L+VtzvuPbf8VW8F4R7KiygqpXY4lO7t2wwcQuHjh8Ew=
|
||||||
|
github.com/sagernet/sing-quic v0.1.15 h1:LGWPxQEeg89+68RHP7HtAV0RZeEWQikUqOfE9nYmr2A=
|
||||||
|
github.com/sagernet/sing-quic v0.1.15/go.mod h1:L+VtzvuPbf8VW8F4R7KiygqpXY4lO7t2wwcQuHjh8Ew=
|
||||||
github.com/sagernet/sing-shadowsocks v0.2.6 h1:xr7ylAS/q1cQYS8oxKKajhuQcchd5VJJ4K4UZrrpp0s=
|
github.com/sagernet/sing-shadowsocks v0.2.6 h1:xr7ylAS/q1cQYS8oxKKajhuQcchd5VJJ4K4UZrrpp0s=
|
||||||
github.com/sagernet/sing-shadowsocks v0.2.6/go.mod h1:j2YZBIpWIuElPFL/5sJAj470bcn/3QQ5lxZUNKLDNAM=
|
github.com/sagernet/sing-shadowsocks v0.2.6/go.mod h1:j2YZBIpWIuElPFL/5sJAj470bcn/3QQ5lxZUNKLDNAM=
|
||||||
github.com/sagernet/sing-shadowsocks2 v0.2.0 h1:wpZNs6wKnR7mh1wV9OHwOyUr21VkS3wKFHi+8XwgADg=
|
github.com/sagernet/sing-shadowsocks2 v0.2.0 h1:wpZNs6wKnR7mh1wV9OHwOyUr21VkS3wKFHi+8XwgADg=
|
||||||
|
|||||||
@@ -287,8 +287,23 @@ func (g *URLTestGroup) Close() error {
|
|||||||
|
|
||||||
func (g *URLTestGroup) Select(network string) (adapter.Outbound, bool) {
|
func (g *URLTestGroup) Select(network string) (adapter.Outbound, bool) {
|
||||||
var minDelay uint16
|
var minDelay uint16
|
||||||
var minTime time.Time
|
|
||||||
var minOutbound adapter.Outbound
|
var minOutbound adapter.Outbound
|
||||||
|
switch network {
|
||||||
|
case N.NetworkTCP:
|
||||||
|
if g.selectedOutboundTCP != nil {
|
||||||
|
if history := g.history.LoadURLTestHistory(RealTag(g.selectedOutboundTCP)); history != nil {
|
||||||
|
minOutbound = g.selectedOutboundTCP
|
||||||
|
minDelay = history.Delay
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case N.NetworkUDP:
|
||||||
|
if g.selectedOutboundUDP != nil {
|
||||||
|
if history := g.history.LoadURLTestHistory(RealTag(g.selectedOutboundUDP)); history != nil {
|
||||||
|
minOutbound = g.selectedOutboundUDP
|
||||||
|
minDelay = history.Delay
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
for _, detour := range g.outbounds {
|
for _, detour := range g.outbounds {
|
||||||
if !common.Contains(detour.Network(), network) {
|
if !common.Contains(detour.Network(), network) {
|
||||||
continue
|
continue
|
||||||
@@ -297,9 +312,8 @@ func (g *URLTestGroup) Select(network string) (adapter.Outbound, bool) {
|
|||||||
if history == nil {
|
if history == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if minDelay == 0 || minDelay > history.Delay+g.tolerance || minDelay > history.Delay-g.tolerance && minTime.Before(history.Time) {
|
if minDelay == 0 || minDelay > history.Delay+g.tolerance {
|
||||||
minDelay = history.Delay
|
minDelay = history.Delay
|
||||||
minTime = history.Time
|
|
||||||
minOutbound = detour
|
minOutbound = detour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user