# Secrets for authentication using CHAP
# client	server	secret			IP addresses

#~~ envar Shenv, Suobj, Nmulti, Nno, Nidx;

#~~ if (%Nmulti == 0) {
#~~		if ($S_3G_AUTOBAK_STATUS == 1) {
#~~			if ($C_3G_USER != '') {
#~  !!!     !!! ($C_3G_USER/str) ($C_3G_PASSWORD/str)
   "123" * "123" *
#~~			} else {
   "guest" * "guest" *
#~~			}
#~~		} else if ($S_FAILOVER_STATUS == 1) {
#~~			if ($C_FAILOVER_WANTYPE == 2) {
#~  !!!     !!! ($C_3G_USER/str) ($C_3G_PASSWORD/str)
   "123" * "123" *
#~~			} else if ($C_FAILOVER_WANTYPE == 6) {
#~  !!!!     !!!!!!!! ($C_PPPOE_USER/str) ($C_PPPOE_PASSWORD/str)
   "test" * "testtest" *
#~~			} else {
   "guest" * "guest" *
#~~			}
#~~		} else {
#~~			if ($C_LOCAL_WANTYPE == 64) {
#~  !!!!     !!!!!!!! ($C_PPPOE_USER/str) ($C_PPPOE_PASSWORD/str)
   "test" * "testtest" *
#~~			} else if ($C_LOCAL_WANTYPE == 80) {
#~   !!!!     !!!!!!!! ($C_PPPOE_USER/str) ($C_PPPOE_PASSWORD/str)
#~# "test" * "testtest" *
#~~			} else if ($C_LOCAL_WANTYPE == 96) {
#~   !!!!     !!!!!!!! ($C_PPTP_USER/str) ($C_PPTP_PASSWORD/str)
#~# "test" * "testtest" *
#~~			} else if ($C_LOCAL_WANTYPE == 128) {
#~   !!!!     !!!!!!!! ($C_L2TP_USER/str) ($C_L2TP_PASSWORD/str)
#~# "test" * "testtest" *
#~~			} else if ($C_LOCAL_WANTYPE == 16) {
#~~				if ($C_3G_USER != '') {
#~  !!!     !!! ($C_3G_USER/str) ($C_3G_PASSWORD/str)
   "123" * "123" *
#~~				} else {
   "guest" * "guest" *
#~~				}
#~~			} else if ($C_LOCAL_WANTYPE == 17) {
#~   !!!!     !!!!!!!! ($C_IBURST_USER/str) ($C_IBURST_PASSWORD/str)
    "test" * "testtest" *
#~~			} else if ($C_LOCAL_WANTYPE == 144) {
#~   !!!!     !!!!!!!! ($C_RS232_USER/str) ($C_RS232_PASSWORD/str)
    "test" * "testtest" *
#~~			} else {
   "guest" * "guest" *
#~~			}
#~~		}

# the flowing for Multisession
#~~   if ($C_LOCAL_WANTYPE == 65) {
#~~       for (%i=0; %i<6; %i++) {
#~~           if ($C_PPPOE_ML_ENABLE[%i] == 1) {
#~  !!!!     !!!!!!!! ($C_PPPOE_USER[%i]/str) ($C_PPPOE_PASSWORD[%i]/str)
   "test" * "testtest"
#~~           }
#~~       } 
#~~   }
#~~ } else if (%Nmulti == 2) {
#~~   if ($C_LOCAL_VOIPWAN_WANTYPE[%Nidx] == 64) {
#~  !!!!     !!!!!!!! ($C_PPPOE_VOIPWAN_USER[%Nno]/str) ($C_PPPOE_VOIPWAN_PASSWORD[%Nno]/str)
   "test" * "testtest" *
#~~		  } else {
   "guest" * "guest" *
#~~		  }
#~~ } else {
#~~   if ($C_LOCAL_MULTIWAN_WANTYPE[%Nidx] == 64) {
#~  !!!!     !!!!!!!! ($C_PPPOE_MULTIWAN_USER[%Nno]/str) ($C_PPPOE_MULTIWAN_PASSWORD[%Nno]/str)
   "test" * "testtest" *
