From 797a2a7f9ff5d1fe7092508c4f56dae5f19c4a29 Mon Sep 17 00:00:00 2001 From: wyx2685 Date: Sun, 19 Nov 2023 17:31:13 +0900 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=B8=BASINGBOX=E5=86=85?= =?UTF-8?q?=E6=A0=B8=E5=A2=9E=E5=8A=A0REALITY=E7=9A=84PROXYPROTOCOL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/panel/node.go | 1 + core/sing/node.go | 1 + go.mod | 3 +-- go.sum | 6 ++---- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/api/panel/node.go b/api/panel/node.go index 1dc0071..976971b 100644 --- a/api/panel/node.go +++ b/api/panel/node.go @@ -78,6 +78,7 @@ type TlsSettings struct { ServerPort string `json:"server_port"` ShortId string `json:"short_id"` PrivateKey string `json:"private_key"` + Xver uint8 `json:"xver"` } type RealityConfig struct { diff --git a/core/sing/node.go b/core/sing/node.go index 6611079..04de6c8 100644 --- a/core/sing/node.go +++ b/core/sing/node.go @@ -74,6 +74,7 @@ func getInboundOptions(tag string, info *panel.NodeInfo, c *conf.Options) (optio Enabled: true, ShortID: []string{v.TlsSettings.ShortId}, PrivateKey: v.TlsSettings.PrivateKey, + Xver: v.TlsSettings.Xver, Handshake: option.InboundRealityHandshakeOptions{ ServerOptions: option.ServerOptions{ Server: dest, diff --git a/go.mod b/go.mod index 2af1b2a..98da17c 100644 --- a/go.mod +++ b/go.mod @@ -162,7 +162,6 @@ require ( github.com/sagernet/gvisor v0.0.0-20230930141345-5fef6f2e17ab // indirect github.com/sagernet/netlink v0.0.0-20220905062125-8043b4a9aa97 // indirect github.com/sagernet/quic-go v0.40.0 // indirect - github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 // indirect github.com/sagernet/sing-dns v0.1.11-0.20231116102430-5a2133f5d358 // indirect github.com/sagernet/sing-mux v0.1.5-0.20231109075101-6b086ed6bb07 // indirect github.com/sagernet/sing-quic v0.1.4-0.20231114135334-e2a6aab55cca // indirect @@ -231,6 +230,6 @@ require ( ) replace ( - github.com/sagernet/sing-box v1.7.0-beta.3 => github.com/wyx2685/sing-box_mod v0.0.0-20231118140036-c516c19fca43 + github.com/sagernet/sing-box v1.7.0-beta.3 => github.com/wyx2685/sing-box_mod v0.0.0-20231119064621-2853d5fe45d7 github.com/sagernet/sing-shadowsocks v0.2.4 => github.com/inazumav/sing-shadowsocks v0.0.0-20230815111927-7c68cbaeec5c ) diff --git a/go.sum b/go.sum index 70d683e..0428454 100644 --- a/go.sum +++ b/go.sum @@ -660,8 +660,6 @@ github.com/sagernet/netlink v0.0.0-20220905062125-8043b4a9aa97 h1:iL5gZI3uFp0X6E github.com/sagernet/netlink v0.0.0-20220905062125-8043b4a9aa97/go.mod h1:xLnfdiJbSp8rNqYEdIW/6eDO4mVoogml14Bh2hSiFpM= github.com/sagernet/quic-go v0.40.0 h1:DvQNPb72lzvNQDe9tcUyHTw8eRv6PLtM2mNYmdlzUMo= github.com/sagernet/quic-go v0.40.0/go.mod h1:VqtdhlbkeeG5Okhb3eDMb/9o0EoglReHunNT9ukrJAI= -github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 h1:5Th31OC6yj8byLGkEnIYp6grlXfo1QYUfiYFGjewIdc= -github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691/go.mod h1:B8lp4WkQ1PwNnrVMM6KyuFR20pU8jYBD+A4EhJovEXU= github.com/sagernet/sing v0.0.0-20220817130738-ce854cda8522/go.mod h1:QVsS5L/ZA2Q5UhQwLrn0Trw+msNd/NPGEhBKR/ioWiY= github.com/sagernet/sing v0.1.8/go.mod h1:jt1w2u7lJQFFSGLiRrRIs5YWmx4kAPfWuOejuDW9qMk= github.com/sagernet/sing v0.2.18-0.20231117150934-256fafcd99b6 h1:v6QQn8FPEwF2Wi4jQ0xWg7+NUWMIsnP8uoAG7lua1Qo= @@ -808,8 +806,8 @@ github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1Y github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= -github.com/wyx2685/sing-box_mod v0.0.0-20231118140036-c516c19fca43 h1:Nu5u8Bz1PqYKneXSG8JB4gIUgsOqwrEhuwWOY7xQ828= -github.com/wyx2685/sing-box_mod v0.0.0-20231118140036-c516c19fca43/go.mod h1:KbKnPU4/kmM/7YlGe3vzDvicQrstVO9JnejA//cMj8c= +github.com/wyx2685/sing-box_mod v0.0.0-20231119064621-2853d5fe45d7 h1:zcTY4nQDKQPU/W864pQ+08ppUH0zYAEcQrvqQAGVYwU= +github.com/wyx2685/sing-box_mod v0.0.0-20231119064621-2853d5fe45d7/go.mod h1:lHSOxvxrNaPhITvAJmJn0ZqKz5y28sLBqRvXwAdx3TU= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=