initial commit

This commit is contained in:
2025-05-23 15:08:44 +02:00
commit e602d503e8
22 changed files with 2408 additions and 0 deletions

28
main.go Normal file
View File

@@ -0,0 +1,28 @@
package main
import (
"fmt"
"os"
"sshtunnel/cmd"
)
func main() {
// Ensure tunnel directory exists
homeDir, err := os.UserHomeDir()
if err != nil {
fmt.Printf("Error getting home directory: %v\n", err)
os.Exit(1)
}
tunnelPath := homeDir + "/.sshtunnels"
if _, err := os.Stat(tunnelPath); os.IsNotExist(err) {
err = os.MkdirAll(tunnelPath, 0755)
if err != nil {
fmt.Printf("Error creating tunnel directory: %v\n", err)
os.Exit(1)
}
}
// Execute the root command
cmd.Execute()
}