#~~   } else if ($C_LOCAL_MULTIWAN_WANTYPE[%Nidx] == 80) {
#~  !!!!     !!!!!!!! ($C_PPPOE_MULTIWAN_USER[%Nno]/str) ($C_PPPOE_MULTIWAN_PASSWORD[%Nno]/str)
   "test" * "testtest" *
#~~   } else if ($C_LOCAL_MULTIWAN_WANTYPE[%Nidx] == 96) {
#~   !!!!     !!!!!!!! ($C_PPTP_MULTIWAN_USER[%Nno]/str) ($C_PPTP_MULTIWAN_PASSWORD[%Nno]/str)
#~# "test" * "testtest" *
#~~   } else if ($C_LOCAL_MULTIWAN_WANTYPE[%Nidx] == 128) {
#~      !!!!     !!!!!!!! ($C_L2TP_MULTIWAN_USER[%Nno]/str) ($C_L2TP_MULTIWAN_PASSWORD[%Nno]/str)
#~#    "test" * "testtest" *
#~~   } else if ($C_LOCAL_MULTIWAN_WANTYPE[%Nidx] == 16) {
#~~		  if ($C_3G_MULTIWAN_USER[%Nno] != '') {
#~  !!!     !!! ($C_3G_MULTIWAN_USER[%Nno]/str) ($C_3G_MULTIWAN_PASSWORD[%Nno]/str)
   "123" * "123" *
#~~		  } else {
   "guest" * "guest" *
#~~		  }
#~~   } else if ($C_LOCAL_MULTIWAN_WANTYPE[%Nidx] == 17) {
#~  !!!!     !!!!!!!! ($C_IBURST_MULTIWAN_USER[%Nno]/str) ($C_IBURST_MULTIWAN_PASSWORD[%Nno]/str)
   "test" * "testtest" *
#~~   }
#~~ }

# "t0326069" * "ac7mmpjp"
# the flowing for PPTP server
#~~  for (%i=0; %i<10; %i++) {
#~~       if ($C_PPTPSERV_ACCOUNT_USER[%i] != None) {
#~  !!!!         !!!!!!!!   ($C_PPTPSERV_ACCOUNT_USER[%i]/str/"test") ($C_PPTPSERV_ACCOUNT_PASSWORD[%i]/str/"testtest")
   "test" pptpd "testtest" *
#~~       }
#~~  }

# the flowing for L2TP server
#~~  for (%i=0; %i<10; %i++) {
#~~       if ($C_L2TPSERV_ACCOUNT_USER[%i] != None) {
#~  !!!!         !!!!!!!!   ($C_L2TPSERV_ACCOUNT_USER[%i]/str/"test") ($C_L2TPSERV_ACCOUNT_PASSWORD[%i]/str/"testtest")
   "test" l2tpd "testtest" *
#~~       }
#~~  }

# the flowing for VPN client
#~~ if ($C_LOCAL_WANTYPE != 96) {
#~~     if ($C_LOCAL_WANTYPE != 128) {
#~~         for (%i=0; %i<10; %i++) {
#~~             if ($C_PPTP_CLI_USER_ENABLE[%i] == 1) {
#~     !!!!     !!!!!!!! ($C_PPTP_CLI_USER[%i]/str/"test") ($C_PPTP_CLI_PASSWORD[%i]/str/"testtest")
#~#   "test" * "testtest" *
#~~             }
#~~         }
#~~     }
#~~ }

#~~ if ($C_LOCAL_WANTYPE != 96) {
#~~     if ($C_LOCAL_WANTYPE != 128) {
#~~         for (%i=0; %i<10; %i++) {
#~~             if ($C_L2TP_CLI_USER_ENABLE[%i] == 1) {
#~     !!!!     !!!!!!!! ($C_L2TP_CLI_USER[%i]/str/"test") ($C_L2TP_CLI_PASSWORD[%i]/str/"testtest")
#~#   "test" * "testtest" *
#~~             }
#~~         }
#~~     }
#~~ }
