Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 35 additions & 34 deletions cmd/agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package main
import (
"flag"
"fmt"
"log"
"os"

"github.com/go-logr/stdr"
"github.com/jodevsa/wireguard-operator/internal/iptables"
"github.com/jodevsa/wireguard-operator/pkg/agent"
"github.com/jodevsa/wireguard-operator/pkg/wireguard"
"log"
"os"
)

func main() {
Expand All @@ -23,42 +24,42 @@ func main() {
flag.StringVar(&wgUserspaceImplementationFallback, "wg-userspace-implementation-fallback", "wireguard-go", "The userspace implementation of wireguard to fallback to")
flag.IntVar(&wireguardListenPort, "wg-listen-port", 51820, "the UDP port wireguard is listening on")
flag.IntVar(&verbosity, "v", 1, "the verbosity level")
flag.BoolVar(&wgUseUserspaceImpl, "wg-use-userspace-implementation", false, "Use userspace implementation")
flag.BoolVar(&wgUseUserspaceImpl, "wg-use-userspace-implementation", true, "Use userspace implementation")
flag.Parse()

println(fmt.Sprintf(
`
.:::::::::::::::::::::::::...::::::::::::::::::::.
.::::::::::::::::::::.:^7J5PBGY!^::::::::::::::::::::.
:::::::::::::::::::::~?J??5&@@@@@&G!~~~::::::::::::::::. WG Agent Configuration
::::::::::::::::::::::^7&@@@@@@@@@@@@&&&G^:::::::::::::::. ------------------------------------------
.::::::::::::::::::::::!J#@@@@@@@BBBGPPG7:::::::::::::::::. wg-iface: %s
.:::::::::::::::::::::^?Y5#@@@@@@5^...::::::::::::::::::::: state: %s
.::::::::::::::::::::::..:!7Y#@@@@@#Y~:.::::::::::::::::::. wg-listen-port: %d
.:::::::::::::::::::.:^!?JYYJ?JG&@@@@@#7::::::::::::::::::. wg-use-userspace-implementation: %v
.:::::::::::::::::.^J#@@@@@@@@@&#B&@@@@@G:::::::::::::::::. wg-userspace-implementation-fallback: %s
.:::::::::::::::::J@@@@@@@@@@@@@@@&G@@@@@J.:::::::::::::::.
.::::::::::::::::5@@@@@#?~~~7P@@@@@&B@@@@P.:::::::::::::::.
.:::::::::::::::^@@@@@P..::::.~@@@@B&@@@@!::::::::::::::::.
.:::::::::::::::~@@@@@J.::::::^@@@#&@@@@P:::::::::::::::::.
.::::::::::::::::B@@@@@P!^:.:~G&&&@@@@@5::::::::::::::::::.
.:::::::::::::::::G@@@@@&#BB&@@@@@@@@B~.::::::::::::::::::.
.::::::::::::::::..~G&&&@@@@@@@@@&&&&&P^.:::::::::::::::::.
.::::::::::::::.:~YGGY&@@@@@&GY7JB@@@@@@7:::::::::::::::::.
.::::::::::::::?&@@@B&@@@@#!:..:::~B@@@@@~::::::::::::::::.
.:::::::::::::J&#P5?5@@@@@:.::::::::&@@@@5.:::::::::::::::.
.:::::::::::::^:....J@@@@@~.::::::.^@@@@@5.::::::::::::::::
.::::::::::::::::::::&@@@@@Y~::::^J&@@@@&^::::::::::::::::.
::::::::::::::::::::^B@@@@@@&##&@@@@@@#~:::::::::::::::::.
:::::::::::::::::::::7B@@@@@@@@@@@@#?::::::::::::::::::.
.::::::::::::::::::::.^7YGB##BGY7^:.:::::::::::::::::.
.:::::::::::::::::::::..::::..::::::::::::::::::..
.....:...............................:.....
`
.:::::::::::::::::::::::::...::::::::::::::::::::.
.::::::::::::::::::::.:^7J5PBGY!^::::::::::::::::::::.
:::::::::::::::::::::~?J??5&@@@@@&G!~~~::::::::::::::::. WG Agent Configuration
::::::::::::::::::::::^7&@@@@@@@@@@@@&&&G^:::::::::::::::. ------------------------------------------
.::::::::::::::::::::::!J#@@@@@@@BBBGPPG7:::::::::::::::::. wg-iface: %s
.:::::::::::::::::::::^?Y5#@@@@@@5^...::::::::::::::::::::: state: %s
.::::::::::::::::::::::..:!7Y#@@@@@#Y~:.::::::::::::::::::. wg-listen-port: %d
.:::::::::::::::::::.:^!?JYYJ?JG&@@@@@#7::::::::::::::::::. wg-use-userspace-implementation: %v
.:::::::::::::::::.^J#@@@@@@@@@&#B&@@@@@G:::::::::::::::::. wg-userspace-implementation-fallback: %s
.:::::::::::::::::J@@@@@@@@@@@@@@@&G@@@@@J.:::::::::::::::.
.::::::::::::::::5@@@@@#?~~~7P@@@@@&B@@@@P.:::::::::::::::.
.:::::::::::::::^@@@@@P..::::.~@@@@B&@@@@!::::::::::::::::.
.:::::::::::::::~@@@@@J.::::::^@@@#&@@@@P:::::::::::::::::.
.::::::::::::::::B@@@@@P!^:.:~G&&&@@@@@5::::::::::::::::::.
.:::::::::::::::::G@@@@@&#BB&@@@@@@@@B~.::::::::::::::::::.
.::::::::::::::::..~G&&&@@@@@@@@@&&&&&P^.:::::::::::::::::.
.::::::::::::::.:~YGGY&@@@@@&GY7JB@@@@@@7:::::::::::::::::.
.::::::::::::::?&@@@B&@@@@#!:..:::~B@@@@@~::::::::::::::::.
.:::::::::::::J&#P5?5@@@@@:.::::::::&@@@@5.:::::::::::::::.
.:::::::::::::^:....J@@@@@~.::::::.^@@@@@5.::::::::::::::::
.::::::::::::::::::::&@@@@@Y~::::^J&@@@@&^::::::::::::::::.
::::::::::::::::::::^B@@@@@@&##&@@@@@@#~:::::::::::::::::.
:::::::::::::::::::::7B@@@@@@@@@@@@#?::::::::::::::::::.
.::::::::::::::::::::.^7YGB##BGY7^:.:::::::::::::::::.
.:::::::::::::::::::::..::::..::::::::::::::::::..
.....:...............................:.....

/ \ / \/ _____/ / _ \ / ___\ ____ _____/ |_
\ \/\/ / \ ___ / /_\ \ / /_/ _/ __ \ / \ __\
\ /\ \_\ \ / | \\___ /\ ___/| | | |
\__/\ / \______ / \____|__ /_____/ \___ |___| |__|
/ \ / \/ _____/ / _ \ / ___\ ____ _____/ |_
\ \/\/ / \ ___ / /_\ \ / /_/ _/ __ \ / \ __\
\ /\ \_\ \ / | \\___ /\ ___/| | | |
\__/\ / \______ / \____|__ /_____/ \___ |___| |__|
\/ \/ \/ \/ \/
`, iface, configFilePath, wireguardListenPort, wgUseUserspaceImpl, wgUserspaceImplementationFallback))

Expand Down
Loading