mirror of https://github.com/bjdgyc/anylink.git
修复 openconnect 重连问题
This commit is contained in:
parent
33139a571d
commit
a59e480b61
|
@ -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
|
||||
|
@ -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
|
||||
|
|
|
@ -43,13 +43,13 @@ 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
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ func LinkTunnel(w http.ResponseWriter, r *http.Request) {
|
|||
cSess := sess.NewConn()
|
||||
if cSess == nil {
|
||||
log.Println(err)
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
w.WriteHeader(http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue