checker: for each tun IP
This commit is contained in:
parent
0af7437693
commit
9cd237daff
3 changed files with 90 additions and 79 deletions
|
|
@ -104,7 +104,11 @@ type TunnelToken struct {
|
|||
}
|
||||
|
||||
func (tt *TunnelToken) GetStudentIP() string {
|
||||
return fmt.Sprintf("%s%x", StudentIP(tt.IdStudent).String(), tt.SuffixIP)
|
||||
if tt.SuffixIP == 0 {
|
||||
return fmt.Sprintf("%s%x", StudentIP(tt.IdStudent).String(), 1)
|
||||
} else {
|
||||
return fmt.Sprintf("%s%x", StudentIP(tt.IdStudent).String(), tt.SuffixIP)
|
||||
}
|
||||
}
|
||||
|
||||
func TokenFromText(token string) []byte {
|
||||
|
|
|
|||
Reference in a new issue