changed line of NAT traversal
This commit is contained in:
38
main.go
38
main.go
@@ -37,25 +37,6 @@ func main() {
|
|||||||
rand.Seed(time.Now().UnixNano())
|
rand.Seed(time.Now().UnixNano())
|
||||||
server := core.GetHttp()
|
server := core.GetHttp()
|
||||||
|
|
||||||
// running implementation to escape NAT
|
|
||||||
Server, barrireKVM, err := core.EscapeNAT(*port)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalln(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
Config, err := config.ConfigInit()
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalln(err)
|
|
||||||
}
|
|
||||||
Config.IPAddress = "64.227.168.102"
|
|
||||||
Config.NATEscapeServerPort = Server
|
|
||||||
Config.NATEscapeBarrierPort = barrireKVM
|
|
||||||
|
|
||||||
err = Config.WriteConfig()
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalln(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Print out room information
|
// Print out room information
|
||||||
if *roomInfo {
|
if *roomInfo {
|
||||||
room, err := core.ReadRoomsFile()
|
room, err := core.ReadRoomsFile()
|
||||||
@@ -142,6 +123,25 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// running implementation to escape NAT
|
||||||
|
Server, barrireKVM, err := core.EscapeNAT(*port)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalln(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
Config, err := config.ConfigInit()
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalln(err)
|
||||||
|
}
|
||||||
|
Config.IPAddress = "64.227.168.102"
|
||||||
|
Config.NATEscapeServerPort = Server
|
||||||
|
Config.NATEscapeBarrierPort = barrireKVM
|
||||||
|
|
||||||
|
err = Config.WriteConfig()
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalln(err)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// PrettyPrint print the contents of the obj (
|
// PrettyPrint print the contents of the obj (
|
||||||
|
|||||||
Reference in New Issue
Block a user