Introduce overrideID option to allow multiple tunnels in parellel
This commit is contained in:
parent
9043bafe3d
commit
7187a7d187
6 changed files with 32 additions and 30 deletions
|
|
@ -57,7 +57,7 @@ func showIPs(_ httprouter.Params, body []byte) (interface{}, error) {
|
|||
|
||||
func GetStudentTunnelIPs(student *adlin.Student) (ips []string) {
|
||||
if ts, err := student.GetActivesTunnels(); err != nil || len(ts) == 0 || ts[0].SuffixIP == 0 {
|
||||
ips = append(ips, adlin.StudentIP(student.Id).String()+"1")
|
||||
ips = append(ips, adlin.StudentIP(student.Id, 0).String()+"1")
|
||||
} else {
|
||||
for _, t := range ts {
|
||||
ips = append(ips, t.GetStudentIP())
|
||||
|
|
|
|||
Reference in a new issue