fixed play button
This commit is contained in:
@@ -1,44 +1,44 @@
|
|||||||
package core
|
package core
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/Akilan1999/p2p-rendering-computation/abstractions"
|
"github.com/Akilan1999/p2p-rendering-computation/abstractions"
|
||||||
"github.com/Akilan1999/remotegameplay/config"
|
"github.com/Akilan1999/remotegameplay/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// EscapeNAT Func to escape NAT
|
// EscapeNAT Func to escape NAT
|
||||||
// - 1 port for server
|
// - 1 port for server
|
||||||
// - 2 port for barrierKVM
|
// - 2 port for barrierKVM
|
||||||
func EscapeNAT(ScreenPort, GameplayServerPort string) (ServerPort string, ScreenSharePort string, err error) {
|
func EscapeNAT(ScreenPort, GameplayServerPort string) (ServerPort string, ScreenSharePort string, err error) {
|
||||||
port, err := abstractions.MapPort(ScreenPort, "", "")
|
port, err := abstractions.MapPort(ScreenPort, "", "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", "", err
|
return "", "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
ScreenSharePort = port.EntireAddress
|
ScreenSharePort = port.EntireAddress
|
||||||
|
|
||||||
// init config to get domain name
|
port, err = abstractions.MapPort(GameplayServerPort, "", "")
|
||||||
Config, err := config.ConfigInit()
|
if err != nil {
|
||||||
if err != nil {
|
return "", "", err
|
||||||
return "", "", err
|
}
|
||||||
}
|
|
||||||
|
|
||||||
port, err = abstractions.MapPort(GameplayServerPort, Config.DomainName, "")
|
ServerPort = port.EntireAddress
|
||||||
if err != nil {
|
|
||||||
return "", "", err
|
|
||||||
}
|
|
||||||
|
|
||||||
ServerPort = port.EntireAddress
|
return
|
||||||
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func EscapeNATBarrier() (barrierKVMport string, err error) {
|
func EscapeNATBarrier() (barrierKVMport string, err error) {
|
||||||
port, err := abstractions.MapPort("24798", "", "")
|
// init config to get domain name
|
||||||
if err != nil {
|
Config, err := config.ConfigInit()
|
||||||
return "", err
|
if err != nil {
|
||||||
}
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
barrierKVMport = port.EntireAddress
|
port, err := abstractions.MapPort("24798", Config.DomainName, "")
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
return
|
barrierKVMport = port.EntireAddress
|
||||||
|
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user