From 93852523e66c2646c8997c014f7c060b7baf0df8 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 9 Mar 2025 01:54:41 -0600 Subject: [PATCH] protobuf for settings --- .gitignore | 1 + Makefile | 9 ++++++++- README | 3 --- README.md | 5 +++++ portmap.proto | 14 ++++++++++++++ 5 files changed, 28 insertions(+), 4 deletions(-) delete mode 100644 README create mode 100644 README.md create mode 100644 portmap.proto diff --git a/.gitignore b/.gitignore index 50228cc..7389797 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.swp go.mod go.sum +*.pb.go gus diff --git a/Makefile b/Makefile index 3aa8725..c361aa4 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ VERSION = $(shell git describe --tags) BUILDTIME = $(shell date +%Y.%m.%d_%H%M) -all: build +all: portmap.pb.go goimports vet build ./gus --version ./gus @@ -25,6 +25,13 @@ debian: goimports: goimports -w *.go +vet: + @GO111MODULE=off go vet + @echo this go binary package builds okay + clean: rm -f go.* rm -f gus + +portmap.pb.go: portmap.proto + autogenpb --proto portmap.proto diff --git a/README b/README deleted file mode 100644 index 9cf7c31..0000000 --- a/README +++ /dev/null @@ -1,3 +0,0 @@ -# gus - -Squirl your way through any network. diff --git a/README.md b/README.md new file mode 100644 index 0000000..3f84554 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# gus + +Squirl your way through any network. + +* Meet [the Phantastic squirl Gus](https://www.youtube.com/watch?v=hFZFjoX2cGg) diff --git a/portmap.proto b/portmap.proto new file mode 100644 index 0000000..c798895 --- /dev/null +++ b/portmap.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +package gus; + +message Portmap { + int64 listen = 1; + string connect = 2; +} + +message Portmaps { // `autogenpb:marshal` `autogenpb:gui` + string uuid = 1; // `autogenpb:uuid:49a865ea-292d-48fd-8dc2-d0f82d5fd016` + string version = 2; // `autogenpb:version:v0.0.1` + repeated Portmap portmaps = 3; +}