Skip to content

Commit

Permalink
修复 openconnect 重连问题
Browse files Browse the repository at this point in the history
  • Loading branch information
bjdgyc committed Feb 22, 2024
1 parent 33139a5 commit a59e480
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ require (
)

require (
github.com/aliyun/alibaba-cloud-sdk-go v1.62.679 // indirect
github.com/aliyun/alibaba-cloud-sdk-go v1.62.680 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cloudflare/cloudflare-go v0.88.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
Expand All @@ -61,8 +61,8 @@ require (
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.859 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.859 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.860 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.860 // indirect
github.com/toorop/go-dkim v0.0.0-20240103092955-90b7d1423f92 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.uber.org/multierr v1.11.0 // indirect
Expand Down
6 changes: 3 additions & 3 deletions server/handler/link_tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@ func LinkTunnel(w http.ResponseWriter, r *http.Request) {
// 判断session-token的值
cookie, err := r.Cookie("webvpn")
if err != nil || cookie.Value == "" {
w.WriteHeader(http.StatusBadRequest)
w.WriteHeader(http.StatusUnauthorized)
return
}

sess := sessdata.SToken2Sess(cookie.Value)
if sess == nil {
w.WriteHeader(http.StatusBadRequest)
w.WriteHeader(http.StatusUnauthorized)
return
}

// 开启link
cSess := sess.NewConn()
if cSess == nil {
log.Println(err)
w.WriteHeader(http.StatusBadRequest)
w.WriteHeader(http.StatusUnauthorized)
return
}

Expand Down

0 comments on commit a59e480

Please sign in to comment.