Browse Source

initial commit

0xdcarns 3 years ago
parent
commit
4cd75f2985
2 changed files with 9 additions and 3 deletions
  1. 8 2
      netclient/functions/list.go
  2. 1 1
      serverctl/iptables.go

+ 8 - 2
netclient/functions/list.go

@@ -24,6 +24,9 @@ type Peer struct {
 
 
 type Network struct {
 type Network struct {
 	Name        string `json:"name"`
 	Name        string `json:"name"`
+	ID          string `json:"id"`
+	OS          string `json:"os"`
+	Version     string `json:"version"`
 	CurrentNode Peer   `json:"current_node"`
 	CurrentNode Peer   `json:"current_node"`
 	Peers       []Peer `json:"peers"`
 	Peers       []Peer `json:"peers"`
 }
 }
@@ -68,8 +71,11 @@ func getNetwork(network string) (Network, error) {
 		return Network{}, fmt.Errorf("listing peers for network %v: %w", network, err)
 		return Network{}, fmt.Errorf("listing peers for network %v: %w", network, err)
 	}
 	}
 	return Network{
 	return Network{
-		Name:  network,
-		Peers: peers,
+		Name:    network,
+		ID:      cfg.Node.ID,
+		OS:      cfg.Node.OS,
+		Version: cfg.Node.Version,
+		Peers:   peers,
 		CurrentNode: Peer{
 		CurrentNode: Peer{
 			Name:           cfg.Node.Name,
 			Name:           cfg.Node.Name,
 			Interface:      cfg.Node.Interface,
 			Interface:      cfg.Node.Interface,

+ 1 - 1
serverctl/iptables.go

@@ -84,7 +84,7 @@ func setForwardPolicy() error {
 
 
 // port forward from an entry, can contain a dns name for lookup
 // port forward from an entry, can contain a dns name for lookup
 func iptablesPortForward(entry string, inport string, outport string, isIP bool) error {
 func iptablesPortForward(entry string, inport string, outport string, isIP bool) error {
-	logger.Log(1, "forwarding "+entry+" traffic from host port "+inport+" to container port "+outport)
+	logger.Log(2, "forwarding "+entry+" traffic from host port "+inport+" to container port "+outport)
 
 
 	var address string
 	var address string
 	if !isIP {
 	if !isIP {