Skip to content

Commit

Permalink
Use https for targetOutside
Browse files Browse the repository at this point in the history
Tunet would redirect http://www.baidu.com to http://auth4.tsinghua.edu.cn
thus returing HTTP 200, and keepOnlineLoop would not stop,
which is not wanted when not authed.

By using https, keepOnlineLoop would break, thus causing deauth->auth->online
loop again.
  • Loading branch information
ZenithalHourlyRate committed Jul 19, 2021
1 parent c865c72 commit 53fb215
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ USAGE:
auth-thu [options] online [online_options]
VERSION:
2.1.1
2.1.2
AUTHORS:
Yuxiang Zhang <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func keepAliveLoop(c *cli.Context, campusOnly bool) (ret error) {
return
}
targetInside := "https://www.tsinghua.edu.cn/"
targetOutside := "http://www.baidu.com/"
targetOutside := "https://www.baidu.com/"

stop := make(chan int, 1)
defer func() { stop <- 1 }()
Expand Down Expand Up @@ -442,7 +442,7 @@ func main() {
auth-thu [options] logout
auth-thu [options] online [online_options]`,
Usage: "Authenticating utility for Tsinghua",
Version: "2.1.1",
Version: "2.1.2",
HideHelp: true,
Flags: []cli.Flag{
&cli.StringFlag{Name: "username, u", Usage: "your TUNET account `name`"},
Expand Down

0 comments on commit 53fb215

Please sign in to comment.