Skip to content

Commit

Permalink
Revert "兼容证书链不完整的订阅地址"
Browse files Browse the repository at this point in the history
This reverts commit d927db5.
  • Loading branch information
xmdhs committed Aug 27, 2023
1 parent c0fcda4 commit 691c51a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
filippo.io/intermediates v0.0.0-20230818021045-f5dbec6a99ea h1:j4xi8pB16I4o1z7gXIVYLfrIPlYqJQUyeDsBhCfqVAw=
filippo.io/intermediates v0.0.0-20230818021045-f5dbec6a99ea/go.mod h1:oFwJrtHxYeWR/Lhr/MC2TPSR+BsYpybldbpRKvSjggw=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg=
Expand Down
12 changes: 1 addition & 11 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"crypto/tls"
_ "embed"
"fmt"
"net/http"
Expand All @@ -12,7 +11,6 @@ import (

"log/slog"

"filippo.io/intermediates"
"github.com/xmdhs/clash2sfa/db"
"github.com/xmdhs/clash2sfa/handle"
"github.com/xmdhs/clash2sfa/utils"
Expand Down Expand Up @@ -44,21 +42,13 @@ func main() {
level := &slog.LevelVar{}
level.Set(slog.Level(leveln))

c := &http.Client{}
l := slog.New(&warpSlogHandle{
Handler: slog.NewJSONHandler(os.Stderr, &slog.HandlerOptions{
Level: level,
}),
})

tr := http.DefaultTransport.(*http.Transport).Clone()
tr.TLSClientConfig = &tls.Config{
InsecureSkipVerify: true,
VerifyConnection: intermediates.VerifyConnection,
}
c := &http.Client{
Timeout: 10 * time.Second,
}

mux := http.NewServeMux()
mux.HandleFunc("/put", handle.PutArg(db, l))
mux.HandleFunc("/sub", handle.Sub(c, db, configByte, l))
Expand Down

0 comments on commit 691c51a

Please sign in to comment.