Simulation base code

This commit is contained in:
2025-05-30 16:23:39 +01:00
parent 2d55643dd9
commit a46ec3575c
7 changed files with 271 additions and 176 deletions

View File

@@ -38,6 +38,7 @@ type Config struct {
KeyFile string
BareMetal bool
UnsafeMode bool
Test bool
CustomConfig interface{}
//NetworkInterface string
//NetworkInterfaceIPV6Index int

View File

@@ -95,6 +95,7 @@ func SetDefaults(envName string, forceDefault bool, CustomConfig interface{}, No
Defaults.PrivateKeyFile = defaultPath + "p2prc.privateKey"
Defaults.BareMetal = false
Defaults.UnsafeMode = false
Defaults.Test = false
// Generate certificate files for SSL
err = GenerateCertificate()

View File

@@ -16,7 +16,6 @@ import (
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"github.com/Akilan1999/p2p-rendering-computation/p2p"
"log"
"math/big"
"net"
@@ -54,7 +53,8 @@ func GenerateCertificate() error {
//flag.Parse()
host, err = p2p.CurrentPublicIP()
//host, err = p2p.CurrentPublicIP()
host = "0.0.0.0"
if err != nil {
return err