diff --git a/.DS_Store b/.DS_Store
deleted file mode 100644
index cb68029..0000000
Binary files a/.DS_Store and /dev/null differ
diff --git a/.gitignore b/.gitignore
index 2f480b9..3c71499 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,7 @@
*debug_bin
*.yaml
.vscode
+./Cmd
+.DS_Store
+.idea/
data/
\ No newline at end of file
diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 13566b8..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Editor-based HTTP Client requests
-/httpRequests/
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
diff --git a/.idea/WebGateway.iml b/.idea/WebGateway.iml
deleted file mode 100644
index 5e764c4..0000000
--- a/.idea/WebGateway.iml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 73a179c..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 94a25f7..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Cmd b/Cmd
index 1e3ec0c..d10e0f6 100755
Binary files a/Cmd and b/Cmd differ
diff --git a/Gateway.go b/Gateway.go
index 1ab568c..745f512 100644
--- a/Gateway.go
+++ b/Gateway.go
@@ -10,6 +10,7 @@ import (
"crypto/tls"
"encoding/hex"
"fmt"
+ "github.com/Akilan1999/p2p-rendering-computation/p2p/frp"
"io"
"net"
"net/http"
@@ -286,3 +287,31 @@ func webGatewayShowFile(backend *core.Backend, w http.ResponseWriter, r *http.Re
// Start sending the data!
//io.Copy(w, io.LimitReader(reader, int64(transferSize)))
}
+
+func EscapeNATWebGateway() (ExposePortP2PRC string, err error) {
+ host, port, err := net.SplitHostPort(config.P2PRCRootPeer)
+ if err != nil {
+ return
+ }
+
+ serverPort, err := frp.GetFRPServerPort("http://" + host + ":" + port)
+
+ if err != nil {
+ return
+ }
+
+ time.Sleep(1 * time.Second)
+
+ _, port, err = net.SplitHostPort(config.WebListen[0])
+ if err != nil {
+ return
+ }
+
+ //port for the barrierKVM server
+ ExposePortP2PRC, err = frp.StartFRPClientForServer(host, serverPort, port, config.ExposePortP2PRC)
+ if err != nil {
+ return
+ }
+
+ return
+}
diff --git a/Main.go b/Main.go
index 1db79db..69347ef 100644
--- a/Main.go
+++ b/Main.go
@@ -8,12 +8,8 @@ package main
import (
"fmt"
- "net"
- "os"
- "time"
-
- "github.com/Akilan1999/p2p-rendering-computation/p2p/frp"
"github.com/PeernetOfficial/core"
+ "os"
)
const configFile = "Config.yaml"
@@ -39,6 +35,9 @@ var config struct {
func main() {
userAgent := appName + "/" + core.Version
+ // change Config to point to /html by default
+ config.WebFiles = "html/"
+
backend, status, err := core.Init(userAgent, configFile, nil, &config)
if status != core.ExitSuccess {
@@ -71,31 +70,3 @@ func main() {
select {}
}
-
-func EscapeNATWebGateway() (ExposePortP2PRC string, err error) {
- host, port, err := net.SplitHostPort(config.P2PRCRootPeer)
- if err != nil {
- return
- }
-
- serverPort, err := frp.GetFRPServerPort("http://" + host + ":" + port)
-
- if err != nil {
- return
- }
-
- time.Sleep(1 * time.Second)
-
- _, port, err = net.SplitHostPort(config.WebListen[0])
- if err != nil {
- return
- }
-
- //port for the barrierKVM server
- ExposePortP2PRC, err = frp.StartFRPClientForServer(host, serverPort, port, config.ExposePortP2PRC)
- if err != nil {
- return
- }
-
- return
-}
diff --git a/html/.DS_Store b/html/.DS_Store
deleted file mode 100644
index 988a0c8..0000000
Binary files a/html/.DS_Store and /dev/null differ
diff --git a/html/css/.DS_Store b/html/css/.DS_Store
deleted file mode 100644
index 5f26578..0000000
Binary files a/html/css/.DS_Store and /dev/null differ
diff --git a/html/css/bootstrap/.DS_Store b/html/css/bootstrap/.DS_Store
deleted file mode 100644
index 40dce8c..0000000
Binary files a/html/css/bootstrap/.DS_Store and /dev/null differ
diff --git a/html/css/bootstrap/mixins/.DS_Store b/html/css/bootstrap/mixins/.DS_Store
deleted file mode 100644
index 6bc4ad5..0000000
Binary files a/html/css/bootstrap/mixins/.DS_Store and /dev/null differ
diff --git a/html/download.html b/html/download.html
index 925e352..2b2fb12 100644
--- a/html/download.html
+++ b/html/download.html
@@ -22,8 +22,8 @@
-