|
@@ -2,7 +2,6 @@ package gatewayServer
|
|
|
|
|
|
import (
|
|
import (
|
|
"errors"
|
|
"errors"
|
|
- "fmt"
|
|
|
|
)
|
|
)
|
|
|
|
|
|
// 查询
|
|
// 查询
|
|
@@ -24,7 +23,9 @@ func s2c8003Query(devId string, subCode CmdCode, data string) error {
|
|
return nil
|
|
return nil
|
|
}
|
|
}
|
|
|
|
|
|
-var sp = "add=name:isapi;proto:tcp;src_dport:8848;dest_ip:192.168.1.64;dest_port:80"
|
|
|
|
|
|
+var add1 = "add=name:test1;proto:tcp;src_dport:8888;dest_ip:192.168.1.61;dest_port:80"
|
|
|
|
+var add2 = "add=name:test2;proto:tcp;src_dport:8889;dest_ip:192.168.1.60;dest_port:80"
|
|
|
|
+var apply = "apply"
|
|
|
|
|
|
// 配置
|
|
// 配置
|
|
func s2c8004Set(devId string, subCode CmdCode, data string) error {
|
|
func s2c8004Set(devId string, subCode CmdCode, data string) error {
|
|
@@ -39,7 +40,6 @@ func s2c8004Set(devId string, subCode CmdCode, data string) error {
|
|
if !ok {
|
|
if !ok {
|
|
return errors.New("连接不在cMap中")
|
|
return errors.New("连接不在cMap中")
|
|
}
|
|
}
|
|
- fmt.Println("!!!!!!!!!!!!!!!")
|
|
|
|
_, err := c.Write(Pack(a))
|
|
_, err := c.Write(Pack(a))
|
|
if err != nil {
|
|
if err != nil {
|
|
return err
|
|
return err
|