From e6550bc66d6af1d05c43bfd8c944f9720cf3b316 Mon Sep 17 00:00:00 2001 From: FDKevin Date: Wed, 9 Mar 2022 15:30:44 +0800 Subject: [PATCH] bug fixed --- cmd/net/cmd.go | 2 +- pkg/srun/portal.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/net/cmd.go b/cmd/net/cmd.go index ffacca1..9bb3b51 100644 --- a/cmd/net/cmd.go +++ b/cmd/net/cmd.go @@ -31,7 +31,7 @@ func init() { cobra.CheckErr(viper.BindPFlag("net.endpoint", Cmd.PersistentFlags().Lookup("endpoint"))) Cmd.PersistentFlags().StringP("acid", "a", "", "ac_id of srun") - resp, _, errs := gorequest.New().Get(viper.GetString("net.endpoint")).End() + resp, _, errs := gorequest.New().Get("http://www.baidu.com").End() if errs != nil { viper.SetDefault("net.acid", "0") } else if acid := resp.Request.URL.Query().Get("ac_id"); acid != "" { diff --git a/pkg/srun/portal.go b/pkg/srun/portal.go index 1a8dc2a..8424deb 100644 --- a/pkg/srun/portal.go +++ b/pkg/srun/portal.go @@ -14,7 +14,7 @@ func New(endpoint, acID string) *PortalServer { acID: acID, jsonpCallback: "jQuery112403771213770126085_" + timestampStr, timestampStr: timestampStr, - internetCheck: "https://www.baidu.com", + internetCheck: "http://www.baidu.com", } }