Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8311341960 |
+2
-1
@@ -17,7 +17,7 @@ import (
|
|||||||
// ./openp2p install -node hhd1207-222 -token YOUR-TOKEN -sharebandwidth 0 -peernode hhdhome-n1 -dstip 127.0.0.1 -dstport 50022 -protocol tcp -srcport 22
|
// ./openp2p install -node hhd1207-222 -token YOUR-TOKEN -sharebandwidth 0 -peernode hhdhome-n1 -dstip 127.0.0.1 -dstport 50022 -protocol tcp -srcport 22
|
||||||
func install() {
|
func install() {
|
||||||
gLog.Println(LvINFO, "openp2p start. version: ", OpenP2PVersion)
|
gLog.Println(LvINFO, "openp2p start. version: ", OpenP2PVersion)
|
||||||
gLog.Println(LvINFO, "Contact: QQ: 16947733, Email: [email protected]")
|
gLog.Println(LvINFO, "Contact: QQ group 16947733, Email [email protected]")
|
||||||
gLog.Println(LvINFO, "install start")
|
gLog.Println(LvINFO, "install start")
|
||||||
defer gLog.Println(LvINFO, "install end")
|
defer gLog.Println(LvINFO, "install end")
|
||||||
// auto uninstall
|
// auto uninstall
|
||||||
@@ -74,6 +74,7 @@ func install() {
|
|||||||
} else {
|
} else {
|
||||||
gLog.Println(LvINFO, "start openp2p service ok.")
|
gLog.Println(LvINFO, "start openp2p service ok.")
|
||||||
}
|
}
|
||||||
|
gLog.Println(LvINFO, "Visit WebUI on https://console.openp2p.cn")
|
||||||
}
|
}
|
||||||
|
|
||||||
func installByFilename() {
|
func installByFilename() {
|
||||||
|
|||||||
+2
-3
@@ -64,12 +64,11 @@ func P2PNetworkInstance(config *NetworkConfig) *P2PNetwork {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (pn *P2PNetwork) run() {
|
func (pn *P2PNetwork) run() {
|
||||||
go pn.readLoop()
|
|
||||||
go pn.autorunApp()
|
go pn.autorunApp()
|
||||||
heartbeatTimer := time.NewTicker(NetworkHeartbeatTime)
|
heartbeatTimer := time.NewTicker(NetworkHeartbeatTime)
|
||||||
for pn.running {
|
for pn.running {
|
||||||
select {
|
select {
|
||||||
case <-heartbeatTimer.C: // TODO: deal with connect failed, no send hb
|
case <-heartbeatTimer.C:
|
||||||
pn.write(MsgHeartbeat, 0, "")
|
pn.write(MsgHeartbeat, 0, "")
|
||||||
|
|
||||||
case <-pn.restartCh:
|
case <-pn.restartCh:
|
||||||
@@ -488,7 +487,7 @@ func (pn *P2PNetwork) init() error {
|
|||||||
err = errors.New("get local ip failed")
|
err = errors.New("get local ip failed")
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
go pn.readLoop()
|
||||||
pn.config.mac = getmac(pn.config.localIP)
|
pn.config.mac = getmac(pn.config.localIP)
|
||||||
pn.config.os = getOsName()
|
pn.config.os = getOsName()
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
const OpenP2PVersion = "3.5.0"
|
const OpenP2PVersion = "3.5.2"
|
||||||
const ProducnName string = "openp2p"
|
const ProducnName string = "openp2p"
|
||||||
const LeastSupportVersion = "3.0.0"
|
const LeastSupportVersion = "3.0.0"
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ require (
|
|||||||
github.com/nxadm/tail v1.4.8 // indirect
|
github.com/nxadm/tail v1.4.8 // indirect
|
||||||
github.com/onsi/ginkgo v1.16.4 // indirect
|
github.com/onsi/ginkgo v1.16.4 // indirect
|
||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
|
||||||
golang.org/x/mobile v0.0.0-20221020085226-b36e6246172e // indirect
|
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
|
||||||
golang.org/x/tools v0.1.12 // indirect
|
golang.org/x/tools v0.1.12 // indirect
|
||||||
|
|||||||
Reference in New Issue
Block a user