|
|
@@ -27,11 +27,10 @@ func main() {
|
|
|
time.Sleep(2 * time.Second)
|
|
|
|
|
|
// type IP
|
|
|
- /*
|
|
|
- IPAddress := net.ParseIP(os.Args[2])
|
|
|
- SubNet := net.ParseIP(os.Args[3])
|
|
|
- GateW := net.ParseIP(os.Args[4])
|
|
|
- */
|
|
|
+
|
|
|
+ IPAddress := net.ParseIP(os.Args[2])
|
|
|
+ SubNet := net.ParseIP(os.Args[3])
|
|
|
+ GateW := net.ParseIP(os.Args[4])
|
|
|
|
|
|
//create fucking DHCP IP
|
|
|
err := tun.SetDHCPMasq(IPAddress, SubNet, GateW, net.IP([]byte{0, 0, 0, 0}))
|
|
|
@@ -98,7 +97,7 @@ func rcv(w http.ResponseWriter, req *http.Request) {
|
|
|
}
|
|
|
data, err := hex.DecodeString(x[0])
|
|
|
if err != nil {
|
|
|
- panic(err)
|
|
|
+ log.Println(err)
|
|
|
}
|
|
|
log.Println("RECV<<", dde(data))
|
|
|
tun.Write(dde(data))
|