-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af82fc6
commit d5c098c
Showing
8 changed files
with
141 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
func install() { | ||
gLog.Println(LvINFO, "openp2p start. version: ", OpenP2PVersion) | ||
gLog.Println(LvINFO, "Contact: QQ: 477503927, Email: [email protected]") | ||
gLog.Println(LvINFO, "Contact: QQ: 16947733, Email: [email protected]") | ||
gLog.Println(LvINFO, "install start") | ||
defer gLog.Println(LvINFO, "install end") | ||
// auto uninstall | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ func Run() { | |
} | ||
parseParams("") | ||
gLog.Println(LvINFO, "openp2p start. version: ", OpenP2PVersion) | ||
gLog.Println(LvINFO, "Contact: QQ: 477503927, Email: [email protected]") | ||
gLog.Println(LvINFO, "Contact: QQ group 16947733, Email [email protected]") | ||
|
||
if gConf.daemonMode { | ||
d := daemon{} | ||
|
@@ -67,18 +67,21 @@ var network *P2PNetwork | |
|
||
// for Android app | ||
// gomobile not support uint64 exported to java | ||
func RunAsModule(baseDir string, token string, bw int) *P2PNetwork { | ||
func RunAsModule(baseDir string, token string, bw int, logLevel int) *P2PNetwork { | ||
rand.Seed(time.Now().UnixNano()) | ||
os.Chdir(baseDir) // for system service | ||
gLog = NewLogger(baseDir, ProducnName, LvDEBUG, 1024*1024, LogFileAndConsole) | ||
// TODO: install sub command, deamon process | ||
|
||
parseParams("") | ||
|
||
n, _ := strconv.ParseUint(token, 10, 64) | ||
gConf.setToken(n) | ||
gConf.setShareBandwidth(0) | ||
n, err := strconv.ParseUint(token, 10, 64) | ||
if err == nil { | ||
gConf.setToken(n) | ||
} | ||
gLog.setLevel(LogLevel(logLevel)) | ||
gConf.setShareBandwidth(bw) | ||
gLog.Println(LvINFO, "openp2p start. version: ", OpenP2PVersion) | ||
gLog.Println(LvINFO, "Contact: QQ: 477503927, Email: [email protected]") | ||
gLog.Println(LvINFO, "Contact: QQ group 16947733, Email [email protected]") | ||
gLog.Println(LvINFO, &gConf) | ||
|
||
network = P2PNetworkInstance(&gConf.Network) | ||
|
Oops, something went wrong.