Skip to content

Commit

Permalink
v0.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmadigan committed Mar 28, 2024
1 parent 8d563f4 commit 48a0c00
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.vscode
podman-mac-net-connect
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PROJECT := github.com/jasonmadigan/podman-mac-net-connect
SETUP_IMAGE := quay.io/jmadigan/podman-mac-net-connect
VERSION := 0.0.7
VERSION := 0.0.8
LD_FLAGS := -X ${PROJECT}/version.Version=${VERSION}

run:: build-podman run-go
Expand Down
Binary file modified assets/connection-diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (
)

func main() {
interfaceName := "mad0"
interfaceName := "madawg0"

serverPortString := os.Getenv("SERVER_PORT")
if serverPortString == "" {
Expand Down
15 changes: 6 additions & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ type ServiceDestination struct {
Identity string `toml:"identity"`
}

// findPodmanProcesses searches for Podman-related processes and attempts to parse
// the SSH URI and identity file from the process's command line arguments.
// searches for Podman-related processes and attempts to parse
// the SSH URI and identity file from the process's arguments
func findPodmanProcesses() (string, string, error) {
cmd := exec.Command("ps", "aux")
output, err := cmd.Output()
Expand Down Expand Up @@ -99,7 +99,7 @@ type SSHConnectionDetails struct {
Identity string
}

// loadWireGuardModule attempts to load the WireGuard module using modprobe.
// loadWireGuardModule attempts to load the WireGuard module using modprobe
func loadWireGuardModule(details *SSHConnectionDetails) error {
// Parse the URI to extract username and host.
uri, err := url.Parse(details.URI)
Expand Down Expand Up @@ -152,8 +152,6 @@ func main() {

fmt.Printf("SSH URI: %s, Identity File: %s\n", sshDetails.URI, sshDetails.Identity)

// Proceed with WireGuard module loading and further setup
// Note: The owner parameter has been removed from the function call
if err := loadWireGuardModule(&sshDetails); err != nil {
fmt.Printf("Error loading WireGuard module: %v\n", err)
os.Exit(ExitSetupFailed)
Expand Down Expand Up @@ -224,9 +222,8 @@ func main() {
logger.Verbosef("UAPI listener started")

// Wireguard configuration

hostPeerIp := "10.33.33.1"
vmPeerIp := "10.33.33.2"
hostPeerIp := "10.33.34.1"
vmPeerIp := "10.33.34.2"

c, err := wgctrl.New()
if err != nil {
Expand Down Expand Up @@ -268,7 +265,7 @@ func main() {
},
}

port := 3333
port := 3334
err = c.ConfigureDevice(interfaceName, wgtypes.Config{
ListenPort: &port,
PrivateKey: &hostPrivateKey,
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package version

// Variables initialized by the Go linker at build time - see Makefile

var Version = "0.0.6"
var Version = "0.0.8"
var SetupImage = "quay.io/jmadigan/podman-mac-net-connect"

0 comments on commit 48a0c00

Please sign in to comment.