mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-13 21:54:13 +08:00
Merge remote-tracking branch 'upstream/dev-next' into dev-next
This commit is contained in:
commit
5c1e3aa956
@ -5,6 +5,7 @@ import (
|
|||||||
"net/http/pprof"
|
"net/http/pprof"
|
||||||
"runtime"
|
"runtime"
|
||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/sagernet/sing-box/common/humanize"
|
"github.com/sagernet/sing-box/common/humanize"
|
||||||
"github.com/sagernet/sing-box/log"
|
"github.com/sagernet/sing-box/log"
|
||||||
@ -47,12 +48,20 @@ func applyDebugListenOption(options option.DebugOptions) {
|
|||||||
encoder.SetIndent("", " ")
|
encoder.SetIndent("", " ")
|
||||||
encoder.Encode(memObject)
|
encoder.Encode(memObject)
|
||||||
})
|
})
|
||||||
r.HandleFunc("/pprof", pprof.Index)
|
r.Route("/pprof", func(r chi.Router) {
|
||||||
r.HandleFunc("/pprof/*", pprof.Index)
|
r.HandleFunc("/", func(writer http.ResponseWriter, request *http.Request) {
|
||||||
r.HandleFunc("/pprof/cmdline", pprof.Cmdline)
|
if !strings.HasSuffix(request.URL.Path, "/") {
|
||||||
r.HandleFunc("/pprof/profile", pprof.Profile)
|
http.Redirect(writer, request, request.URL.Path+"/", http.StatusMovedPermanently)
|
||||||
r.HandleFunc("/pprof/symbol", pprof.Symbol)
|
} else {
|
||||||
r.HandleFunc("/pprof/trace", pprof.Trace)
|
pprof.Index(writer, request)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
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,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build !linux
|
//go:build !(linux || darwin)
|
||||||
|
|
||||||
package box
|
package box
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
//go:build linux || darwin
|
||||||
|
|
||||||
package box
|
package box
|
||||||
|
|
||||||
import (
|
import (
|
@ -173,10 +173,9 @@ By default, the maximum version is currently TLS 1.3.
|
|||||||
|
|
||||||
#### cipher_suites
|
#### cipher_suites
|
||||||
|
|
||||||
The elliptic curves that will be used in an ECDHE handshake, in preference order.
|
A list of enabled TLS 1.0–1.2 cipher suites. The order of the list is ignored. Note that TLS 1.3 cipher suites are not configurable.
|
||||||
|
|
||||||
If empty, the default will be used. The client will use the first preference as the type for its key share in TLS 1.3.
|
If empty, a safe default list is used. The default cipher suites might change over time.
|
||||||
This may change in the future.
|
|
||||||
|
|
||||||
#### certificate
|
#### certificate
|
||||||
|
|
||||||
|
@ -170,12 +170,9 @@ TLS 版本值:
|
|||||||
|
|
||||||
#### cipher_suites
|
#### cipher_suites
|
||||||
|
|
||||||
将在 ECDHE 握手中使用的椭圆曲线,按优先顺序排列。
|
启用的 TLS 1.0-1.2密码套件的列表。列表的顺序被忽略。请注意,TLS 1.3 的密码套件是不可配置的。
|
||||||
|
|
||||||
如果为空,将使用默认值。
|
如果为空,则使用安全的默认列表。默认密码套件可能会随着时间的推移而改变。
|
||||||
|
|
||||||
客户端将使用第一个首选项作为其在 TLS 1.3 中的密钥共享类型。
|
|
||||||
这在未来可能会改变。
|
|
||||||
|
|
||||||
#### certificate
|
#### certificate
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user