removed files not needed
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,4 +2,7 @@
|
||||
*debug_bin
|
||||
*.yaml
|
||||
.vscode
|
||||
./Cmd
|
||||
.DS_Store
|
||||
.idea/
|
||||
data/
|
||||
8
.idea/.gitignore
generated
vendored
8
.idea/.gitignore
generated
vendored
@@ -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
|
||||
9
.idea/WebGateway.iml
generated
9
.idea/WebGateway.iml
generated
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="Go" enabled="true" />
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/WebGateway.iml" filepath="$PROJECT_DIR$/.idea/WebGateway.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
29
Gateway.go
29
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
|
||||
}
|
||||
|
||||
37
Main.go
37
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
|
||||
}
|
||||
|
||||
BIN
html/.DS_Store
vendored
BIN
html/.DS_Store
vendored
Binary file not shown.
BIN
html/css/.DS_Store
vendored
BIN
html/css/.DS_Store
vendored
Binary file not shown.
BIN
html/css/bootstrap/.DS_Store
vendored
BIN
html/css/bootstrap/.DS_Store
vendored
Binary file not shown.
BIN
html/css/bootstrap/mixins/.DS_Store
vendored
BIN
html/css/bootstrap/mixins/.DS_Store
vendored
Binary file not shown.
@@ -22,8 +22,8 @@
|
||||
<div class="wrap d-md-flex">
|
||||
<div class="text-wrap p-4 p-lg-5 text-center d-flex align-items-center order-md-last">
|
||||
<div class="text w-100">
|
||||
<video controls crossorigin playsinline poster="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.jpg" style="width:100%; visibility: hidden" id="video">
|
||||
<source src="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-576p.mp4" id="video-player">
|
||||
<video controls crossorigin playsinline poster="" style="width:100%; visibility: hidden" id="video">
|
||||
<source src="" id="video-player">
|
||||
<!-- Fallback for browsers that don't support the <video> element -->
|
||||
<a href="" id="VideoDownload" download>Download</a>
|
||||
</video>
|
||||
@@ -158,7 +158,7 @@
|
||||
function PlayVideo() {
|
||||
// make the video div visible
|
||||
Video.style.visibility = 'visible'
|
||||
VideoPlayer.href= window.location + "&play=true"
|
||||
VideoPlayer.src = window.location + "&play=true"
|
||||
}
|
||||
|
||||
|
||||
|
||||
BIN
html/fonts/.DS_Store
vendored
BIN
html/fonts/.DS_Store
vendored
Binary file not shown.
BIN
html/images/.DS_Store
vendored
BIN
html/images/.DS_Store
vendored
Binary file not shown.
BIN
html/js/.DS_Store
vendored
BIN
html/js/.DS_Store
vendored
Binary file not shown.
BIN
html/scss/.DS_Store
vendored
BIN
html/scss/.DS_Store
vendored
Binary file not shown.
BIN
html/scss/bootstrap/.DS_Store
vendored
BIN
html/scss/bootstrap/.DS_Store
vendored
Binary file not shown.
Reference in New Issue
Block a user