removed files not needed
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,4 +2,7 @@
|
|||||||
*debug_bin
|
*debug_bin
|
||||||
*.yaml
|
*.yaml
|
||||||
.vscode
|
.vscode
|
||||||
|
./Cmd
|
||||||
|
.DS_Store
|
||||||
|
.idea/
|
||||||
data/
|
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"
|
"crypto/tls"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/Akilan1999/p2p-rendering-computation/p2p/frp"
|
||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -286,3 +287,31 @@ func webGatewayShowFile(backend *core.Backend, w http.ResponseWriter, r *http.Re
|
|||||||
// Start sending the data!
|
// Start sending the data!
|
||||||
//io.Copy(w, io.LimitReader(reader, int64(transferSize)))
|
//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 (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
|
||||||
"os"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/Akilan1999/p2p-rendering-computation/p2p/frp"
|
|
||||||
"github.com/PeernetOfficial/core"
|
"github.com/PeernetOfficial/core"
|
||||||
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
const configFile = "Config.yaml"
|
const configFile = "Config.yaml"
|
||||||
@@ -39,6 +35,9 @@ var config struct {
|
|||||||
func main() {
|
func main() {
|
||||||
userAgent := appName + "/" + core.Version
|
userAgent := appName + "/" + core.Version
|
||||||
|
|
||||||
|
// change Config to point to /html by default
|
||||||
|
config.WebFiles = "html/"
|
||||||
|
|
||||||
backend, status, err := core.Init(userAgent, configFile, nil, &config)
|
backend, status, err := core.Init(userAgent, configFile, nil, &config)
|
||||||
|
|
||||||
if status != core.ExitSuccess {
|
if status != core.ExitSuccess {
|
||||||
@@ -71,31 +70,3 @@ func main() {
|
|||||||
|
|
||||||
select {}
|
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="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-wrap p-4 p-lg-5 text-center d-flex align-items-center order-md-last">
|
||||||
<div class="text w-100">
|
<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">
|
<video controls crossorigin playsinline poster="" 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">
|
<source src="" id="video-player">
|
||||||
<!-- Fallback for browsers that don't support the <video> element -->
|
<!-- Fallback for browsers that don't support the <video> element -->
|
||||||
<a href="" id="VideoDownload" download>Download</a>
|
<a href="" id="VideoDownload" download>Download</a>
|
||||||
</video>
|
</video>
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
function PlayVideo() {
|
function PlayVideo() {
|
||||||
// make the video div visible
|
// make the video div visible
|
||||||
Video.style.visibility = '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